Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

Attraction.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 
36 namespace ogdf {
37 namespace davidson_harel {
38 
40 
48 class Attraction: public NodePairEnergy {
49 public:
50  //Initializes data structures to speed up later computations
51  explicit Attraction(GraphAttributes &AG);
56  void reinitializeEdgeLength(double multi);
57 #ifdef OGDF_DEBUG
58  void printInternalData() const override;
59 #endif
60 private:
62  static const double MULTIPLIER;
66  double computeCoordEnergy(node,node, const DPoint&, const DPoint &) const override;
67 };
68 
69 }}
static const double MULTIPLIER
Average length and height of nodes is multiplied by this factor to get preferred edge length...
Definition: Attraction.h:62
double m_preferredEdgeLength
the length that that all edges should ideally have
Definition: Attraction.h:64
Attraction(GraphAttributes &AG)
Real points.
Definition: geometry.h:219
void setPreferredEdgelength(double l)
set the preferred edge length to the absolute value l
Definition: Attraction.h:54
double computeCoordEnergy(node, node, const DPoint &, const DPoint &) const override
computes the energy contributed by the two nodes if they are placed at the two given positions ...
Stores additional attributes of a graph (like layout information).
Class for the representation of nodes.
Definition: Graph_d.h:167
Declares class NodePairEnergy which implements an energy function where the energy of a layout depend...
Energy function for attraction between two adjacent vertices.
Definition: Attraction.h:48
void reinitializeEdgeLength(double multi)
set multiplier for the edge length with repspect to node size to multi
The namespace for all OGDF objects.