Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
Planarity.h
Go to the documentation of this file.
1
34#pragma once
35
36#include <ogdf/basic/Graph.h>
37#include <ogdf/basic/List.h>
38#include <ogdf/basic/geometry.h>
40
41namespace ogdf {
42class GraphAttributes;
43template<class E>
44class Array2D;
45
46namespace davidson_harel {
47
48class Planarity : public EnergyFunction {
49public:
52
54
56 void computeEnergy() override;
57
58private:
62 bool cross;
63 };
64
66 bool intersect(const edge, const edge) const;
67
69 void compCandEnergy() override;
70
72 void internalCandidateTaken() override;
73
75 bool lowLevelIntersect(const DPoint&, const DPoint&, const DPoint&, const DPoint&) const;
76
77#ifdef OGDF_DEBUG
78 virtual void printInternalData() const override;
79#endif
80
83
89
91};
92
93}
94}
Declares class EnergyFunction...
Includes declaration of graph class.
Declaration of doubly linked lists and iterators.
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
The parameterized class Array2D implements dynamic two-dimensional arrays.
Definition Array2D.h:53
Class for the representation of edges.
Definition Graph_d.h:364
Stores additional attributes of a graph (like layout information).
Doubly linked lists (maintaining the length of the list).
Definition List.h:1451
The interface for energy functions for the Davidson Harel graph drawing method.
bool intersect(const edge, const edge) const
Returns 1 if edges cross else 0.
void computeEnergy() override
Computes energy of initial layout and stores it in m_energy.
EdgeArray< int > * m_edgeNums
numbers of edges
Definition Planarity.h:81
void compCandEnergy() override
Computes energy of candidate.
virtual void printInternalData() const override
void internalCandidateTaken() override
Changes internal data if candidate is taken.
Array2D< bool > * m_crossingMatrix
stores for each pair of edges if they cross
Definition Planarity.h:82
Planarity(GraphAttributes &AG)
Initializes data structures to speed up later computations.
bool lowLevelIntersect(const DPoint &, const DPoint &, const DPoint &, const DPoint &) const
Tests if two lines given by four points intersect.
List< edge > m_nonSelfLoops
list of edges that are not slef loops
Definition Planarity.h:90
List< ChangedCrossing > m_crossingChanges
stores for all edges incident to the test node an array with the crossings that change if the candida...
Definition Planarity.h:88
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition Graph_d.h:717
The namespace for all OGDF objects.