![]() |
Analysis Software
Documentation for sPHENIX simulation software
|
Abstract baseclass for all algoritm-classes. More...
#include <JETSCAPE/blob/main/external_packages/gtl/include/GTL/algorithm.h>
Inheritance diagram for algorithm: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. | |
Abstract baseclass for all algoritm-classes.
Definition at line 23 of file algorithm.h.
View newest version in sPHENIX GitHub at line 23 of file algorithm.h
| 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. |
Definition at line 40 of file algorithm.h.
View newest version in sPHENIX GitHub at line 40 of file algorithm.h
|
inline |
Creates an algorithm object.
Definition at line 48 of file algorithm.h.
View newest version in sPHENIX GitHub at line 48 of file algorithm.h
|
inlinevirtual |
Destroys the algorithm object.
Definition at line 53 of file algorithm.h.
View newest version in sPHENIX GitHub at line 53 of file algorithm.h
|
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 st_number, ratio_cut_partition, fm_partition, dijkstra, bid_dijkstra, dfs, bfs, topsort, maxflow_sap, maxflow_ff, maxflow_pp, planarity, biconnectivity, bellman_ford, min_tree, and components.
|
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 st_number, ratio_cut_partition, fm_partition, dijkstra, bid_dijkstra, maxflow_sap, maxflow_ff, maxflow_pp, dfs, bfs, planarity, topsort, bellman_ford, biconnectivity, min_tree, and components.
|
pure virtual |
Applies algorithm to graph g.
| g | graph |
| algorithm::GTL_OK | on success |
| algorithm::GTL_ERROR | otherwise |
Implemented in st_number, ratio_cut_partition, fm_partition, dijkstra, bid_dijkstra, dfs, bfs, maxflow_sap, planarity, maxflow_ff, maxflow_pp, bellman_ford, and min_tree.