Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
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.
 
 ~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< ChangedCrossingm_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< edgem_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 Graphm_G
 the graph that should be drawn
 
const string m_name
 name of the energy function
 

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.

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: