Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
MaxAdjOrdering.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
37namespace ogdf {
38class GraphAttributes;
39template<class E>
40class ListPure;
41
52private:
62 void m_calcAllMAOs_recursion(int n, ListPure<node> currentOrder, ListPure<node> currentUnsorted,
64
77 void m_calcAllMAOs_recursion(int n, ListPure<node> currentOrder,
78 ListPure<ListPure<edge>> currentForest, ListPure<node> currentUnsorted, NodeArray<int> r,
80
81public:
90
96 void calc(const Graph* G, ListPure<node>* MAO);
103 void calcBfs(const Graph* G, ListPure<node>* MAO);
104
111 void calc(const Graph* G, node s, ListPure<node>* MAO);
112
119 void calc(const Graph* G, ListPure<node>* MAO, ListPure<ListPure<edge>>* Forests);
120
128 void calc(const Graph* G, node s, ListPure<node>* MAO, ListPure<ListPure<edge>>* Forests);
129
135 void calcAll(const Graph* G, ListPure<ListPure<node>>* MAOs);
136
143 void calcAll(const Graph* G, ListPure<ListPure<node>>* MAOs,
145
153
157 void calcForest(const Graph& G, const ListPure<node>& MAO, ListPure<ListPure<edge>>* F);
158
164 bool testIfMAO(const Graph* G, ListPure<node>* Ordering);
165
171 bool testIfMAOBfs(const Graph* G, ListPure<node>* Ordering);
172
173
184 bool testIfAllMAOs(const Graph* G, ListPure<ListPure<node>>* Orderings,
185 ListPure<ListPure<node>>* Perms);
192
198
203};
204
205}
Includes declaration of graph class.
Basic declarations, included by all source files.
Stores additional attributes of a graph (like layout information).
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:866
Doubly linked lists.
Definition List.h:233
Calculate one or all Maximum Adjacency Ordering(s) of a given simple undirected graph.
bool testIfMAOBfs(const Graph *G, ListPure< node > *Ordering)
Test if a given ordering is a MAO that follows lex-bfs tie breaking.
void calc(const Graph *G, node s, ListPure< node > *MAO)
Calculates one MAO starting with a given node.
void visualize(GraphAttributes *GA, const ListPure< node > &MAO, ListPure< ListPure< edge > > *F)
Convenient way to visualize a MAO with the LinearLayout class.
void m_calcAllMAOs_recursion(int n, ListPure< node > currentOrder, ListPure< ListPure< edge > > currentForest, ListPure< node > currentUnsorted, NodeArray< int > r, ListPure< ListPure< node > > *MAOs, ListPure< ListPure< ListPure< edge > > > *Fs)
This method gets called recursively to generate all MAOs and their induced forest decompositions of t...
void calcForest(const Graph &G, const ListPure< node > &MAO, ListPure< ListPure< edge > > *F)
Calculates the associated forest decomposition of a given MAO of a graph.
void calcAll(const Graph *G, ListPure< ListPure< node > > *MAOs)
Calculates all MAOs of a given graph.
void visualize(GraphAttributes *GA, ListPure< node > *MAO, ListPure< ListPure< edge > > *F)
Convenient way to visualize a MAO with the LinearLayout class.
void calc(const Graph *G, ListPure< node > *MAO, ListPure< ListPure< edge > > *Forests)
Calculates one MAO starting with the node with index 0.
void m_calcAllMAOs_recursion(int n, ListPure< node > currentOrder, ListPure< node > currentUnsorted, NodeArray< int > r, ListPure< ListPure< node > > *MAOs)
This method gets called recursively to generate all MAOs via backtracking.
bool testIfMAO(const Graph *G, ListPure< node > *Ordering)
Test if a given ordering is a MAO.
MaxAdjOrdering()
Standard constructor.
void calc(const Graph *G, ListPure< node > *MAO)
Calculates one MAO starting with the node with index 0.
void calcBfs(const Graph *G, ListPure< node > *MAO)
Calculates one MAO starting with the node with index 0 and lex-bfs tie breaking.
bool testIfAllMAOs(const Graph *G, ListPure< ListPure< node > > *Orderings, ListPure< ListPure< node > > *Perms)
testIfAllMAOs checks all permutations (must be provided) if they are a MAO and if yes searches this o...
void calc(const Graph *G, node s, ListPure< node > *MAO, ListPure< ListPure< edge > > *Forests)
Calculates one MAO starting with a given node.
void calcAll(const Graph *G, ListPure< ListPure< node > > *MAOs, ListPure< ListPure< ListPure< edge > > > *Fs)
Calculates all MAOs including their associated forest decompositions of a given graph.
void visualize(GraphAttributes *GA, ListPure< node > *MAO)
Convenient way to visualize a MAO with the LinearLayout class.
void calcForest(const Graph &G, ListPure< node > *MAO, ListPure< ListPure< edge > > *F)
Calculates the associated forest decomposition of a given MAO of a graph.
~MaxAdjOrdering()
Standard destructor.
Class for the representation of nodes.
Definition Graph_d.h:241
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition Graph_d.h:659
#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.