Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
Cycle.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#include <tuple>
38#include <unordered_set>
39#include <vector>
40
41namespace ogdf {
42namespace matching_blossom {
43
45private:
46 std::unordered_set<node> m_nodes;
47
48 std::vector<edge> m_edgeOrder;
49
52 std::vector<long> indexOf(std::vector<node> nodesToFind);
53
54public:
55 Cycle(edge startEdge);
56
57 /* Getters */
58
59 const std::vector<edge>& edgeOrder();
60
61 const std::unordered_set<node>& nodes();
62
63 /* End of getters */
64
66 void addEdge(edge e);
67
70
73 std::tuple<long, long> indexOf(node u, node v);
74
77 long indexOf(node u);
78
80 bool contains(node v);
81};
82
83}
84}
Includes declaration of graph class.
Basic declarations, included by all source files.
Class for the representation of edges.
Definition Graph_d.h:364
Class for the representation of nodes.
Definition Graph_d.h:241
node startNode()
The first node of the cycle in edge order.
std::vector< edge > m_edgeOrder
Definition Cycle.h:48
std::tuple< long, long > indexOf(node u, node v)
Get the indices of the edges before u and v in edge order. For the startNode, size() - 1 is returned.
const std::vector< edge > & edgeOrder()
bool contains(node v)
Whether the cycle contains the node v or not.
std::unordered_set< node > m_nodes
Definition Cycle.h:46
long indexOf(node u)
Get the index of the edge before u in edge order. If u is the startNode, size() - 1 is returned.
const std::unordered_set< node > & nodes()
std::vector< long > indexOf(std::vector< node > nodesToFind)
Get the indices of the edges before nodesToFind in edge order. For the startNode, size() - 1 is retur...
void addEdge(edge e)
Use this method to add edges in cycle order.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
The namespace for all OGDF objects.