25 #ifndef DIALECT_TREES_H 26 #define DIALECT_TREES_H 35 #include "libdialect/graphs.h" 36 #include "libdialect/commontypes.h" 37 #include "libdialect/ortho.h" 38 #include "libdialect/opts.h" 39 #include "libdialect/util.h" 40 #include "libdialect/routing.h" 51 Tree(Graph_SP G, Node_SP root);
62 void symmetricLayout(CardinalDir growthDir,
double nodeSep,
double rankSep,
63 bool convexOrdering =
true);
77 void rotate(CardinalDir dg);
81 void rotateGrowthDirCW(
unsigned quarterTurns);
84 Graph_SP underlyingGraph(
void)
const {
return m_graph; }
87 Node_SP getRootNode(
void)
const {
return m_root; }
91 std::string repr(
void)
const;
94 id_type getRootNodeID(
void)
const {
return m_root->id(); }
102 bool isSymmetrical(
void)
const {
return m_isSymmetric; }
116 Node_SP buildRootlessBox(CardinalDir growthDir)
const;
119 size_t size(
void)
const {
return m_nodes.size(); }
130 void addNetworkToRoutingAdapter(RoutingAdapter &ra,
TreeRoutingType trt, Graph_SP core =
nullptr);
139 void addNetwork(Graph &G, NodesById &treeNodes, EdgesById &treeEdges);
147 void addConstraints(Graph &G,
bool alignRoot);
154 void addBufferNodesAndConstraints(Graph &G, NodesById &bufferNodes);
158 void clearRankBounds(
void);
159 std::vector<double> getBounds(
unsigned rank,
double nodeSep)
const;
160 Trees getCTrees(
void)
const;
161 std::string computeIsomString(
void)
const;
178 std::set<unsigned> m_leafIDs;
180 std::vector<Nodes> m_nodesByRank;
182 std::vector<Nodes> m_leavesByRank;
183 std::vector<Nodes> m_nonleavesByRank;
185 std::map<id_type, unsigned> m_rankByNodeID;
192 std::vector<std::vector<double>> m_boundsByRank;
201 bool m_boundaryTight;
203 CardinalDir m_growthDir;
208 #endif // DIALECT_TREES_H libdialect: A library for computing human-like orthogonal network (DiAlEcT) layouts.
Definition: cola.h:44
Contains the interface for various geometry types and classes.
The Point class defines a point in the plane.
Definition: geomtypes.h:52
TreeRoutingType
Definition: opts.h:50