Adaptagrams
|
Does a special orthogonal routing in a graph having no leaves, ensuring that at least two distinct sides of every node are used as connection points. This is useful if we later wish to planarise the layout, since it ensures that no node will become a leaf in that process. More...
#include <routing.h>
Public Member Functions | |
LeaflessOrthoRouter (Graph_SP G, const HolaOpts &opts) | |
Standard constructor. More... | |
~LeaflessOrthoRouter (void) | |
Destructor. | |
void | route (Logger *logger=nullptr) |
Do the routing. | |
void | setShapeBufferDistanceIELScalar (double a) |
Set the Router's shapeBufferDistance parameter as a scalar multiple of the ideal edge length read from the Graph. More... | |
Public Attributes | |
bool | recordEachAttempt = false |
Does a special orthogonal routing in a graph having no leaves, ensuring that at least two distinct sides of every node are used as connection points. This is useful if we later wish to planarise the layout, since it ensures that no node will become a leaf in that process.
LeaflessOrthoRouter::LeaflessOrthoRouter | ( | Graph_SP | G, |
const HolaOpts & | opts | ||
) |
Standard constructor.
[in] | G | the Graph in which the routing is to be done. This Graph must not have any leaves, i.e. Nodes of degree 1. |
[in] | opts | a HolaOptions object from which we can read settings for the router. |
References dialect::RoutingAdapter::addEdges(), dialect::RoutingAdapter::addNodes(), Avoid::ConnDirAll, Avoid::crossingPenalty, Avoid::nudgeSharedPathsWithCommonEndPoint, dialect::RoutingAdapter::router, Avoid::segmentPenalty, Avoid::Router::setRoutingOption(), and Avoid::Router::setRoutingParameter().
void LeaflessOrthoRouter::setShapeBufferDistanceIELScalar | ( | double | a | ) |
Set the Router's shapeBufferDistance parameter as a scalar multiple of the ideal edge length read from the Graph.
References dialect::RoutingAdapter::router, Avoid::Router::setRoutingParameter(), and Avoid::shapeBufferDistance.
bool dialect::LeaflessOrthoRouter::recordEachAttempt = false |
For testing, it is useful to be able to see the result of each attempt to do the routing. If desired, set recordEachAttempt to true. Then the TGLF for each routing attmept will be available in routingAttemptTglf.
Referenced by route().