#include <ogdf/energybased/davidson_harel/Planarity.h>
Classes | |
struct | ChangedCrossing |
Public Member Functions | |
Planarity (GraphAttributes &AG) | |
Initializes data structures to speed up later computations. | |
~Planarity () | |
void | computeEnergy () override |
Computes energy of initial layout and stores it in m_energy. | |
Public Member Functions inherited from ogdf::davidson_harel::EnergyFunction | |
EnergyFunction (const string &funcname, GraphAttributes &AG) | |
Initializes data dtructures to speed up later computations. | |
virtual | ~EnergyFunction () |
void | candidateTaken () |
Changes m_currentX and m_currentY by setting the position of m_testNode to m_testX and m_testY. Sets m_energy to m_candidateEnergy. Computes the energy of the layout stored in AG. | |
double | computeCandidateEnergy (const node v, const DPoint &newPos) |
sets m_testNode, m_testX and m_testY and computes the energy for the new configuration (vertex v moves to newPos) | |
double | energy () const |
string | getName () const |
prints the name of the energy function | |
Private Member Functions | |
void | compCandEnergy () override |
Computes energy of candidate. | |
void | internalCandidateTaken () override |
Changes internal data if candidate is taken. | |
bool | intersect (const edge, const edge) const |
Returns 1 if edges cross else 0. | |
bool | lowLevelIntersect (const DPoint &, const DPoint &, const DPoint &, const DPoint &) const |
Tests if two lines given by four points intersect. | |
Private Attributes | |
List< ChangedCrossing > | m_crossingChanges |
stores for all edges incident to the test node an array with the crossings that change if the candidate position is chosen | |
Array2D< bool > * | m_crossingMatrix |
stores for each pair of edges if they cross | |
EdgeArray< int > * | m_edgeNums |
numbers of edges | |
List< edge > | m_nonSelfLoops |
list of edges that are not slef loops | |
Additional Inherited Members | |
Protected Member Functions inherited from ogdf::davidson_harel::EnergyFunction | |
DPoint | currentPos (const node v) const |
returns the current position of vertex v | |
node | testNode () const |
returns the vertex that is under consideration in the current step | |
DPoint | testPos () |
returns candidate position for the node to be moved | |
Protected Attributes inherited from ogdf::davidson_harel::EnergyFunction | |
double | m_candidateEnergy |
the energy of the layout if the candidate layout is chosen | |
double | m_energy |
energy of the current layout | |
const Graph & | m_G |
the graph that should be drawn | |
const string | m_name |
name of the energy function | |
Definition at line 42 of file Planarity.h.
|
explicit |
Initializes data structures to speed up later computations.
ogdf::davidson_harel::Planarity::~Planarity | ( | ) |
|
overrideprivatevirtual |
Computes energy of candidate.
Implements ogdf::davidson_harel::EnergyFunction.
|
overridevirtual |
Computes energy of initial layout and stores it in m_energy.
Implements ogdf::davidson_harel::EnergyFunction.
|
overrideprivatevirtual |
Changes internal data if candidate is taken.
Implements ogdf::davidson_harel::EnergyFunction.
Returns 1 if edges cross else 0.
|
private |
Tests if two lines given by four points intersect.
|
private |
stores for all edges incident to the test node an array with the crossings that change if the candidate position is chosen
Definition at line 82 of file Planarity.h.
stores for each pair of edges if they cross
Definition at line 76 of file Planarity.h.
numbers of edges
Definition at line 75 of file Planarity.h.
list of edges that are not slef loops
Definition at line 84 of file Planarity.h.