#include <ogdf/energybased/davidson_harel/NodePairEnergy.h>
Public Member Functions | |
NodePairEnergy (const string energyname, GraphAttributes &AG) | |
virtual | ~NodePairEnergy () |
void | computeEnergy () override |
computes energy for the layout at the beginning of the optimization process | |
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 | |
Protected Member Functions | |
bool | adjacent (const node v, const node w) const |
returns true in constant time if two vertices are adjacent. | |
virtual double | computeCoordEnergy (node, node, const DPoint &, const DPoint &) const =0 |
Computes the energy stored by a pair of vertices at the given positions. | |
int | nodeNum (node v) const |
Returns the internal number given to each vertex. | |
const DIntersectableRect & | shape (const node v) const |
Returns the shape of a vertex v as a DIntersectableRect. | |
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 | |
Private Member Functions | |
void | compCandEnergy () override |
computes the energy if m_testNode changes position to m_testX and m_testY, sets the value of m_candidateEnergy. | |
double | computePairEnergy (const node v, const node w) const |
void | internalCandidateTaken () override |
changes the data of a specific energy function if the candidate was taken | |
Private Attributes | |
const AdjacencyOracle | m_adjacentOracle |
NodeArray< double > | m_candPairEnergy |
NodeArray< int > * | m_nodeNums |
List< node > | m_nonIsolated |
Array2D< double > * | m_pairEnergy |
NodeArray< DIntersectableRect > | m_shape |
Additional Inherited Members | |
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 43 of file NodePairEnergy.h.
ogdf::davidson_harel::NodePairEnergy::NodePairEnergy | ( | const string | energyname, |
GraphAttributes & | AG | ||
) |
|
inlinevirtual |
Definition at line 48 of file NodePairEnergy.h.
|
inlineprotected |
returns true in constant time if two vertices are adjacent.
Definition at line 64 of file NodePairEnergy.h.
|
overrideprivatevirtual |
computes the energy if m_testNode changes position to m_testX and m_testY, sets the value of m_candidateEnergy.
Implements ogdf::davidson_harel::EnergyFunction.
|
protectedpure virtual |
Computes the energy stored by a pair of vertices at the given positions.
Implemented in ogdf::davidson_harel::Attraction, ogdf::davidson_harel::Overlap, and ogdf::davidson_harel::Repulsion.
|
overridevirtual |
computes energy for the layout at the beginning of the optimization process
Implements ogdf::davidson_harel::EnergyFunction.
|
private |
|
overrideprivatevirtual |
changes the data of a specific energy function if the candidate was taken
Implements ogdf::davidson_harel::EnergyFunction.
Returns the internal number given to each vertex.
Definition at line 61 of file NodePairEnergy.h.
|
inlineprotected |
Returns the shape of a vertex v
as a DIntersectableRect.
Definition at line 67 of file NodePairEnergy.h.
|
private |
Definition at line 81 of file NodePairEnergy.h.
Definition at line 76 of file NodePairEnergy.h.
Definition at line 74 of file NodePairEnergy.h.
Definition at line 80 of file NodePairEnergy.h.
Definition at line 75 of file NodePairEnergy.h.
|
private |
Definition at line 78 of file NodePairEnergy.h.