COPASI API  4.16.103
CFitTask.h
Go to the documentation of this file.
1 // Copyright (C) 2010 - 2013 by Pedro Mendes, Virginia Tech Intellectual
2 // Properties, Inc., University of Heidelberg, and The University
3 // of Manchester.
4 // All rights reserved.
5 
6 // Copyright (C) 2008 - 2009 by Pedro Mendes, Virginia Tech Intellectual
7 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
8 // and The University of Manchester.
9 // All rights reserved.
10 
11 // Copyright (C) 2005 - 2007 by Pedro Mendes, Virginia Tech Intellectual
12 // Properties, Inc. and EML Research, gGmbH.
13 // All rights reserved.
14 
15 /**
16  * CFitTask class.
17  *
18  * This class implements a parameter estimation task which is comprised of a
19  * of a problem and a method.
20  *
21  */
22 
23 #ifndef COPASI_CFitTask
24 #define COPASI_CFitTask
25 
26 #include "optimization/COptTask.h"
27 
28 class CFitTask : public COptTask
29 {
30  //Attributes
31 
32 public:
33  /**
34  * default constructor
35  * @param const CCopasiTask::Type & type (default: parameterFitting)
36  * @param const CCopasiContainer * pParent (default: NULL)
37  */
39  const CCopasiContainer * pParent = NULL);
40 
41  /**
42  * Copy constructor
43  * @param const CFitTask & src
44  * @param const CCopasiContainer * pParent (default: NULL)
45  */
46  CFitTask(const CFitTask & src, const CCopasiContainer * pParent = NULL);
47 
48  /**
49  * Destructor
50  */
51  ~CFitTask();
52 
53  /**
54  * cleanup()
55  */
56  void cleanup();
57 
58  /**
59  * Set the call back of the task
60  * @param CProcessReport * pCallBack
61  * @result bool succes
62  */
63  virtual bool setCallBack(CProcessReport * pCallBack);
64 
65  /**
66  * Initialize the task. If an ostream is given this ostream is used
67  * instead of the target specified in the report. This allows nested
68  * tasks to share the same output device.
69  * @param const OutputFlag & of
70  * @param COutputHandler * pOutputHandler
71  * @param std::ostream * pOstream (default: NULL)
72  * @return bool success
73  */
74  virtual bool initialize(const OutputFlag & of,
75  COutputHandler * pOutputHandler,
76  std::ostream * pOstream);
77 
78  /**
79  * Process the task with or without initializing to the initial state.
80  * @param const bool & useInitialValues
81  * @return bool success
82  */
83  virtual bool process(const bool & useInitialValues);
84 
85  /**
86  * Set the method type applied to solve the task
87  * @param const CCopasiMethod::SubType & type
88  * @return bool success
89  */
90  virtual bool setMethodType(const int & type);
91 
92  /**
93  * Create a method of the specified type to solve the task.
94  * It is the duty of the caller to release the CCopasiMethod.
95  * @param const CCopasiMethod::SubType & type
96  * @return CCopasiMethod *
97  */
98  virtual CCopasiMethod * createMethod(const int & type) const;
99 
100  /**
101  * Fix files written with Version 4.10.55, which wrote the square root of user defined weights for the
102  * parameter fitting task
103  */
104  void fixBuild55();
105 };
106 #endif // COPASI_CFitTask
virtual bool setMethodType(const int &type)
Definition: CFitTask.cpp:107
virtual bool setCallBack(CProcessReport *pCallBack)
Definition: CFitTask.cpp:61
void fixBuild55()
Definition: CFitTask.cpp:129
CFitTask(const CCopasiTask::Type &type=CCopasiTask::parameterFitting, const CCopasiContainer *pParent=NULL)
Definition: CFitTask.cpp:30
virtual bool process(const bool &useInitialValues)
Definition: CFitTask.cpp:79
~CFitTask()
Definition: CFitTask.cpp:56
virtual bool initialize(const OutputFlag &of, COutputHandler *pOutputHandler, std::ostream *pOstream)
Definition: CFitTask.cpp:72
void cleanup()
Definition: CFitTask.cpp:59
virtual CCopasiMethod * createMethod(const int &type) const
Definition: CFitTask.cpp:122