33 #include "libavoid/vertices.h" 34 #include "libavoid/hyperedgetree.h" 44 typedef std::list<VertexSet> VertexSetList;
46 typedef std::pair<EdgeInf *, VertInf *> LayeredOrthogonalEdge;
47 typedef std::list<LayeredOrthogonalEdge> LayeredOrthogonalEdgeList;
52 bool operator()(
const VertInf *a,
const VertInf *b)
const;
59 bool operator()(
const EdgeInf *a,
const EdgeInf *b)
const;
66 class MinimumTerminalSpanningTree
69 MinimumTerminalSpanningTree(Router *router,
70 std::set<VertInf *> terminals,
71 JunctionHyperedgeTreeNodeMap *hyperedgeTreeJunctions =
nullptr);
72 ~MinimumTerminalSpanningTree();
76 void constructInterleaved(
void);
78 void constructSequential(
void);
80 void setDebuggingOutput(FILE *fp,
unsigned int counter);
81 HyperedgeTreeNode *rootJunction(
void)
const;
84 void buildHyperedgeTreeToRoot(VertInf *curr,
85 HyperedgeTreeNode *prevNode, VertInf *prevVert,
86 bool markEdges =
false);
87 VertInf **resetDistsForPath(VertInf *currVert, VertInf **newRootVertPtr);
88 void rewriteRestOfHyperedge(VertInf *vert, VertInf **newTreeRootPtr);
89 void drawForest(VertInf *vert, VertInf *prev);
91 void makeSet(VertInf *vertex);
92 VertexSetList::iterator findSet(VertInf *vertex);
93 void unionSets(VertexSetList::iterator s1, VertexSetList::iterator s2);
94 HyperedgeTreeNode *addNode(VertInf *vertex, HyperedgeTreeNode *prevNode);
96 void removeInvalidBridgingEdges(
void);
97 void commitToBridgingEdge(EdgeInf *e);
98 bool connectsWithoutBend(VertInf *oldLeaf, VertInf *newLeaf);
99 LayeredOrthogonalEdgeList getOrthogonalEdgesFromVertex(VertInf *vert,
101 VertInf *orthogonalPartner(VertInf *vert,
double penalty = 0);
102 VertexPair realVerticesCountingPartners(EdgeInf *edge);
107 std::set<VertInf *> terminals;
108 std::set<VertInf *> origTerminals;
109 JunctionHyperedgeTreeNodeMap *hyperedgeTreeJunctions;
112 HyperedgeTreeNode *m_rootJunction;
114 VertexSetList allsets;
115 std::list<VertInf *> visitedVertices;
116 std::list<VertInf *> extraVertices;
117 std::list<VertInf *> unusedVertices;
118 std::list<VertInf **> rootVertexPointers;
121 std::vector<VertInf *> vHeap;
122 HeapCmpVertInf vHeapCompare;
125 std::vector<EdgeInf *> beHeap;
126 CmpEdgeInf beHeapCompare;
128 const VertID dimensionChangeVertexID;
libavoid: Object-avoiding orthogonal and polyline connector routing library.
Definition: actioninfo.cpp:33