Home | Documentation | Download | Platforms | Projects | Mailing Lists | Version History
Public Member Functions | |
min_tree () | |
Constructor. | |
virtual | ~min_tree () |
Destructor. | |
int | check (graph &g) |
Checks whether algorithm can be applied. | |
int | run (graph &g) |
Applies algorithm to graph g. | |
virtual void | reset () |
Resets algorithm. | |
void | set_distances (const edge_map< int > &dist) |
Sets edge weights. | |
set< edge > | get_min_tree () |
Edges of minimal spanning tree calculated in the last call of min_tree::run. | |
int | get_min_tree_length () |
Weight of minimal spanning tree. |
int min_tree::check | ( | graph & | g | ) | [virtual] |
Checks whether algorithm can be applied.
The graph must
Additionally the weights of the edges must have been set in advance using min_tree::set_distances.
g | graph |
Implements algorithm.
int min_tree::run | ( | graph & | g | ) | [virtual] |
Applies algorithm to graph g.
g | graph |
algorithm::GTL_OK | on success | |
algorithm::GTL_ERROR | otherwise |
Implements algorithm.
virtual void min_tree::reset | ( | ) | [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.
Implements algorithm.
void min_tree::set_distances | ( | const edge_map< int > & | dist | ) |
Sets edge weights.
Setting of edge weights must be done before calling min_tree::check and min_tree::run.
dist | edge weigths. |
set<edge> min_tree::get_min_tree | ( | ) |
Edges of minimal spanning tree calculated in the last call of min_tree::run.
int min_tree::get_min_tree_length | ( | ) |
Weight of minimal spanning tree.
University of Passau - FMI - Theoretical Computer Science