Open
Graph Drawing
Framework

 v.2010.10
 

Public Member Functions | Private Member Functions | Private Attributes

ogdf::Attraction Class Reference

Energy function for attraction between two adjacent vertices. More...

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

Inheritance diagram for ogdf::Attraction:
ogdf::NodePairEnergy ogdf::EnergyFunction

List of all members.

Public Member Functions

 Attraction (GraphAttributes &AG)
 ~Attraction ()
void setPreferredEdgelength (double l)
 set the preferred edge length to the absolute value l
void reinitializeEdgeLength (double multi)
 set multiplier for the edge length with repspect to node size to multi

Private Member Functions

double computeCoordEnergy (node, node, const DPoint &, const DPoint &) const
 computes the energy contributed by the two nodes if they are placed at the two given positions

Private Attributes

double m_preferredEdgeLength
 the length that that all edges should ideally have

Detailed Description

Energy function for attraction between two adjacent vertices.

Implements an energy function that simulates attraction between two adjacent vertices. There is an optimum distance where the energy is zero. The energy grows quadratic with the difference to the optimum distance. The optimum distance between two adjacent vertices depends on the size of the two vertices.

Definition at line 77 of file Attraction.h.


Constructor & Destructor Documentation

ogdf::Attraction::Attraction ( GraphAttributes AG  ) 
ogdf::Attraction::~Attraction (  )  [inline]

Definition at line 69 of file Attraction.h.


Member Function Documentation

double ogdf::Attraction::computeCoordEnergy ( node  ,
node  ,
const DPoint ,
const DPoint  
) const [private, virtual]

computes the energy contributed by the two nodes if they are placed at the two given positions

Implements ogdf::NodePairEnergy.

void ogdf::Attraction::reinitializeEdgeLength ( double  multi  ) 

set multiplier for the edge length with repspect to node size to multi

void ogdf::Attraction::setPreferredEdgelength ( double  l  )  [inline]

set the preferred edge length to the absolute value l

Definition at line 71 of file Attraction.h.


Member Data Documentation

the length that that all edges should ideally have

Definition at line 79 of file Attraction.h.


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