Open
Graph Drawing
Framework

 v.2012.07
 

ogdf::NodePairEnergy Class Reference

#include <ogdf/internal/energybased/NodePairEnergy.h>

+ Inheritance diagram for ogdf::NodePairEnergy:

List of all members.

Public Member Functions

 NodePairEnergy (const String energyname, GraphAttributes &AG)
virtual ~NodePairEnergy ()
void computeEnergy ()
 computes energy for the layout at the beginning of the optimization process
- Public Member Functions inherited from ogdf::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
virtual double computeCoordEnergy (node, node, const DPoint &, const DPoint &) const =0
int nodeNum (node v) const
const IntersectionRectangleshape (const node v) const
- Protected Member Functions inherited from ogdf::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 ()
 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 ()
 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< nodem_nonIsolated
Array2D< double > * m_pairEnergy
NodeArray< IntersectionRectanglem_shape

Additional Inherited Members

- Protected Attributes inherited from ogdf::EnergyFunction
double m_candidateEnergy
 the energy of the layout if the candidate layout is chosen
double m_energy
const Graphm_G
 the graph that should be drawn
const String m_name
 name of the energy function

Detailed Description

Definition at line 61 of file NodePairEnergy.h.


Constructor & Destructor Documentation

ogdf::NodePairEnergy::NodePairEnergy ( const String  energyname,
GraphAttributes AG 
)
virtual ogdf::NodePairEnergy::~NodePairEnergy ( )
inlinevirtual

Definition at line 65 of file NodePairEnergy.h.


Member Function Documentation

bool ogdf::NodePairEnergy::adjacent ( const node  v,
const node  w 
) const
inlineprotected

Definition at line 74 of file NodePairEnergy.h.

void ogdf::NodePairEnergy::compCandEnergy ( )
privatevirtual

computes the energy if m_testNode changes position to m_testX and m_testY, sets the value of m_candidateEnergy.

Implements ogdf::EnergyFunction.

virtual double ogdf::NodePairEnergy::computeCoordEnergy ( node  ,
node  ,
const DPoint ,
const DPoint  
) const
protectedpure virtual
void ogdf::NodePairEnergy::computeEnergy ( )
virtual

computes energy for the layout at the beginning of the optimization process

Implements ogdf::EnergyFunction.

double ogdf::NodePairEnergy::computePairEnergy ( const node  v,
const node  w 
) const
private
void ogdf::NodePairEnergy::internalCandidateTaken ( )
privatevirtual

changes the data of a specific energy function if the candidate was taken

Implements ogdf::EnergyFunction.

int ogdf::NodePairEnergy::nodeNum ( node  v) const
inlineprotected

Definition at line 72 of file NodePairEnergy.h.

const IntersectionRectangle& ogdf::NodePairEnergy::shape ( const node  v) const
inlineprotected

Definition at line 76 of file NodePairEnergy.h.


Member Data Documentation

const AdjacencyOracle ogdf::NodePairEnergy::m_adjacentOracle
private

Definition at line 90 of file NodePairEnergy.h.

NodeArray<double> ogdf::NodePairEnergy::m_candPairEnergy
private

Definition at line 85 of file NodePairEnergy.h.

NodeArray<int>* ogdf::NodePairEnergy::m_nodeNums
private

Definition at line 83 of file NodePairEnergy.h.

List<node> ogdf::NodePairEnergy::m_nonIsolated
private

Definition at line 89 of file NodePairEnergy.h.

Array2D<double>* ogdf::NodePairEnergy::m_pairEnergy
private

Definition at line 84 of file NodePairEnergy.h.

NodeArray<IntersectionRectangle> ogdf::NodePairEnergy::m_shape
private

Definition at line 87 of file NodePairEnergy.h.


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