19 #ifndef TORC_ROUTER_ROUTETREENODE_HPP
20 #define TORC_ROUTER_ROUTETREENODE_HPP
77 while (p < e) {
delete *p, p++; }
85 void addChildren(
const std::vector<RouteTreeNode*>& newChildren) {
86 boost::uint32_t size = newChildren.size();
87 if (size == 0) {
return; }
97 mChildren =
new std::vector<RouteTreeNode*>();
137 int topDepth = top->
mDepth;
138 if (topDepth == 0)
return;
150 (*p)->adjustDepth(adjustment);
164 #endif // TORC_ROUTER_ROUTETREENODE_HPP
Encapsulation of an arc between two tilewires.
void addChildren(const std::vector< RouteTreeNode * > &newChildren)
Add children to the node.
std::vector< RouteTreeNode * > * mChildren
Pointer to a vector of child nodes that is dynamically allocated.
RouteTreeNode * mOnlyChild
Pointer to a child node that is the only one.
std::vector< RouteTreeNode * >::iterator RouteTreeNodeIterator
Header for the RouteNode class.
~RouteTreeNode()
Destructor.
const boost::int32_t getDepth() const
Get the node depth.
RouteTreeNode(Tilewire inSource, Tilewire inSink, boost::int32_t inCost, RouteTreeNode *inParent)
Public Constructor.
Encapsulation of a device tile and wire pair.
boost::uint16_t getNumChildren()
Get the number of children.
void adjustDepth(int adjustment)
Recursively adjust node depths.
boost::int32_t mDepth
Depth of node from the source.
An object that holds more complete path information for routing and tracing.
RouteNode * getTop()
Return the top node by tracing parent pointers.
An object that holds an arc and path information for routing.
void makeParent(const Tilewire &inSource, const Tilewire &inSink)
Allocate a new node and make it the parent of this node.
RouteTreeNode * getChild(unsigned int index)
Get a child by index, returns 0 for invalid index.
RouteTreeNode(Arc inArc, boost::int32_t inCost, RouteTreeNode *inParent)
Public Constructor.
RouteNode * mParent
Pointer to parent node.
void normalizeDepth()
Normalize depth of nodes.
RouteTreeNode()
Null Constructor.