Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
algorithm Class Referenceabstract

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.
 

Detailed Description

Abstract baseclass for all algoritm-classes.

Date:
2003/03/24 15:58:54
Revision:
1.14

Definition at line 23 of file algorithm.h.

View newest version in sPHENIX GitHub at line 23 of file algorithm.h

Member Enumeration Documentation

anonymous enum

Return values for algorithm::check and algorithm::run.

Enumerator:
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

Constructor & Destructor Documentation

algorithm::algorithm ( )
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

virtual algorithm::~algorithm ( )
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

Member Function Documentation

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.

Parameters
ggraph
Return values
algorithm::GTL_OKif algorithm can be applied
algorithm::GTL_ERRORotherwise.

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.

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 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.

virtual int algorithm::run ( graph g)
pure virtual

Applies algorithm to graph g.

Parameters
ggraph
Return values
algorithm::GTL_OKon success
algorithm::GTL_ERRORotherwise

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.


The documentation for this class was generated from the following file: