COPASI API  4.16.103
COscillationMethod.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/oscillation/COscillationMethod.h,v $
3 // $Revision: 1.1 $
4 // $Name: $
5 // $Author: ssahle $
6 // $Date: 2008/11/11 16:47:54 $
7 // End CVS Header
8 // Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual
9 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
10 // and The University of Manchester.
11 // All rights reserved.
12 
13 #ifndef COPASI_COscMethod
14 #define COPASI_COscMethod
15 
17 
19 class COscillationTask;
20 
22  {
23  public:
24 
25  protected:
26 
28 
29  // COptTask * mpParentTask;
30 
31  private:
32  /**
33  * Default constructor.
34  */
36 
37  protected:
38  /**
39  * Specific constructor
40  * @param const CCopasiTask::Type & type
41  * @param const CCopasiMethod::SubType & subType
42  * @param const CCopasiContainer * pParent (default: NULL)
43  */
44  COscillationMethod(const CCopasiTask::Type & taskType,
45  const SubType & subType,
46  const CCopasiContainer * pParent = NULL);
47 
48  public:
49  /**
50  * Create a optimization method.
51  * Note: the returned object has to be released after use with delete
52  */
54  = CCopasiMethod::oscillationIntegrate);
55 
56  /**
57  * Copy constructor
58  * @param const COscillationMethod & src
59  * @param const CCopasiContainer * pParent (default: NULL)
60  */
62  const CCopasiContainer * pParent = NULL);
63 
64  /**
65  * Destructor
66  */
67  virtual ~COscillationMethod();
68 
69  /**
70  * Execute the algorithm
71  * @ return success;
72  */
73  virtual bool run() = 0;
74 
75  /**
76  * Set the problem to be optmised
77  * @param "COscillationProblem *" problem
78  */
79  void setProblem(COscillationProblem * problem);
80 
81  /**
82  * Initialize arrays and pointer.
83  * @return bool success
84  */
85  virtual bool initialize();
86 
87  /**
88  * Check if the method is suitable for this problem
89  * @return bool suitability of the method
90  */
91  virtual bool isValidProblem(const CCopasiProblem * pProblem);
92 
93  protected:
94  /**
95  * Cleanup arrays and pointers.
96  * @return bool success
97  */
98  virtual bool cleanup();
99  };
100 
101 #endif // COPASI_COscillationMethod
virtual bool initialize()
void setProblem(COscillationProblem *problem)
virtual bool isValidProblem(const CCopasiProblem *pProblem)
COscillationProblem * mpOscProblem
virtual bool run()=0
static COscillationMethod * createMethod(CCopasiMethod::SubType subType=CCopasiMethod::oscillationIntegrate)