Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

EdgeComparer.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/Graph.h>
35 #include <ogdf/basic/basic.h>
36 #include <ogdf/basic/comparer.h>
37 #include <ogdf/basic/geometry.h>
38 
39 namespace ogdf {
40 class GraphAttributes;
41 class PlanRep;
42 
52 class OGDF_EXPORT EdgeComparer : public VComparer<adjEntry> {
53 public:
63  EdgeComparer(const GraphAttributes& AG, const PlanRep& PR) : m_AG(&AG), m_PR(&PR) { }
64 
70  explicit EdgeComparer(const GraphAttributes& AG) : m_AG(&AG), m_PR(nullptr) { }
71 
72  int compare(const adjEntry& e1, const adjEntry& e2) const override;
73 
78  bool before(const DPoint& u, const DPoint& v, const DPoint& w) const;
79 
80 private:
85  int orientation(const DPoint& u, const DPoint& v, const DPoint& w) const;
86 
88  const PlanRep* m_PR;
89 };
90 
91 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::GraphAttributes
Stores additional attributes of a graph (like layout information).
Definition: GraphAttributes.h:72
Graph.h
Includes declaration of graph class.
ogdf::GenericPoint< double >
ogdf::PlanRep
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:69
geometry.h
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
ogdf::Direction::before
@ before
ogdf::AdjElement
Class for adjacency list elements.
Definition: Graph_d.h:142
ogdf::VComparer
Abstract base class for comparer classes.
Definition: comparer.h:258
ogdf::EdgeComparer::EdgeComparer
EdgeComparer(const GraphAttributes &AG, const PlanRep &PR)
Constructor for a given PlanRep and given GraphAttributes.
Definition: EdgeComparer.h:63
ogdf::orientation
int orientation(const DPoint &p, const DPoint &q, const DPoint &r)
ogdf::EdgeComparer::EdgeComparer
EdgeComparer(const GraphAttributes &AG)
Constructor for given GraphAttributes.
Definition: EdgeComparer.h:70
ogdf::EdgeComparer
Compares adjacency entries based on the position of the nodes given by GraphAttribute layout informat...
Definition: EdgeComparer.h:52
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::EdgeComparer::m_PR
const PlanRep * m_PR
Definition: EdgeComparer.h:88
comparer.h
Declarations for Comparer objects.
ogdf::EdgeComparer::m_AG
const GraphAttributes * m_AG
Definition: EdgeComparer.h:87