ST-number algorithm. More...
#include <GTL/st_number.h>
Inherits: algorithm
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:
[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.
[public virtual]
Destructor
[public]
Sets edge st
for the next run.
e |
edge st |
[public]
Get edge st
.
st
.[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.
n |
node s |
[public]
Get node s
s
[public]
Returns st-number of node n
as determined in the last run.
n | node |
n
[public]
Iteration through the nodes of graph st-numbered in last run in st-number order, i.e. from 1 to highest st-number.
[public]
Iteration through nodes of graph in st-number order
[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.
[public]
End of iteration through nodes of graph in reverse st-number order
[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.
G | graph |
GTL_OK
iff st-number algorithm may be applied[public]
Runs st-number algorithm on graph G
. It is assumed that
check
was called previously and returned GTL_OK
.
G | graph |
GTL_OK
iff G
could be correctly st-numbered[public]
Resets algorithm in order to be applied to the next graph. This will delete most of the information obtained in the last run.
Kdoc |