st_number Class Reference

[Index] [Hierarchy] [Headers]


ST-number algorithm. More...

#include <GTL/st_number.h>

Inherits: algorithm

Public Members


Detailed Description

Encapsulates the st-number algorithm together with all the data produced by it.

Assigns an integer st[n] to each node n of a undirected, biconnected graph, such that each node is connected with at least one node having a smaller and with at least one having a larger number than itself. The only exception to this rule are the endpoints of edge st connecting nodes s (st-number 1) and t (highest st-number)

The following options are supported:


st_number() [public]

Creates st-number object. Please note that there are no reasonable default settings for the parameters, i.e. the edge st connecting the lowest with highest numbers node and which of its endpoints should get number 1 (= node s) has to be specified always.

~st_number() [public virtual]

Destructor

void st_edge(edge e) [public]

Sets edge st for the next run.

Parameters:
e edge st

edge st_edge() const [public]

Get edge st.

Returns:
edge st.

void s_node(node n) [public]

Sets node s for next run. This must be one of the endpoints of edge st. This node will get st-number 1 and thus the other endpoint will get the highest st-number.

Parameters:
n node s

node s_node() const [public]

Get node s

Returns:
node s

int& operator[](const node& n) [public]

Returns st-number of node n as determined in the last run.

Parameters:
n node
Returns:
st-number of n

iterator begin() [public]

Iteration through the nodes of graph st-numbered in last run in st-number order, i.e. from 1 to highest st-number.

Returns:
start of iteration through nodes in st-number order

iterator end() [public]

Iteration through nodes of graph in st-number order

Returns:
end of iteration through nodes of graph in st-number order

reverse_iterator rbegin() [public]

Iteration through the nodes of graph st-numbered in last run in reverse st-number order, i.e. from highest st-number down to 1.

Returns:
start of iteration through nodes in reverse st-number order

reverse_iterator rend() [public]

End of iteration through nodes of graph in reverse st-number order

Returns:
end of iteration through nodes in reverse st-number order

int check(graph& G) [public]

Checks whether st-number algorithm can be applied to G. Besides from the trivial preconditions that edge st and node s lie in G and s is really an endpoint of st (which isn't checked), G must be undirected and biconnected. Note: As for all algorithms in GTL, check must be called, because it might do some initialization.

Parameters:
G graph
Returns:
GTL_OK iff st-number algorithm may be applied
See Also:
algorithm::check

int run(graph& G) [public]

Runs st-number algorithm on graph G. It is assumed that check was called previously and returned GTL_OK.

Parameters:
G graph
Returns:
GTL_OK iff G could be correctly st-numbered
See Also:
algorithm::run

void reset() [public]

Resets algorithm in order to be applied to the next graph. This will delete most of the information obtained in the last run.

See Also:
algorithm::reset

Kdoc