Tutte's layout algorithm. More...
#include <ogdf/energybased/TutteLayout.h>
Public Member Functions | |
TutteLayout () | |
DRect | bbox () const |
void | bbox (const DRect &bb) |
virtual void | call (GraphAttributes &AG) override |
Computes a layout of graph GA . More... | |
void | call (GraphAttributes &AG, const List< node > &givenNodes) |
Public Member Functions inherited from ogdf::LayoutModule | |
LayoutModule () | |
Initializes a layout module. More... | |
virtual | ~LayoutModule () |
void | operator() (GraphAttributes &GA) |
Computes a layout of graph GA . More... | |
Private Member Functions | |
bool | doCall (GraphAttributes &AG, const List< node > &fixedNodes, List< DPoint > &fixedPositions) |
void | setFixedNodes (const Graph &G, List< node > &nodes, const List< node > &givenNodes, List< DPoint > &pos, double radius=1.0) |
sets the positions of the nodes in a largest face of $G$ in the form of a regular $k$-gon with the prescribed radius. More... | |
void | setFixedNodes (const Graph &G, List< node > &nodes, List< DPoint > &pos, double radius=1.0) |
Static Private Member Functions | |
static bool | solveLP (int cols, const CoinPackedMatrix &Matrix, const Array< double > &rightHandSide, Array< double > &x) |
Private Attributes | |
DRect | m_bbox |
Tutte's layout algorithm.
This algorithm draws a planar graph straight-line without crossings.
The idea of the algorithm is to place every vertex into the center of gravity by its neighbours.
See "How to draw a graph" by W. T. Tutte (1962) for details.
Definition at line 63 of file TutteLayout.h.
ogdf::TutteLayout::TutteLayout | ( | ) |
|
inline |
Definition at line 67 of file TutteLayout.h.
|
inline |
Definition at line 69 of file TutteLayout.h.
|
overridevirtual |
Computes a layout of graph GA
.
This method is the actual algorithm call and must be implemented by derived classes.
GA | is the input graph and will also be assigned the layout information. |
Implements ogdf::LayoutModule.
void ogdf::TutteLayout::call | ( | GraphAttributes & | AG, |
const List< node > & | givenNodes | ||
) |
|
private |
|
private |
sets the positions of the nodes in a largest face of $G$ in the form of a regular $k$-gon with the prescribed radius.
The corresponding nodes and their positions are stored in nodes and pos, respectively. $G$ does not have to be planar!
|
private |
|
staticprivate |
|
private |
Definition at line 90 of file TutteLayout.h.