Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
VertexOrder.h
Go to the documentation of this file.
1
34#pragma once
35
37
38namespace ogdf {
39
40enum class OrderEnum { asc, desc, rnd };
41enum class MeasureEnum { zero, log, sum, squared };
42
47private:
49
50 using QElement = std::pair<ogdf::node, unsigned int>;
51
52 std::vector<QElement> vertex_order;
55
56 void sort();
57
58 double crossings(int c);
59
60 void init_all();
61 void init();
62
63
64 void init_cr(edge e);
65
66public:
68 : ga(_ga), o(_o), m(_m) {
69 //nothing to do
70 }
71
73 init();
75 for (auto v : vertex_order) {
76 order.pushBack(v.first);
77 }
78 return order;
79 }
80
82 vertex_order.clear();
83 init_cr(e);
85 for (auto v : vertex_order) {
86 order.pushBack(v.first);
87 }
88 return order;
89 }
90};
91}
Declaration of class GraphAttributes which extends a Graph by additional attributes.
std::vector< QElement > vertex_order
Definition VertexOrder.h:52
List< node > get_vertex_order()
Definition VertexOrder.h:72
CrossingVertexOrder(GraphAttributes &_ga, OrderEnum _o, MeasureEnum _m)
Definition VertexOrder.h:67
std::pair< ogdf::node, unsigned int > QElement
Definition VertexOrder.h:50
List< node > get_vertex_order_by_crossed_edges(edge e)
Definition VertexOrder.h:81
Class for the representation of edges.
Definition Graph_d.h:300
Stores additional attributes of a graph (like layout information).
Doubly linked lists (maintaining the length of the list).
Definition List.h:1435
iterator pushBack(const E &x)
Adds element x at the end of the list.
Definition List.h:1531
#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.
MeasureEnum
Definition VertexOrder.h:41