Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

CrossingsBucket.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 
37 namespace ogdf {
38 namespace embedding_inserter {
39 
41 template<typename PLANREP>
42 class CrossingsBucket : public BucketFunc<edge> {
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 { return -m_pPG->chain(e).size(); }
49 };
50 
51 }
52 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
Graph.h
Includes declaration of graph class.
ogdf::BucketFunc
Abstract base class for bucket functions.
Definition: basic.h:257
ogdf::embedding_inserter::CrossingsBucket
Bucket function for sorting edges by decreasing number of crossings.
Definition: CrossingsBucket.h:42
ogdf::embedding_inserter::CrossingsBucket::m_pPG
const PLANREP * m_pPG
Definition: CrossingsBucket.h:43
basic.h
Basic declarations, included by all source files.
ogdf::EdgeElement
Class for the representation of edges.
Definition: Graph_d.h:363
ogdf::embedding_inserter::CrossingsBucket::CrossingsBucket
CrossingsBucket(const PLANREP *pPG)
Definition: CrossingsBucket.h:46
ogdf::embedding_inserter::CrossingsBucket::getBucket
int getBucket(const edge &e) override
Returns the bucket of x.
Definition: CrossingsBucket.h:48