Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

CrossingsBucket.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/Graph.h>
35 
36 namespace ogdf {
37 namespace embedding_inserter {
38 
40 template<typename PLANREP>
41 class CrossingsBucket : public BucketFunc<edge>
42 {
43  const PLANREP *m_pPG;
44 
45 public:
46  explicit CrossingsBucket(const PLANREP *pPG) : m_pPG(pPG) { }
47 
48  int getBucket(const edge &e) override {
49  return -m_pPG->chain(e).size();
50  }
51 };
52 
53 }
54 }
int getBucket(const edge &e) override
Returns the bucket of x.
Bucket function for sorting edges by decreasing number of crossings.
Class for the representation of edges.
Definition: Graph_d.h:292
Abstract base class for bucket functions.
Definition: basic.h:226
Includes declaration of graph class.
The namespace for all OGDF objects.