Adaptagrams
|
This class can be passed to libcola to replace some functionality to provide topology preserving layout. More...
#include <cola_topology_addon.h>
Public Member Functions | |
ColaTopologyAddon () | |
Constructs an empty ColaTopologyAddon instance for collecting topology information. More... | |
ColaTopologyAddon (topology::Nodes &tnodes, topology::Edges &routes) | |
Constructs a ColaTopologyAddon instance with a specified set of topology information. More... | |
void | writeSVGFile (std::string filename=std::string()) |
Writes an SVG file displaying the current topology of the nodes and edges. More... | |
Public Attributes | |
topology::Nodes | topologyNodes |
Topology information: node positions and sizes. | |
topology::Edges | topologyRoutes |
Topology information: edges routes. | |
This class can be passed to libcola to replace some functionality to provide topology preserving layout.
You should instantiate this class with a given set of nodes and edges to preserve and pass it to cola::ConstrainedFDLayout::setTopology().
topology::ColaTopologyAddon::ColaTopologyAddon | ( | ) |
Constructs an empty ColaTopologyAddon instance for collecting topology information.
Passing libcola an empty instance of this class will cause libcola to populate it with current topology information for nodes and edges when cola::ConstrainedFDLayout::makeFeasible() is run. This information is then available in the topologyNodes and topologyRoutes member variables.
topology::ColaTopologyAddon::ColaTopologyAddon | ( | topology::Nodes & | tnodes, |
topology::Edges & | routes | ||
) |
Constructs a ColaTopologyAddon instance with a specified set of topology information.
Passing libcola an instance of this class with given topology information will cause libcola to generate topology preserving constraints to prevent nodes from crossing edges, and for the topology of the network to be preserved during layout.
This topology information is usually not constructed from scratch but rather extracted from an empty ColaTopologyAddon instance after COLA has determined a feasible layout for it.
[in] | tnodes | Topology information for nodes. |
[in] | routes | Topology information for edges. |
void topology::ColaTopologyAddon::writeSVGFile | ( | std::string | filename = std::string() | ) |
Writes an SVG file displaying the current topology of the nodes and edges.
[in] | filename | A string indicating the filename (without extension) for the output file. Defaults to "libtopology-cola.svg" if no filename is given. |
References topologyNodes, and topologyRoutes.