realizes Hopcroft/Tarjan algorithm for finding the triconnected components of a biconnected multi-graph More...
#include <ogdf/graphalg/Triconnectivity.h>
Classes | |
struct | CompStruct |
representation of a component More... | |
Public Types | |
enum class | CompType { bond , polygon , triconnected } |
type of split-components / triconnected components More... | |
Public Member Functions | |
Triconnectivity (const Graph &G) | |
Divides G into triconnected components. | |
Triconnectivity (const Graph &G, bool &isTric, node &s1, node &s2) | |
Tests G for triconnectivity. | |
Triconnectivity (const Triconnectivity &)=delete | |
~Triconnectivity () | |
bool | checkComp () |
Checks if computed triconnected componets are correct. | |
Public Attributes | |
Array< CompStruct > | m_component |
array of components | |
int | m_numComp |
number of components | |
GraphCopySimple * | m_pGC |
copy of G containing also virtual edges | |
Private Types | |
enum class | EdgeType { unseen , tree , frond , removed } |
type of edges with respect to palm tree More... | |
Private Member Functions | |
void | assembleTriconnectedComponents () |
merges split-components into triconnected components | |
void | buildAcceptableAdjStruct (const Graph &G) |
constructs ordered adjaceny lists | |
bool | checkSepPair (edge eVirt) |
void | delHigh (edge e) |
void | DFS1 (const Graph &G, node v, node u) |
first dfs traversal | |
void | DFS1 (const Graph &G, node v, node u, node &s1) |
special version for triconnectivity tes | |
void | DFS2 (const Graph &G) |
the second dfs traversal | |
int | high (node v) |
returns high(v) value | |
CompStruct & | newComp () |
create a new empty component | |
CompStruct & | newComp (CompType t) |
create a new empty component of type t | |
void | pathFinder (const Graph &G, node v) |
void | pathSearch (const Graph &G, node v) |
finding of split components | |
bool | pathSearch (const Graph &G, node v, node &s1, node &s2) |
void | printOs (edge e) |
debugging stuff | |
void | printStacks () |
void | splitMultiEdges () |
splits bundles of multi-edges into bonds and creates a new virtual edge in GC. | |
bool | TSTACK_notEOS () |
returns true iff end-of-stack marker is not on top of TSTACK | |
void | TSTACK_push (int h, int a, int b) |
push a triple on TSTACK | |
void | TSTACK_pushEOS () |
push end-of-stack marker on TSTACK | |
Private Attributes | |
NodeArray< List< edge > > | m_A |
adjacency list of v | |
NodeArray< int > | m_DEGREE |
degree of v | |
ArrayBuffer< edge > | m_ESTACK |
stack of currently active edges | |
NodeArray< node > | m_FATHER |
father of v in palm tree | |
NodeArray< List< int > > | m_HIGHPT |
list of fronds entering v in the order they are visited | |
EdgeArray< ListIterator< edge > > | m_IN_ADJ |
pointer to element in adjacency list containing e | |
EdgeArray< ListIterator< int > > | m_IN_HIGH |
pointer to element in HIGHPT list containing e | |
NodeArray< int > | m_LOWPT1 |
NodeArray< int > | m_LOWPT2 |
NodeArray< int > | m_ND |
number of descendants in palm tree | |
NodeArray< int > | m_NEWNUM |
(second) dfs-number of v | |
bool | m_newPath |
true iff we start a new path | |
Array< node > | m_NODEAT |
node with number i | |
NodeArray< int > | m_NUMBER |
(first) dfs-number of v | |
int | m_numCount |
counter for dfs-traversal | |
EdgeArray< bool > | m_START |
edge starts a path | |
node | m_start |
start node of dfs traversal | |
int | m_top |
NodeArray< edge > | m_TREE_ARC |
tree arc entering v | |
int * | m_TSTACK_a |
int * | m_TSTACK_b |
int * | m_TSTACK_h |
stack of triples | |
EdgeArray< EdgeType > | m_TYPE |
type of edge e | |
realizes Hopcroft/Tarjan algorithm for finding the triconnected components of a biconnected multi-graph
Definition at line 46 of file Triconnectivity.h.
type of split-components / triconnected components
Enumerator | |
---|---|
bond | |
polygon | |
triconnected |
Definition at line 68 of file Triconnectivity.h.
|
strongprivate |
type of edges with respect to palm tree
Enumerator | |
---|---|
unseen | |
tree | |
frond | |
removed |
Definition at line 135 of file Triconnectivity.h.
Divides G into triconnected components.
G | graph |
Tests G for triconnectivity.
G | graph |
isTric | true if G is triconnected, false otherwise. |
s1 | first vertex of separation pair if G is biconnected, cut vertex of G if G is not biconnected, nullptr if G is not connected. |
s2 | second vertex of separation pair if G is biconnected, nullptr otherwise. |
|
delete |
ogdf::Triconnectivity::~Triconnectivity | ( | ) |
|
private |
merges split-components into triconnected components
constructs ordered adjaceny lists
bool ogdf::Triconnectivity::checkComp | ( | ) |
Checks if computed triconnected componets are correct.
Definition at line 163 of file Triconnectivity.h.
special version for triconnectivity tes
returns high(v) value
Definition at line 161 of file Triconnectivity.h.
|
inlineprivate |
create a new empty component
Definition at line 125 of file Triconnectivity.h.
|
inlineprivate |
create a new empty component of type t
Definition at line 128 of file Triconnectivity.h.
finding of split components
|
private |
|
private |
splits bundles of multi-edges into bonds and creates a new virtual edge in GC.
|
inlineprivate |
returns true iff end-of-stack marker is not on top of TSTACK
Definition at line 122 of file Triconnectivity.h.
push a triple on TSTACK
Definition at line 112 of file Triconnectivity.h.
|
inlineprivate |
push end-of-stack marker on TSTACK
Definition at line 119 of file Triconnectivity.h.
adjacency list of v
Definition at line 179 of file Triconnectivity.h.
Array<CompStruct> ogdf::Triconnectivity::m_component |
array of components
Definition at line 89 of file Triconnectivity.h.
degree of v
Definition at line 175 of file Triconnectivity.h.
|
private |
stack of currently active edges
Definition at line 186 of file Triconnectivity.h.
father of v in palm tree
Definition at line 177 of file Triconnectivity.h.
list of fronds entering v in the order they are visited
Definition at line 183 of file Triconnectivity.h.
|
private |
pointer to element in adjacency list containing e
Definition at line 184 of file Triconnectivity.h.
|
private |
pointer to element in HIGHPT list containing e
Definition at line 185 of file Triconnectivity.h.
Definition at line 172 of file Triconnectivity.h.
Definition at line 173 of file Triconnectivity.h.
number of descendants in palm tree
Definition at line 174 of file Triconnectivity.h.
(second) dfs-number of v
Definition at line 180 of file Triconnectivity.h.
|
private |
true iff we start a new path
Definition at line 190 of file Triconnectivity.h.
node with number i
Definition at line 176 of file Triconnectivity.h.
(first) dfs-number of v
Definition at line 171 of file Triconnectivity.h.
int ogdf::Triconnectivity::m_numComp |
number of components
Definition at line 91 of file Triconnectivity.h.
|
private |
counter for dfs-traversal
Definition at line 189 of file Triconnectivity.h.
GraphCopySimple* ogdf::Triconnectivity::m_pGC |
copy of G containing also virtual edges
Definition at line 87 of file Triconnectivity.h.
edge starts a path
Definition at line 181 of file Triconnectivity.h.
|
private |
start node of dfs traversal
Definition at line 188 of file Triconnectivity.h.
|
private |
Definition at line 109 of file Triconnectivity.h.
tree arc entering v
Definition at line 182 of file Triconnectivity.h.
|
private |
Definition at line 108 of file Triconnectivity.h.
|
private |
Definition at line 108 of file Triconnectivity.h.
|
private |
stack of triples
Definition at line 108 of file Triconnectivity.h.
type of edge e
Definition at line 178 of file Triconnectivity.h.