41 namespace davidson_harel {
70 void printStatus()
const;
98 virtual void printInternalData()
const = 0;
DPoint m_testPos
New candidate positions for m_testNode.
Declaration of class GraphAttributes which extends a Graph by additional attributes.
void candidateTaken()
Changes m_currentX and m_currentY by setting the position of m_testNode to m_testX and m_testY...
DPoint currentPos(const node v) const
returns the current position of vertex v
Data type for general directed graphs (adjacency list representation).
virtual void compCandEnergy()=0
computes the energy if m_testNode changes position to m_testX and m_testY, sets the value of m_candid...
virtual ~EnergyFunction()
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 move...
double m_candidateEnergy
the energy of the layout if the candidate layout is chosen
virtual void computeEnergy()=0
computes energy for the layout at the beginning of the optimization process
double m_energy
energy of the current layout
The interface for energy functions for the Davidson Harel graph drawing method.
virtual void internalCandidateTaken()=0
changes the data of a specific energy function if the candidate was taken
node testNode() const
returns the vertex that is under consideration in the current step
Stores additional attributes of a graph (like layout information).
DPoint point(node v) const
Returns a DPoint corresponding to the x- and y-coordinates of v.
EnergyFunction(const EnergyFunction &e)
the copy constructor is fake and can not be used.
DPoint testPos()
returns candidate position for the node to be moved
Class for the representation of nodes.
const Graph & m_G
the graph that should be drawn
node m_testNode
The node that changed position in the candidate.
GraphAttributes & m_AG
This stores the graph with its graphical attributes and the current positions for the vertices...
The namespace for all OGDF objects.
const string m_name
name of the energy function
string getName() const
prints the name of the energy function
EnergyFunction & operator=(const EnergyFunction &e)
the assignment operator is fake and can not be used.
EnergyFunction(const string &funcname, GraphAttributes &AG)
Initializes data dtructures to speed up later computations.