25 #ifndef DIALECT_ROUTING_H 26 #define DIALECT_ROUTING_H 35 #include "libdialect/commontypes.h" 36 #include "libdialect/opts.h" 37 #include "libdialect/ortho.h" 38 #include "libdialect/logging.h" 42 typedef std::pair<Avoid::ConnDirFlags, Avoid::ConnDirFlags> EdgeConnDirs;
43 typedef std::map<id_type, EdgeConnDirs> EdgeConnDirsById;
65 void addNodes(
const NodesById &nodes);
74 void addEdges(
const EdgesById &
edges,
const EdgeConnDirsById *connDirs =
nullptr);
128 void route(Logger *logger =
nullptr);
144 std::vector<std::string> routingAttemptTglf;
150 CardinalDir departureDir(
const Edge_SP &e,
const Node_SP &u)
const;
166 SparseIdMatrix2d<Avoid::ConnDirFlags>::type m_allowedConnDirs;
175 #endif // DIALECT_ROUTING_H Does a special orthogonal routing in a graph having no leaves, ensuring that at least two distinct si...
Definition: routing.h:102
void route(Logger *logger=nullptr)
Do the routing.
Definition: routing.cpp:236
unsigned int ConnDirFlags
One or more Avoid::ConnDirFlag options.
Definition: connend.h:83
Standard libavoid include file which includes all libavoid header files.
RouteProcessing
Control how much processing should be done on connector routes by the RoutingAdapter.
Definition: routing.h:46
LeaflessOrthoRouter(Graph_SP G, const HolaOpts &opts)
Standard constructor.
Definition: routing.cpp:192
This option specifies the point should be given visibility to the right side of the shape that it is ...
Definition: connend.h:75
void setShapeBufferDistanceIELScalar(double a)
Set the Router's shapeBufferDistance parameter as a scalar multiple of the ideal edge length read fro...
Definition: routing.cpp:212
This option specifies the point should be given visibility to the left side of the shape that it is l...
Definition: connend.h:72
bool recordEachAttempt
Definition: routing.h:143
libdialect: A library for computing human-like orthogonal network (DiAlEcT) layouts.
Definition: cola.h:44
Record the connector routes in the Edges, exactly as returned by the Router.
void addNodes(const NodesById &nodes)
Add nodes.
Definition: routing.cpp:53
~LeaflessOrthoRouter(void)
Destructor.
Definition: routing.h:113
std::map< id_type, Avoid::ShapeRef * > nodeIdToShapeRef
Lookup a Node's associated ShapeRef* by the Node's ID.
Definition: routing.h:93
void addEdges(const EdgesById &edges, const EdgeConnDirsById *connDirs=nullptr)
Add edges.
Definition: routing.cpp:64
EdgesById edges
Lookup for Edges.
Definition: routing.h:89
std::map< id_type, Avoid::ConnRef * > edgeIdToConnRef
Lookup an Edge's associated ConnRef* by the Edge's ID.
Definition: routing.h:91
RouterFlag
Flags that can be passed to the router during initialisation to specify options.
Definition: router.h:70
RoutingAdapter(Avoid::RouterFlag flag)
Standard Constructor.
Definition: routing.h:61
void route(RouteProcessing processing=RouteProcessing::RECORD)
Do the routing.
Definition: routing.cpp:121
Avoid::Router router
The Router.
Definition: routing.h:87
The Router class represents a libavoid router instance.
Definition: router.h:386
This option specifies the point should be given visibility to the top of the shape that it is located...
Definition: connend.h:66
Adapter to easily apply libavoid::Routers to libdialect::Graphs.
Definition: routing.h:57
void recordRoutes(bool refine=false)
Record the routes in the Edges.
Definition: routing.cpp:126