Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
EdgeComparer.h
Go to the documentation of this file.
1
32#pragma once
33
36
37namespace ogdf {
38
48class OGDF_EXPORT EdgeComparer : public VComparer<adjEntry> {
49public:
59 EdgeComparer(const GraphAttributes& AG, const PlanRep& PR) : m_AG(&AG), m_PR(&PR) { }
60
66 explicit EdgeComparer(const GraphAttributes& AG) : m_AG(&AG), m_PR(nullptr) { }
67
68 int compare(const adjEntry& e1, const adjEntry& e2) const override;
69
74 bool before(const DPoint& u, const DPoint& v, const DPoint& w) const;
75
76private:
81 int orientation(const DPoint& u, const DPoint& v, const DPoint& w) const;
82
84 const PlanRep* m_PR;
85};
86
87}
Declaration of class GraphAttributes which extends a Graph by additional attributes.
Declaration of a base class for planar representations of graphs and cluster graphs.
Class for adjacency list elements.
Definition Graph_d.h:79
Compares adjacency entries based on the position of the nodes given by GraphAttribute layout informat...
const GraphAttributes * m_AG
bool before(const DPoint &u, const DPoint &v, const DPoint &w) const
Checks if vector from u to v lies within the 180-degree halfcircle before the vector from u to w in c...
int compare(const adjEntry &e1, const adjEntry &e2) const override
Compares x and y and returns the result as an integer.
const PlanRep * m_PR
EdgeComparer(const GraphAttributes &AG, const PlanRep &PR)
Constructor for a given PlanRep and given GraphAttributes.
EdgeComparer(const GraphAttributes &AG)
Constructor for given GraphAttributes.
int orientation(const DPoint &u, const DPoint &v, const DPoint &w) const
Returns 1 if v lies to the left of the line through u and w, -1 if it lies to the right,...
Stores additional attributes of a graph (like layout information).
Planarized representations (of a connected component) of a graph.
Definition PlanRep.h:57
Abstract base class for comparer classes.
Definition comparer.h:254
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition config.h:101
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.