Home | Documentation | Download | Platforms | Projects | Mailing Lists | Version History

- Main Page
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# st_number Class Reference

ST-number algorithm. More...

Inheritance diagram for st_number:

[legend]
Collaboration diagram for st_number:

[legend]

List of all members.

## Public Member Functions

| st_number ()
| Default constructor. 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.
virtual | ~st_number ()
| Destructor.
void | st_edge (edge e)
| Sets edge st for the next run.
edge | st_edge () const
| Get edge st.
void | s_node (node n)
| Sets node s for next run.
node | s_node () const
| Get node s.
int & | operator[] (const node &n)
| Returns st-number of node `n` as determined in the last run.
iterator | begin ()
| Iteration through the nodes of graph st-numbered in last run in st-number order, i.e. from 1 to highest st-number.
iterator | end ()
| Iteration through nodes of graph in st-number order.
reverse_iterator | rbegin ()
| 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.
reverse_iterator | rend ()
| End of iteration through nodes of graph in reverse st-number order.
int | check (graph &G)
| Checks whether st-number algorithm can be applied to `G`.
int | run (graph &G)
| Runs st-number algorithm on graph `G`.
void | reset ()
| Resets algorithm in order to be applied to the next graph.

## Detailed Description

ST-number 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:

- st_edge sets/retrieves the edge that connects the node with the lowest number to that with the highest.
- s_node sets/retrieves that endpoints of the st_edge, which gets number 1.

## Member Function Documentation

void st_number::st_edge | ( | edge | e | ) | `[inline]`

Sets edge st for the next run.

Parameters:

  | e | edge st

edge st_number::st_edge | ( |  | ) | const`[inline]`

Get edge st.

Return values:

  | edge | st

void st_number::s_node | ( | node | n | ) | `[inline]`

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 st_number::s_node | ( |  | ) | const`[inline]`

Get node s.

Return values:

  | node | s

int& st_number::operator[] | ( | const node & | n | ) | `[inline]`

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

Parameters:

  | n | node

Returns:
  st-number of `n`

iterator st_number::begin | ( |  | ) | `[inline]`

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 st_number::end | ( |  | ) | `[inline]`

Iteration through nodes of graph in st-number order.

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

reverse_iterator st_number::rbegin | ( |  | ) | `[inline]`

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 st_number::rend | ( |  | ) | `[inline]`

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

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

int st_number::check | ( | graph & | G | ) | `[virtual]`

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

Return values:

  | algorithm::GTL_OK | iff st-number algorithm may be applied

See also:
  algorithm::check

Implements algorithm.

int st_number::run | ( | graph & | G | ) | `[virtual]`

Runs st-number algorithm on graph `G`.

It is assumed that check was called previously and returned algorithm::GTL_OK.

Parameters:

  | G | graph

Returns:
  algorithm::GTL_OK iff `G` could be correctly st-numbered

See also:
  algorithm::run

Implements algorithm.

void st_number::reset | ( |  | ) | `[inline, virtual]`

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

Implements algorithm.

University of Passau - FMI - Theoretical Computer Science

Design © 2002, 2003 Marcus Raitner, University of Passau