#include <ogdf/planarlayout/SchnyderLayout.h>
Inheritance diagram for ogdf::SchnyderLayout:Public Member Functions | |
| SchnyderLayout () | |
Public Member Functions inherited from ogdf::PlanarGridLayoutModule | |
| PlanarGridLayoutModule () | |
| Initializes a planar grid layout module. | |
| virtual | ~PlanarGridLayoutModule () |
| void | callFixEmbed (GraphAttributes &AG, adjEntry adjExternal=0) |
| Calls the grid layout algorithm with a fixed planar embedding (general call). | |
| void | callGridFixEmbed (const Graph &G, GridLayout &gridLayout, adjEntry adjExternal=0) |
| Calls the grid layout algorithm with a fixed planar embedding (call for GridLayout). | |
Public Member Functions inherited from ogdf::GridLayoutModule | |
| GridLayoutModule () | |
| Initializes a grid layout module. | |
| virtual | ~GridLayoutModule () |
| void | call (GraphAttributes &AG) |
| Calls the grid layout algorithm (general call). | |
| void | callGrid (const Graph &G, GridLayout &gridLayout) |
| Calls the grid layout algorithm (call for GridLayout). | |
| const IPoint & | gridBoundingBox () const |
| double | separation () const |
| Returns the current setting of the minimum distance between nodes. | |
| void | separation (double sep) |
| Sets the minimum distance between nodes. | |
Public Member Functions inherited from ogdf::LayoutModule | |
| LayoutModule () | |
| Initializes a layout module. | |
| virtual | ~LayoutModule () |
| virtual void | call (GraphAttributes &GA, GraphConstraints &GC) |
| Computes a layout of graph GA wrt the constraints in GC (if applicable). | |
| void | operator() (GraphAttributes &GA) |
| Computes a layout of graph GA. | |
Protected Member Functions | |
| void | doCall (const Graph &G, adjEntry adjExternal, GridLayout &gridLayout, IPoint &boundingBox, bool fixEmbedding) |
| Implements the algorithm call. | |
Protected Member Functions inherited from ogdf::PlanarGridLayoutModule | |
| virtual void | doCall (const Graph &G, GridLayout &gridLayout, IPoint &boundingBox) |
| Implements the algorithm call. | |
Private Member Functions | |
| void | contract (Graph &G, node a, node b, node c, List< node > &L) |
| void | prefixSum (EdgeArray< int > &rValues, int i, node r, const NodeArray< int > &val, NodeArray< int > &sum) |
| void | realizer (GraphCopy &G, const List< node > &L, node a, node b, node c, EdgeArray< int > &rValues, GraphCopy &T) |
| void | schnyderEmbedding (GraphCopy &GC, GridLayout &gridLayout, adjEntry adjExternal) |
| void | subtreeSizes (EdgeArray< int > &rValues, int i, node r, NodeArray< int > &size) |
The class SchnyderLayout represents the layout algorithm by Schnyder [Sch90]. This algorithm draws a planar graph G straight-line without crossings. G must not contain self-loops or multiple edges. The grid layout size is (n − 2) × (n − 2) for a graph with n nodes (n ≥ 3). The algorithm runs in three phases. In the first phase, the graph is augmented by adding new artificial edges to get a triangulated plane graph. Then, a partition of the set of interior edges in three trees (also called Schnyder trees) with special orientation properties is derived. In the third step, the actual coordinates are computed.
Definition at line 71 of file SchnyderLayout.h.
| ogdf::SchnyderLayout::SchnyderLayout | ( | ) |
|
protectedvirtual |
Implements the algorithm call.
A derived algorithm must implement this method and return the computed grid layout in gridLayout.
| G | is the input graph. |
| adjExternal | is an adjacency entry on the external face, or 0 if no external face is specified. |
| gridLayout | is assigned the computed grid layout. |
| boundingBox | returns the bounding box of the grid layout. The lower left corner of the bounding box is always (0,0), thus this IPoint defines the upper right corner as well as the width and height of the grid layout. |
| fixEmbedding | determines if the input graph is embedded and that embedding has to be preserved (true), or if an embedding needs to be computed (false). |
Implements ogdf::PlanarGridLayoutModule.
|
private |
|
private |
|
private |
|
private |