Dynagraph is a platform-independent graph layout engine. There are three ways to connect with the dynagraph layout engines:
a | All at once (batch). Equivalent to not specifying -t. |
n | Insert all nodes, then all edges. |
b | Breadth first search. |
d | Depth first search. |
r | Randomly insert edges. |
w | "Wandering" (not recommended). |
c | Crossing optimization |
t | Time usage breakdown |
d | Dynadag tallies |
g | Dump graph in dotfile format after every step |
q | Dump input queue before each step |
r | Output readability statistics |
s | Output stability statistics |
p | Report on progress |
b | Bug of the day: used for random debugging |
Attributes are input attributes unless otherwise specified.
ellipse | The base shape is a Bezier spline approximation of an ellipse. |
---|---|
polygon | The base shape is a polygon. |
Layout layout,current(&layout);
gd<GraphGeom>(&layout).resolution = Coord(0.1,0.1);
gd<GraphGeom>(&layout).separation = Coord(0.5,1.0);
gd<GraphGeom>(&layout).labelSep = Coord(0.5,0.5);
ChangeQueue queue(&working,¤t);
DynaDAGServer server(¤t);
Optimizer *optim = new HybridOptimizer2(server.config);
server.optChooser.choices.push_back(make_pair(0,optim));
Layout::Node *n = working.create_node();
gd<NodeGeom>(n).pos = Coord(50,50);
queue.InsNode(n);
gd<NodeGeom>(n).pos = Coord(200,200);
queue.ModNode(n,DG_UPD_MOVE);
server.Process(queue)
Layout::node_iter ni;
for(ni = Q.modN.nodes().begin(); ni!=Q.modN.nodes().end(); ++ni)
;// move graphical object associated with *ni to gd<NodeGeom>(*ni).pos;
DG_SPLINELEVEL_VNODE | Draw the straight lines between nodes in the internal model. |
---|---|
DG_SPLINELEVEL_BOUNDS | Draw the bounds along the edge routes that will be used for the spline. |
DG_SPLINELEVEL_SHORTEST | Draw the shortest straight-line paths within the bounds. |
DG_SPLINELEVEL_SPLINE | Draw edges with Bezier curves (default). |
DG_NONAIL | The node can be positioned at the server's discretion. |
---|---|
DG_NAIL_X | The server attempts to keep the node at the same X position. |
DG_NAIL_Y | The Y position (rank) is fixed. |
DG_NAIL_BOTH | The node is immobile. |