Adaptagrams
Public Member Functions | Public Attributes | List of all members
dialect::LeaflessOrthoRouter Class Reference

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>

Collaboration diagram for dialect::LeaflessOrthoRouter:
Collaboration graph

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ LeaflessOrthoRouter()

LeaflessOrthoRouter::LeaflessOrthoRouter ( Graph_SP  G,
const HolaOpts &  opts 
)

Standard constructor.

Parameters
[in]Gthe Graph in which the routing is to be done. This Graph must not have any leaves, i.e. Nodes of degree 1.
[in]optsa 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().

Here is the call graph for this function:

Member Function Documentation

◆ setShapeBufferDistanceIELScalar()

void LeaflessOrthoRouter::setShapeBufferDistanceIELScalar ( double  a)

Set the Router's shapeBufferDistance parameter as a scalar multiple of the ideal edge length read from the Graph.

Warning
This is provided only as a convenience for testing. In the HOLA algorithm for which this is designed, shapeBufferDistance should always be zero. Positive values there may result in failures to route. HOLA uses its own node padding instead, for this purpose.

References dialect::RoutingAdapter::router, Avoid::Router::setRoutingParameter(), and Avoid::shapeBufferDistance.

Here is the call graph for this function:

Member Data Documentation

◆ recordEachAttempt

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().


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