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