Home | Documentation | Download | Platforms | Projects | Mailing Lists | Version History
Public Types | |
enum | { GTL_OK = 1, GTL_ERROR = 0 } |
Return values for algorithm::check and algorithm::run. More... | |
Public Member Functions | |
algorithm () | |
Creates an algorithm object. | |
virtual | ~algorithm () |
Destroys the algorithm object. | |
virtual int | run (graph &g)=0 |
Applies algorithm to graph g. | |
virtual int | check (graph &g)=0 |
Checks whether all preconditions are satisfied. | |
virtual void | reset ()=0 |
Resets algorithm. |
anonymous enum |
Return values for algorithm::check and algorithm::run.
GTL_OK | Used as (positive) return value of algorithm::check and algorithm::run. |
GTL_ERROR | Used as (negative) return value of algorithm::check and algorithm::run. |
virtual int algorithm::run | ( | graph & | g | ) | [pure virtual] |
Applies algorithm to graph g.
g | graph |
algorithm::GTL_OK | on success | |
algorithm::GTL_ERROR | otherwise |
Implemented in bellman_ford, bfs, bid_dijkstra, dfs, dijkstra, fm_partition, maxflow_ff, maxflow_pp, maxflow_sap, min_tree, planarity, ratio_cut_partition, and st_number.
virtual int algorithm::check | ( | graph & | g | ) | [pure virtual] |
Checks whether all preconditions are satisfied.
Please note: It is definitly required (and run relies on it), that this method was called in advance.
g | graph |
algorithm::GTL_OK | if algorithm can be applied | |
algorithm::GTL_ERROR | otherwise. |
Implemented in bellman_ford, bfs, biconnectivity, bid_dijkstra, components, dfs, dijkstra, fm_partition, maxflow_ff, maxflow_pp, maxflow_sap, min_tree, planarity, ratio_cut_partition, st_number, and topsort.
virtual void algorithm::reset | ( | ) | [pure virtual] |
Resets algorithm.
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.
Implemented in bellman_ford, bfs, biconnectivity, bid_dijkstra, components, dfs, dijkstra, fm_partition, maxflow_ff, maxflow_pp, maxflow_sap, min_tree, planarity, ratio_cut_partition, st_number, and topsort.
University of Passau - FMI - Theoretical Computer Science