Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
SchnyderLayout.h
Go to the documentation of this file.
1
33#pragma once
34
35#include <ogdf/basic/Graph.h>
36#include <ogdf/basic/basic.h>
37#include <ogdf/basic/geometry.h>
39
40namespace ogdf {
41class GraphCopy;
42class GridLayout;
43template<class E>
44class List;
45
66public:
68
75 VerticesMinusDepth,
79 Faces
82 };
83
85 CombinatorialObjects getCombinatorialObjects() { return m_combinatorialObjects; }
86
88 void setCombinatorialObjects(CombinatorialObjects combinatorialObjects) {
89 m_combinatorialObjects = combinatorialObjects;
90 }
91
92protected:
93 virtual void doCall(const Graph& G, adjEntry adjExternal, GridLayout& gridLayout,
94 IPoint& boundingBox, bool fixEmbedding) override;
95
96private:
97 void contract(Graph& G, node a, node b, node c, List<node>& L);
98
99 void realizer(GraphCopy& G, const List<node>& L, node a, node b, node c,
100 EdgeArray<int>& rValues, GraphCopy& T);
101
102 void subtreeSizes(EdgeArray<int>& rValues, int i, node r, NodeArray<int>& size);
103
104 void prefixSum(EdgeArray<int>& rValues, int i, node r, const NodeArray<int>& val,
105 NodeArray<int>& sum);
106
107 void schnyderEmbedding(GraphCopy& GC, GridLayout& gridLayout, adjEntry adjExternal);
108
111};
112
113}
Includes declaration of graph class.
Declaration of interface for grid layout algorithms.
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
Basic declarations, included by all source files.
Class for adjacency list elements.
Definition Graph_d.h:143
Copies of graphs supporting edge splitting.
Definition GraphCopy.h:390
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:866
Representation of a graph's grid layout.
Definition GridLayout.h:47
Doubly linked lists (maintaining the length of the list).
Definition List.h:1451
Class for the representation of nodes.
Definition Graph_d.h:241
Base class for planar grid layout algorithms.
The class SchnyderLayout represents the layout algorithm by Schnyder [Sch90].
void schnyderEmbedding(GraphCopy &GC, GridLayout &gridLayout, adjEntry adjExternal)
void setCombinatorialObjects(CombinatorialObjects combinatorialObjects)
Sets the type of combinatorial objects whose number corresponds to the node coordinates.
void contract(Graph &G, node a, node b, node c, List< node > &L)
CombinatorialObjects m_combinatorialObjects
Determines how the barycentric coordinates of each node are computed.
void subtreeSizes(EdgeArray< int > &rValues, int i, node r, NodeArray< int > &size)
CombinatorialObjects
Each node in a Schnyder wood splits the graph into three regions.
void realizer(GraphCopy &G, const List< node > &L, node a, node b, node c, EdgeArray< int > &rValues, GraphCopy &T)
CombinatorialObjects getCombinatorialObjects()
Returns the type of combinatorial objects whose number corresponds to the node coordinates.
virtual void doCall(const Graph &G, adjEntry adjExternal, GridLayout &gridLayout, IPoint &boundingBox, bool fixEmbedding) override
Implements the algorithm call.
void prefixSum(EdgeArray< int > &rValues, int i, node r, const NodeArray< int > &val, NodeArray< int > &sum)
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition Graph_d.h:717
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition Graph_d.h:659
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
The namespace for all OGDF objects.