Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
SEGV_ForceModel.h
Go to the documentation of this file.
1
32#pragma once
33
36
37namespace ogdf {
38
40 : public spring_embedder::CommonForceModelBase<NodeInfo> {
41public:
42 ForceModelBase(const Array<NodeInfo>& vInfo, const Array<int>& adjLists,
44 : spring_embedder::CommonForceModelBase<NodeInfo>(vInfo, adjLists, idealEdgeLength)
45 , m_gridCell(gridCell) { }
46
47 virtual ~ForceModelBase() { }
48
49 virtual DPoint computeDisplacement(int j, double boxLength) const = 0;
50
51protected:
53
55 int normExponent = 1) const;
57 std::function<DPoint(double, const DPoint&)> attractiveChange,
58 std::function<double()> attractiveFinal) const;
59};
60
62public:
63 ForceModelFR(const Array<NodeInfo>& vInfo, const Array<int>& adjLists,
65 : ForceModelBase(vInfo, adjLists, gridCell, idealEdgeLength) { }
66
67 DPoint computeDisplacement(int j, double boxLength) const override;
68};
69
71public:
72 ForceModelFRModAttr(const Array<NodeInfo>& vInfo, const Array<int>& adjLists,
74 : ForceModelBase(vInfo, adjLists, gridCell, idealEdgeLength) { }
75
76 DPoint computeDisplacement(int j, double boxLength) const override;
77};
78
80public:
81 ForceModelFRModRep(const Array<NodeInfo>& vInfo, const Array<int>& adjLists,
83 : ForceModelBase(vInfo, adjLists, gridCell, idealEdgeLength) { }
84
85 DPoint computeDisplacement(int j, double boxLength) const override;
86};
87
89public:
90 ForceModelEades(const Array<NodeInfo>& vInfo, const Array<int>& adjLists,
92 : ForceModelBase(vInfo, adjLists, gridCell, idealEdgeLength) { }
93
94 DPoint computeDisplacement(int j, double boxLength) const override;
95};
96
98public:
99 ForceModelHachul(const Array<NodeInfo>& vInfo, const Array<int>& adjLists,
101 : ForceModelBase(vInfo, adjLists, gridCell, idealEdgeLength) { }
102
103 DPoint computeDisplacement(int j, double boxLength) const override;
104};
105
107public:
108 ForceModelGronemann(const Array<NodeInfo>& vInfo, const Array<int>& adjLists,
110 : ForceModelBase(vInfo, adjLists, gridCell, idealEdgeLength) { }
111
112 DPoint computeDisplacement(int j, double boxLength) const override;
113};
114
115}
Declaration of ogdf::SpringEmbedderGridVariant.
The parameterized class Array2D implements dynamic two-dimensional arrays.
Definition Array2D.h:47
The parameterized class Array implements dynamic arrays of type E.
Definition Array.h:214
Doubly linked lists.
Definition List.h:217
ForceModelBase(const Array< NodeInfo > &vInfo, const Array< int > &adjLists, const Array2D< ListPure< int > > &gridCell, double idealEdgeLength)
virtual DPoint computeDisplacement(int j, double boxLength) const =0
DPoint computeMixedForcesDisplacement(int j, int boxLength, std::function< DPoint(double, const DPoint &)> attractiveChange, std::function< double()> attractiveFinal) const
const Array2D< ListPure< int > > & m_gridCell
DPoint computeRepulsiveForce(int j, double boxLength, int idealExponent, int normExponent=1) const
DPoint computeDisplacement(int j, double boxLength) const override
ForceModelEades(const Array< NodeInfo > &vInfo, const Array< int > &adjLists, const Array2D< ListPure< int > > &gridCell, double idealEdgeLength)
ForceModelFR(const Array< NodeInfo > &vInfo, const Array< int > &adjLists, const Array2D< ListPure< int > > &gridCell, double idealEdgeLength)
DPoint computeDisplacement(int j, double boxLength) const override
ForceModelFRModAttr(const Array< NodeInfo > &vInfo, const Array< int > &adjLists, const Array2D< ListPure< int > > &gridCell, double idealEdgeLength)
DPoint computeDisplacement(int j, double boxLength) const override
ForceModelFRModRep(const Array< NodeInfo > &vInfo, const Array< int > &adjLists, const Array2D< ListPure< int > > &gridCell, double idealEdgeLength)
DPoint computeDisplacement(int j, double boxLength) const override
ForceModelGronemann(const Array< NodeInfo > &vInfo, const Array< int > &adjLists, const Array2D< ListPure< int > > &gridCell, double idealEdgeLength)
DPoint computeDisplacement(int j, double boxLength) const override
ForceModelHachul(const Array< NodeInfo > &vInfo, const Array< int > &adjLists, const Array2D< ListPure< int > > &gridCell, double idealEdgeLength)
DPoint computeDisplacement(int j, double boxLength) const override
CommonForceModelBase(const Array< NodeInfo > &vInfo, const Array< int > &adjLists, double idealEdgeLength)
Definition common.h:43
double idealEdgeLength() const
Returns the current setting of ideal edge length.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.
GenericPoint< double > DPoint
Representing two-dimensional point with real coordinates.
Definition geometry.h:236
Common implementations of force models for SpringEmbedder algorithms.