Recti 1.2.4
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
recti::RoutingNode< IntPoint > Class Template Reference

Represents a node in the global routing tree. More...

#include <global_router.hpp>

Public Member Functions

 RoutingNode (std::string node_id, NodeType node_type, IntPoint node_position)
 Constructs a new RoutingNode<IntPoint>.
 
void add_child (RoutingNode< IntPoint > *child_node)
 Adds a child node to this node.
 
void remove_child (RoutingNode< IntPoint > *child_node)
 Removes a child node from this node.
 
auto get_position () const -> const IntPoint &
 Gets the position of the routing node.
 
auto manhattan_distance (const RoutingNode< IntPoint > *other_node) const -> int
 Calculates the Manhattan distance between this node and another node.
 

Public Attributes

std::string id
 Unique identifier for the node.
 
NodeType node_type
 The type of the node.
 
IntPoint pt
 The 2D integer coordinates of the node.
 
std::vector< RoutingNode< IntPoint > * > children
 Pointers to child nodes in the routing tree.
 
RoutingNode< IntPoint > * parent = nullptr
 Pointer to the parent node. Null for the source node.
 
double capacitance = 0.0
 Capacitance associated with the node (for future use).
 
double delay = 0.0
 Delay associated with the node (for future use).
 
int path_length = 0
 Path length from the source to this node.
 

Detailed Description

template<typename IntPoint>
class recti::RoutingNode< IntPoint >

Represents a node in the global routing tree.

A RoutingNode<IntPoint> can be a source, terminal, or Steiner point. It holds its position, type, and connections to parent and child nodes in the tree.

Template Parameters
IntPointThe point type used for coordinates (e.g. Point<int, int>).

Constructor & Destructor Documentation

◆ RoutingNode()

template<typename IntPoint >
recti::RoutingNode< IntPoint >::RoutingNode ( std::string  node_id,
NodeType  node_type,
IntPoint  node_position 
)
inline

Constructs a new RoutingNode<IntPoint>.

Parameters
node_idThe unique identifier for the node.
node_typeThe type of the node.
node_positionThe 2D integer coordinates of the node.

Member Function Documentation

◆ add_child()

template<typename IntPoint >
void recti::RoutingNode< IntPoint >::add_child ( RoutingNode< IntPoint > *  child_node)
inline

Adds a child node to this node.

Parameters
child_nodeA pointer to the child RoutingNode<IntPoint> to add.

◆ get_position()

template<typename IntPoint >
auto recti::RoutingNode< IntPoint >::get_position ( ) const -> const IntPoint&
inline

Gets the position of the routing node.

Returns
A const reference to the IntPoint representing the node's position.

◆ manhattan_distance()

template<typename IntPoint >
auto recti::RoutingNode< IntPoint >::manhattan_distance ( const RoutingNode< IntPoint > *  other_node) const -> int
inline

Calculates the Manhattan distance between this node and another node.

Parameters
other_nodeA pointer to the other RoutingNode<IntPoint>.
Returns
The Manhattan distance between the two nodes.

◆ remove_child()

template<typename IntPoint >
void recti::RoutingNode< IntPoint >::remove_child ( RoutingNode< IntPoint > *  child_node)
inline

Removes a child node from this node.

Parameters
child_nodeA pointer to the child RoutingNode<IntPoint> to remove.

Member Data Documentation

◆ capacitance

template<typename IntPoint >
double recti::RoutingNode< IntPoint >::capacitance = 0.0

Capacitance associated with the node (for future use).

◆ children

template<typename IntPoint >
std::vector<RoutingNode<IntPoint>*> recti::RoutingNode< IntPoint >::children

Pointers to child nodes in the routing tree.

◆ delay

template<typename IntPoint >
double recti::RoutingNode< IntPoint >::delay = 0.0

Delay associated with the node (for future use).

◆ id

template<typename IntPoint >
std::string recti::RoutingNode< IntPoint >::id

Unique identifier for the node.

◆ node_type

template<typename IntPoint >
NodeType recti::RoutingNode< IntPoint >::node_type

The type of the node.

◆ parent

template<typename IntPoint >
RoutingNode<IntPoint>* recti::RoutingNode< IntPoint >::parent = nullptr

Pointer to the parent node. Null for the source node.

◆ path_length

template<typename IntPoint >
int recti::RoutingNode< IntPoint >::path_length = 0

Path length from the source to this node.

◆ pt

template<typename IntPoint >
IntPoint recti::RoutingNode< IntPoint >::pt

The 2D integer coordinates of the node.


The documentation for this class was generated from the following file: