Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

EdgeComparer.h
Go to the documentation of this file.
1 
36 #pragma once
37 
38 #include <ogdf/planarity/PlanRep.h>
40 
41 namespace ogdf {
42 
44 
57 class OGDF_EXPORT EdgeComparer : public VComparer<adjEntry>
58 {
59 public:
60  //order: clockwise
61 
62  EdgeComparer(const GraphAttributes& AG, const PlanRep& PR) : m_AG(&AG), m_PR(&PR) { }
63 
65  explicit EdgeComparer(const GraphAttributes &AG) : m_AG(&AG), m_PR(nullptr) {}
66 
67  int compare(const adjEntry &e1, const adjEntry &e2) const override;
68 
70  bool before(const DPoint &u, const DPoint &v, const DPoint &w) const;
71 
72 private:
73 
75  int orientation(
76  const DPoint &u,
77  const DPoint &v,
78  const DPoint &w) const;
79 
81  double angle(DPoint p, DPoint q, DPoint r) const;
82 
84  const PlanRep *m_PR;
85 };//EdgeComparer
86 
87 
88 }//namespace ogdf
Declaration of class GraphAttributes which extends a Graph by additional attributes.
EdgeComparer(const GraphAttributes &AG, const PlanRep &PR)
Definition: EdgeComparer.h:62
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
Declaration of a base class for planar representations of graphs and cluster graphs.
const GraphAttributes * m_AG
Definition: EdgeComparer.h:83
Real points.
Definition: geometry.h:219
EdgeComparer(const GraphAttributes &AG)
compare the edges directly in AG
Definition: EdgeComparer.h:65
Abstract base class for comparer classes.
Definition: comparer.h:230
const PlanRep * m_PR
Definition: EdgeComparer.h:84
Stores additional attributes of a graph (like layout information).
The namespace for all OGDF objects.
The EdgeComparer compares adjacency entries on base of the position of the nodes given by an Attribut...
Definition: EdgeComparer.h:57
Class for adjacency list elements.
Definition: Graph_d.h:78
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:60
int orientation(const DPoint &p, const DPoint &q, const DPoint &r)