Inkscape
Vector Graphics Editor
|
#include <mtst.h>
Public Member Functions | |
MinimumTerminalSpanningTree (Router *router, std::set< VertInf * > terminals, JunctionHyperedgeTreeNodeMap *hyperedgeTreeJunctions=nullptr) | |
~MinimumTerminalSpanningTree () | |
void | constructInterleaved (void) |
void | constructSequential (void) |
void | setDebuggingOutput (FILE *fp, unsigned int counter) |
HyperedgeTreeNode * | rootJunction (void) const |
Private Member Functions | |
void | buildHyperedgeTreeToRoot (VertInf *curr, HyperedgeTreeNode *prevNode, VertInf *prevVert, bool markEdges=false) |
VertInf ** | resetDistsForPath (VertInf *currVert, VertInf **newRootVertPtr) |
void | rewriteRestOfHyperedge (VertInf *vert, VertInf **newTreeRootPtr) |
void | drawForest (VertInf *vert, VertInf *prev) |
void | makeSet (VertInf *vertex) |
VertexSetList::iterator | findSet (VertInf *vertex) |
void | unionSets (VertexSetList::iterator s1, VertexSetList::iterator s2) |
HyperedgeTreeNode * | addNode (VertInf *vertex, HyperedgeTreeNode *prevNode) |
void | removeInvalidBridgingEdges (void) |
void | commitToBridgingEdge (EdgeInf *e) |
bool | connectsWithoutBend (VertInf *oldLeaf, VertInf *newLeaf) |
LayeredOrthogonalEdgeList | getOrthogonalEdgesFromVertex (VertInf *vert, VertInf *prev) |
VertInf * | orthogonalPartner (VertInf *vert, double penalty=0) |
VertexPair | realVerticesCountingPartners (EdgeInf *edge) |
Private Attributes | |
Router * | router |
bool | isOrthogonal |
std::set< VertInf * > | terminals |
std::set< VertInf * > | origTerminals |
JunctionHyperedgeTreeNodeMap * | hyperedgeTreeJunctions |
VertexNodeMap | nodes |
HyperedgeTreeNode * | m_rootJunction |
double | bendPenalty |
VertexSetList | allsets |
std::list< VertInf * > | visitedVertices |
std::list< VertInf * > | extraVertices |
std::list< VertInf * > | unusedVertices |
std::list< VertInf ** > | rootVertexPointers |
std::vector< VertInf * > | vHeap |
HeapCmpVertInf | vHeapCompare |
std::vector< EdgeInf * > | beHeap |
CmpEdgeInf | beHeapCompare |
const VertID | dimensionChangeVertexID |
Avoid::MinimumTerminalSpanningTree::MinimumTerminalSpanningTree | ( | Router * | router, |
std::set< VertInf * > | terminals, | ||
JunctionHyperedgeTreeNodeMap * | hyperedgeTreeJunctions = nullptr |
||
) |
Avoid::MinimumTerminalSpanningTree::~MinimumTerminalSpanningTree | ( | ) |
Definition at line 89 of file mtst.cpp.
References Avoid::HyperedgeTreeNode::deleteEdgesExcept(), and m_rootJunction.
|
private |
Definition at line 135 of file mtst.cpp.
References Avoid::HyperedgeTreeNode::junction, m_rootJunction, Avoid::Obstacle::makeActive(), node, nodes, Avoid::HyperedgeTreeNode::point, Avoid::VertInf::point, Avoid::Router::removeObjectFromQueuedActions(), and router.
Referenced by buildHyperedgeTreeToRoot(), commitToBridgingEdge(), and constructSequential().
|
private |
Definition at line 182 of file mtst.cpp.
References addNode(), Avoid::Router::debugHandler(), dimensionChangeVertexID, Avoid::HyperedgeTreeNode::finalVertex, Avoid::VertInf::hasNeighbour(), Avoid::VertInf::id, Avoid::VertID::isDummyPinHelper(), isOrthogonal, Avoid::HyperedgeTreeNode::isPinDummyEndpoint, Avoid::HyperedgeTreeNode::junction, Avoid::VertInf::m_orthogonalPartner, Avoid::DebugHandler::mtstCommitToEdge(), Avoid::VertInf::pathNext, router, and Avoid::EdgeInf::setHyperedgeSegment().
Referenced by commitToBridgingEdge(), and constructSequential().
|
private |
Definition at line 991 of file mtst.cpp.
References addNode(), buildHyperedgeTreeToRoot(), Avoid::Router::debugHandler(), drawForest(), hyperedgeTreeJunctions, Avoid::VertInf::makeTreeRootPointer(), Avoid::DebugHandler::mtstCommitToEdge(), origTerminals, Avoid::VertInf::pathNext, realVerticesCountingPartners(), resetDistsForPath(), rootVertexPointers, router, Avoid::EdgeInf::setHyperedgeSegment(), Avoid::VertInf::setTreeRootPointer(), terminals, Avoid::VertInf::treeRootPointer(), vHeap, and vHeapCompare.
Referenced by constructInterleaved().
|
private |
Definition at line 832 of file mtst.cpp.
References Avoid::colinear(), isOrthogonal, Avoid::VertInf::orthogVisList, Avoid::VertInf::pathNext, Avoid::VertInf::point, Avoid::VertInf::sptfDist, and Avoid::VertInf::visList.
Referenced by constructSequential().
void Avoid::MinimumTerminalSpanningTree::constructInterleaved | ( | void | ) |
Definition at line 633 of file mtst.cpp.
References Avoid::EdgeList::begin(), Avoid::DebugHandler::beginningHyperedgeReroutingWithEndpoints(), beHeap, beHeapCompare, commitToBridgingEdge(), Avoid::VertInfList::connsBegin(), Avoid::cost(), Avoid::Router::debugHandler(), Avoid::EdgeList::end(), Avoid::VertInfList::end(), extraVertices, Avoid::EdgeInf::getDist(), getOrthogonalEdgesFromVertex(), Avoid::VertInf::id, Avoid::VertID::isDummyPinHelper(), Avoid::EdgeInf::lstNext, Avoid::VertInf::lstNext, Avoid::VertInf::makeTreeRootPointer(), Avoid::DebugHandler::mtstGrowForestWithEdge(), Avoid::DebugHandler::mtstPotentialBridgingEdge(), origTerminals, Avoid::VertInf::pathNext, realVerticesCountingPartners(), removeInvalidBridgingEdges(), rootVertexPointers, router, Avoid::EdgeInf::setMtstDist(), Avoid::VertInf::sptfDist, terminals, Avoid::tmHyperedgeAlt, Avoid::VertInf::treeRoot(), Avoid::VertInf::treeRootPointer(), Avoid::Router::vertices, vHeap, vHeapCompare, and Avoid::Router::visOrthogGraph.
Referenced by Avoid::HyperedgeRerouter::performRerouting().
void Avoid::MinimumTerminalSpanningTree::constructSequential | ( | void | ) |
Definition at line 282 of file mtst.cpp.
References addNode(), allsets, Avoid::DebugHandler::beginningHyperedgeReroutingWithEndpoints(), beHeap, beHeapCompare, bendPenalty, buildHyperedgeTreeToRoot(), Avoid::colinear(), connectsWithoutBend(), Avoid::VertInfList::connsBegin(), Avoid::cost(), Avoid::Router::debugHandler(), dimensionChangeVertexID, Avoid::VertInfList::end(), extraVertices, findSet(), hyperedgeTreeJunctions, Avoid::VertInf::id, Avoid::VertID::isDummyPinHelper(), isOrthogonal, Avoid::VertInf::lstNext, Avoid::EdgeInf::m_vert1, Avoid::EdgeInf::m_vert2, makeSet(), Avoid::DebugHandler::mtstCommitToEdge(), Avoid::DebugHandler::mtstGrowForestWithEdge(), Avoid::DebugHandler::mtstPotentialBridgingEdge(), nodes, Avoid::VertInf::orthogVisList, Avoid::VertInf::pathNext, Avoid::VertInf::point, router, Avoid::EdgeInf::setDist(), Avoid::VertInf::setSPTFRoot(), Avoid::VertInf::sptfDist, Avoid::VertInf::sptfRoot(), terminals, Avoid::tmHyperedgeForest, Avoid::tmHyperedgeMTST, unionSets(), Avoid::Router::vertices, vHeap, vHeapCompare, and Avoid::VertInf::visList.
Definition at line 913 of file mtst.cpp.
References Avoid::Router::debugHandler(), drawForest(), getOrthogonalEdgesFromVertex(), Avoid::DebugHandler::mtstGrowForestWithEdge(), Avoid::VertInf::point, router, Avoid::VertInf::treeRoot(), and Avoid::VertInf::treeRootPointer().
Referenced by commitToBridgingEdge(), and drawForest().
|
private |
|
private |
Definition at line 577 of file mtst.cpp.
References dimensionChangeVertexID, Avoid::VertInf::id, isOrthogonal, orthogonalPartner(), Avoid::VertInf::orthogVisList, Avoid::VertInf::point, Avoid::VertInf::visList, Avoid::Point::x, and Avoid::Point::y.
Referenced by constructInterleaved(), drawForest(), and rewriteRestOfHyperedge().
|
private |
|
private |
Definition at line 523 of file mtst.cpp.
References bendPenalty, dimensionChangeVertexID, extraVertices, isOrthogonal, Avoid::VertInf::m_orthogonalPartner, Avoid::VertInf::point, router, and Avoid::EdgeInf::setDist().
Referenced by getOrthogonalEdgesFromVertex().
|
private |
Definition at line 964 of file mtst.cpp.
References dimensionChangeVertexID, Avoid::VertInf::id, Avoid::VertInf::m_orthogonalPartner, Avoid::EdgeInf::m_vert1, Avoid::EdgeInf::m_vert2, Avoid::VertInf::point, and Avoid::Point::x.
Referenced by commitToBridgingEdge(), constructInterleaved(), and removeInvalidBridgingEdges().
|
private |
Definition at line 543 of file mtst.cpp.
References beHeap, beHeapCompare, origTerminals, and realVerticesCountingPartners().
Referenced by constructInterleaved().
|
private |
Definition at line 252 of file mtst.cpp.
References Avoid::VertInf::pathNext, rewriteRestOfHyperedge(), Avoid::VertInf::setTreeRootPointer(), Avoid::VertInf::sptfDist, terminals, and Avoid::VertInf::treeRootPointer().
Referenced by commitToBridgingEdge().
|
private |
Definition at line 886 of file mtst.cpp.
References getOrthogonalEdgesFromVertex(), rewriteRestOfHyperedge(), and Avoid::VertInf::setTreeRootPointer().
Referenced by resetDistsForPath(), and rewriteRestOfHyperedge().
HyperedgeTreeNode * Avoid::MinimumTerminalSpanningTree::rootJunction | ( | void | ) | const |
Definition at line 98 of file mtst.cpp.
References m_rootJunction.
Referenced by Avoid::HyperedgeRerouter::performRerouting().
void Avoid::MinimumTerminalSpanningTree::setDebuggingOutput | ( | FILE * | fp, |
unsigned int | counter | ||
) |
|
private |
|
private |
Definition at line 114 of file mtst.h.
Referenced by constructSequential(), findSet(), makeSet(), and unionSets().
|
private |
Definition at line 125 of file mtst.h.
Referenced by constructInterleaved(), constructSequential(), and removeInvalidBridgingEdges().
|
private |
Definition at line 126 of file mtst.h.
Referenced by constructInterleaved(), constructSequential(), and removeInvalidBridgingEdges().
|
private |
Definition at line 113 of file mtst.h.
Referenced by constructSequential(), and orthogonalPartner().
|
private |
Definition at line 128 of file mtst.h.
Referenced by buildHyperedgeTreeToRoot(), constructSequential(), getOrthogonalEdgesFromVertex(), orthogonalPartner(), and realVerticesCountingPartners().
|
private |
Definition at line 116 of file mtst.h.
Referenced by constructInterleaved(), constructSequential(), and orthogonalPartner().
|
private |
Definition at line 109 of file mtst.h.
Referenced by commitToBridgingEdge(), and constructSequential().
|
private |
Definition at line 106 of file mtst.h.
Referenced by buildHyperedgeTreeToRoot(), connectsWithoutBend(), constructSequential(), getOrthogonalEdgesFromVertex(), and orthogonalPartner().
|
private |
Definition at line 112 of file mtst.h.
Referenced by addNode(), rootJunction(), and ~MinimumTerminalSpanningTree().
|
private |
Definition at line 111 of file mtst.h.
Referenced by addNode(), and constructSequential().
|
private |
Definition at line 108 of file mtst.h.
Referenced by commitToBridgingEdge(), constructInterleaved(), and removeInvalidBridgingEdges().
|
private |
Definition at line 118 of file mtst.h.
Referenced by commitToBridgingEdge(), and constructInterleaved().
|
private |
Definition at line 105 of file mtst.h.
Referenced by addNode(), buildHyperedgeTreeToRoot(), commitToBridgingEdge(), constructInterleaved(), constructSequential(), drawForest(), and orthogonalPartner().
|
private |
Definition at line 107 of file mtst.h.
Referenced by commitToBridgingEdge(), constructInterleaved(), constructSequential(), and resetDistsForPath().
|
private |
|
private |
Definition at line 121 of file mtst.h.
Referenced by commitToBridgingEdge(), constructInterleaved(), and constructSequential().
|
private |
Definition at line 122 of file mtst.h.
Referenced by commitToBridgingEdge(), constructInterleaved(), and constructSequential().
|
private |