|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
51 template<
class E,
class INDEX>
124 void setRandomInitialPlacement(
bool randomInitialPlacement);
127 void setPostProcessing(PostProcessingMode postProcessing);
130 void setBendNormalizationAngle(
double bendNormalizationAngle);
133 void setNumberOfIterations(
int numberOfIterations);
136 void setMinimalTemperature(
double minimalTemperature);
140 void setInitialTemperature(
double initialTemperature);
144 void setTemperatureDecreaseOffset(
double temperatureDecreaseOffset);
147 void setGravitation(
double gravitation);
150 void setOscillationAngle(
double oscillationAngle);
153 void setDesiredMinEdgeLength(
double desiredMinEdgeLength);
156 void setInitDummiesPerEdge(
int initDummiesPerEdge);
160 void setMaxDummiesPerEdge(
int maxDummiesPerEdge);
163 void setDummyInsertionThreshold(
double dummyInsertionThreshold);
166 void setMaxDisturbance(
double maxDisturbance);
169 void setRepulsionDistance(
double repulsionDistance);
172 void setMinDistCC(
double minDistCC);
175 void setPageRatio(
double pageRatio);
365 std::pair<double, double> computeImpulse(
node v);
369 void updateNode(
node v, std::pair<double, double> newImpulse);
377 switch (attr.
shape(v)) {
383 return std::max(attr.
height(v), attr.
width(v)) / 2.0;
388 return std::hypot(attr.
height(v), attr.
width(v)) / 2.0;
400 }
else if (m_copy.
isDummy(v)) {
402 }
else if (m_copy.
isDummy(w)) {
The namespace for all OGDF objects.
Stores additional attributes of a graph (like layout information).
Declaration of class GraphAttributes which extends a Graph by additional attributes.
NodeArray< double > m_impulseY
Y-coordinate of the last impulse of the node.
NodeArray< double > m_localTemperature
Local temperature of the node.
double getPageRatio() const
Returns m_pageRatio.
Includes declaration of graph class.
double m_pageRatio
Page ratio used for the layout of connected components.
int m_initDummiesPerEdge
How many dummy nodes should initially be created for one edge.
Declaration of basic types for graphics.
double getRepulsionDistance() const
Returns m_repulsionDistance.
The NodeRespecterLayout layout algorithm.
double getMaxDisturbance() const
Returns m_maxDisturbance.
double m_barycenterX
Weighted sum of x-coordinates of all nodes.
bool isDummy(node v) const
Returns true iff v has no corresponding node in the original graph.
double m_temperatureDecreaseOffset
Factor for which holds: If only m_numberOfIterations * m_temperatureDecreaseOffset iterations are lef...
~NodeRespecterLayout()
Destroys an instance of the NodeRespecterLayout.
int m_degreeSum
Twice the number of all edges in the original graph.
bool m_randomInitialPlacement
Whether nodes should be initialized in random positions.
double getMinDistCC() const
Returns m_minDistCC.
Copies of graphs supporting edge splitting.
bool haveSameOriginalEdge(node v, node w) const
Returns whether v and w belong to the same original edge. If only one of the nodes is a dummy node,...
double m_bendNormalizationAngle
Lower bound for the minimum angle between two line segments such that the bend point between them is ...
Declaration of interface for layout algorithms (class LayoutModule)
double m_repulsionDistance
Maximum distance between a dummy and another node such that the former is repulsed by the latter.
double m_dummyInsertionThreshold
How many times larger than the desired edge length an edge has to be in order for a new dummy node to...
int m_numberOfIterations
Number of times a single node is moved for each connected component.
PostProcessingMode
Sets whether unnecessary edge bends should be filtered out in a post-processing step.
double m_cos
Precomputed cosinus of (m_oscillationAngle / 2).
#define OGDF_NEW_DELETE
Makes the class use OGDF's memory allocator.
int getMaxDummiesPerEdge() const
Returns m_maxDummiesPerEdge.
double getBendNormalizationAngle() const
Returns m_bendNormalizationAngle.
EdgeArray< bool > m_hasParEdges
Whether the edge has parallel edges.
double getDesiredMinEdgeLength() const
Returns m_desiredMinEdgeLength.
double m_desiredMinEdgeLength
Desired minimal node separation/edge length.
double m_minimalTemperature
Minimal temperature, lower bound for the global temperature.
Shape shape(node v) const
Returns the shape type of node v.
edge theEdge() const
Returns the edge associated with this adjacency entry.
int degree() const
Returns the degree of the node (indegree + outdegree).
double m_maxDisturbance
Maximal disturbance, i.e. maximal random node movement.
double m_gravitation
Gravitational constant scaling attractive forces towards the barycenter.
double weight(node v) const
Returns the weight of node v according to its degree.
double getMinimalTemperature() const
Returns m_minimalTemperature.
GraphCopy m_copy
Copy of the given graph which may contain dummy nodes.
double m_minDistCC
Minimal distance between connected components.
NodeArray< double > m_nodeRadius
Radius of the smallest circle encompassing the node.
PostProcessingMode getPostProcessing() const
Returns m_postProcessing.
Declaration of graph copy classes.
RegisteredArray for nodes, edges and adjEntries of a graph.
double height(node v) const
Returns the height of the bounding box of node v.
double getGravitation() const
Returns m_gravitation.
NodeArray< NodeArray< double > > m_desiredDistance
Desired distance between each pair of nodes.
double getTemperatureDecreaseOffset() const
Returns m_temperatureDecreaseOffset.
int getInitDummiesPerEdge() const
Returns m_initDummiesPerEdge.
NodeArray< double > m_impulseX
X-coordinate of the last impulse of the node.
double getDummyInsertionThreshold() const
Returns m_dummyInsertionThreshold.
Basic declarations, included by all source files.
double getOscillationAngle() const
Returns m_oscillationAngle.
int m_iterCounter
Number of iterations for which the algorithm still has to run.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
double radius(const GraphAttributes &attr, node v) const
Returns the radius of the smallest circle surrounding the shape of v (while still having its center a...
double m_oscillationAngle
Maximum angle between new and previous impulse such that the node movement is counted as an oscillati...
adjEntry firstAdj() const
Returns the first entry in the adjaceny list.
double m_globalTemperature
Average of all local node temperatures.
int m_maxDummiesPerEdge
How many dummy nodes should maximally be created for one edge.
PostProcessingMode m_postProcessing
Whether unnecessary bends should be filtered out in a post processing step.
double getInitialTemperature() const
Returns m_initialTemperature.
int getNumberOfIterations() const
Returns m_numberOfIterations.
double m_initialTemperature
Initial temperature of every node.
@ None
Two geometric objects do not intersect.
Class for the representation of nodes.
GraphAttributes m_copyAttr
GraphAttributes for m_copy.
Declaration of memory manager for allocating small pieces of memory.
bool getRandomInitialPlacement() const
Returns m_randomInitialPlacement.
double m_barycenterY
Weighted sum of y-coordinates of all nodes.
double m_factor
Precomputed constant used to get the max. temperature for each iteration.
const Graph & original() const
Returns a reference to the original graph.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Interface of general layout algorithms.
double width(node v) const
Returns the width of the bounding box of node v.