forked from Smorodov/Multitarget-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalgorithm.h
More file actions
94 lines (80 loc) · 2.29 KB
/
Copy pathalgorithm.h
File metadata and controls
94 lines (80 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/* This software is distributed under the GNU Lesser General Public License */
//==========================================================================
//
// algorithm.h
//
//==========================================================================
// $Id: algorithm.h,v 1.14 2003/03/24 15:58:54 raitner Exp $
#ifndef GTL_ALGORITHM_H
#define GTL_ALGORITHM_H
#include <GTL/GTL.h>
#include <GTL/graph.h>
__GTL_BEGIN_NAMESPACE
/**
* $Date: 2003/03/24 15:58:54 $
* $Revision: 1.14 $
*
* @brief Abstract baseclass for all algoritm-classes.
*/
class GTL_EXTERN algorithm {
public:
/**
* @var algorithm::GTL_OK
* Used as (positive) return value of algorithm::check and
* algorithm::run.
*/
/**
* @var algorithm::GTL_ERROR
* Used as (negative) return value of algorithm::check and
* algorithm::run.
*/
/**
* @brief Return values for algorithm::check and algorithm::run
*/
enum {
GTL_OK = 1,
GTL_ERROR = 0
};
/**
* @brief Creates an algorithm object.
*/
algorithm () { };
/**
* @brief Destroys the algorithm object.
*/
virtual ~algorithm () { };
/**
* @brief Applies %algorithm to %graph g.
*
* @param g %graph
* @retval algorithm::GTL_OK on success
* @retval algorithm::GTL_ERROR otherwise
*/
virtual int run (graph& g) = 0;
/**
* @brief Checks whether all preconditions are satisfied.
*
* @em Please @em note: It is
* definitly required (and #run relies on it),
* that this method was called in advance.
*
* @param g %graph
* @retval algorithm::GTL_OK if %algorithm can be applied
* @retval algorithm::GTL_ERROR otherwise.
*/
virtual int check (graph& g) = 0;
/**
* @brief Resets %algorithm
*
* Prepares the %algorithm to be applied to
* another %graph. @em Please @em note: The options an
* %algorithm may support do @em not get reset by
* this. It is just to reset internally used datastructures.
*/
virtual void reset () = 0;
};
__GTL_END_NAMESPACE
#endif // GTL_ALGORITHM_H
//--------------------------------------------------------------------------
// end of file
//--------------------------------------------------------------------------