algorithm Class Reference

[Index] [Hierarchy] [Headers]


Abstract baseclass for all algoritm-classes. More...

#include <GTL/algorithm.h>

Public Members


enum ( GTL_OK = 1, GTL_ERROR = 0 ) [public]

error values returned by algorithms in run and check.

See Also:
algorithm::run, algorithm::check

algorithm() [public]

Creates an algorithm object.

~algorithm() [public virtual]

Destroys the algorithm object.

int run(graph& g) [public virtual]

Applies algorithm to graph g. Please note: It is definitly required (and run relies on it), that check was called in advance.

Parameters:
G graph
Returns:
algorithm::GTL_OK on success algorithm::GTL_ERROR otherwise
See Also:
algorithm::check

int check(graph& g) [public virtual]

Checks whether all preconditions are satisfied.

Parameters:
G graph
Returns:
algorithm::GTL_OK on success algorithm::GTL_ERROR otherwise

void reset() [public virtual]

Resets algorithm, i.e. prepares the algorithm to be applied to another graph. Please note: The options an algorithm may support do not get reset by this. It is just to reset internally used datastructures.


Kdoc