Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ogdf::davidson_harel::Planarity Class Reference

#include <ogdf/energybased/davidson_harel/Planarity.h>

+ Inheritance diagram for ogdf::davidson_harel::Planarity:

Classes

struct  ChangedCrossing
 

Public Member Functions

 Planarity (GraphAttributes &AG)
 Initializes data structures to speed up later computations. More...
 
 ~Planarity ()
 
void computeEnergy () override
 Computes energy of initial layout and stores it in m_energy. More...
 
- Public Member Functions inherited from ogdf::davidson_harel::EnergyFunction
 EnergyFunction (const string &funcname, GraphAttributes &AG)
 Initializes data dtructures to speed up later computations. More...
 
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. More...
 
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) More...
 
double energy () const
 
string getName () const
 prints the name of the energy function More...
 
void printStatus () const
 prints status information for debugging More...
 

Private Member Functions

void compCandEnergy () override
 Computes energy of candidate. More...
 
void internalCandidateTaken () override
 Changes internal data if candidate is taken. More...
 
bool intersect (const edge, const edge) const
 Returns 1 if edges cross else 0. More...
 
bool lowLevelIntersect (const DPoint &, const DPoint &, const DPoint &, const DPoint &) const
 Tests if two lines given by four points intersect. More...
 
virtual void printInternalData () const override
 

Private Attributes

List< ChangedCrossingm_crossingChanges
 stores for all edges incident to the test node an array with the crossings that change if the candidate position is chosen More...
 
Array2D< bool > * m_crossingMatrix
 stores for each pair of edges if they cross More...
 
EdgeArray< int > * m_edgeNums
 numbers of edges More...
 
List< edgem_nonSelfLoops
 list of edges that are not slef loops More...
 

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 More...
 
node testNode () const
 returns the vertex that is under consideration in the current step More...
 
DPoint testPos ()
 returns candidate position for the node to be moved More...
 
- Protected Attributes inherited from ogdf::davidson_harel::EnergyFunction
double m_candidateEnergy
 the energy of the layout if the candidate layout is chosen More...
 
double m_energy
 energy of the current layout More...
 
const Graphm_G
 the graph that should be drawn More...
 
const string m_name
 name of the energy function More...
 

Detailed Description

Definition at line 42 of file Planarity.h.

Constructor & Destructor Documentation

◆ Planarity()

ogdf::davidson_harel::Planarity::Planarity ( GraphAttributes AG)
explicit

Initializes data structures to speed up later computations.

◆ ~Planarity()

ogdf::davidson_harel::Planarity::~Planarity ( )

Member Function Documentation

◆ compCandEnergy()

void ogdf::davidson_harel::Planarity::compCandEnergy ( )
overrideprivatevirtual

Computes energy of candidate.

Implements ogdf::davidson_harel::EnergyFunction.

◆ computeEnergy()

void ogdf::davidson_harel::Planarity::computeEnergy ( )
overridevirtual

Computes energy of initial layout and stores it in m_energy.

Implements ogdf::davidson_harel::EnergyFunction.

◆ internalCandidateTaken()

void ogdf::davidson_harel::Planarity::internalCandidateTaken ( )
overrideprivatevirtual

Changes internal data if candidate is taken.

Implements ogdf::davidson_harel::EnergyFunction.

◆ intersect()

bool ogdf::davidson_harel::Planarity::intersect ( const  edge,
const  edge 
) const
private

Returns 1 if edges cross else 0.

◆ lowLevelIntersect()

bool ogdf::davidson_harel::Planarity::lowLevelIntersect ( const DPoint ,
const DPoint ,
const DPoint ,
const DPoint  
) const
private

Tests if two lines given by four points intersect.

◆ printInternalData()

virtual void ogdf::davidson_harel::Planarity::printInternalData ( ) const
overrideprivatevirtual

Member Data Documentation

◆ m_crossingChanges

List<ChangedCrossing> ogdf::davidson_harel::Planarity::m_crossingChanges
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.

◆ m_crossingMatrix

Array2D<bool>* ogdf::davidson_harel::Planarity::m_crossingMatrix
private

stores for each pair of edges if they cross

Definition at line 76 of file Planarity.h.

◆ m_edgeNums

EdgeArray<int>* ogdf::davidson_harel::Planarity::m_edgeNums
private

numbers of edges

Definition at line 75 of file Planarity.h.

◆ m_nonSelfLoops

List<edge> ogdf::davidson_harel::Planarity::m_nonSelfLoops
private

list of edges that are not slef loops

Definition at line 84 of file Planarity.h.


The documentation for this class was generated from the following file: