Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

FruchtermanReingold.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/Graph.h>
35 #include <ogdf/basic/geometry.h>
36 #include <ogdf/basic/NodeArray.h>
39 
40 namespace ogdf {
41 namespace energybased {
42 namespace fmmm {
43 
45 {
46 public:
49 
51  void calculate_exact_repulsive_forces(
52  const Graph &G,
54  NodeArray<DPoint>& F_rep);
55 
57  void calculate_approx_repulsive_forces(
58  const Graph &G,
60  NodeArray<DPoint>& F_rep);
61 
63  void make_initialisations (
64  double boxlength,
65  DPoint down_left_corner,
66  int grid_quotient);
67 
70  boxlength = b_l; down_left_corner = d_l_c;
71  }
72 
73 private:
76  double boxlength;
78 
80  double f_rep_scalar (double d);
81 
84  void grid_quotient(int p) { _grid_quotient = ((0<=p) ? p : 2);}
85  int grid_quotient() const {return _grid_quotient;}
86 };
87 
88 }
89 }
90 }
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:472
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
void grid_quotient(int p)
The number k of rows and colums of the grid is sqrt(|V|) / frGridQuotient() (Note that in [FrRe] frGr...
Real points.
Definition: geometry.h:219
Dynamic arrays indexed with nodes.
Definition: Graph_d.h:423
Declaration of class EdgeAttributes.
int max_gridindex
maximum index of a grid row/column
Declaration and implementation of NodeArray class.
Declaration of class NodeAttributes.
Includes declaration of graph class.
DPoint down_left_corner
down left corner of drawing box
void update_boxlength_and_cornercoordinate(double b_l, DPoint d_l_c)
Import updated information of the drawing area.
The namespace for all OGDF objects.
Declaration of classes DPoint, DPolyline, DLine, DRect, DIntersectableRect, DScaler.
int _grid_quotient
for coarsening the FrRe-grid