COPASI API  4.16.103
CEFMProblem.h
Go to the documentation of this file.
1 /* Begin CVS Header
2  $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/elementaryFluxModes/CEFMProblem.h,v $
3  $Revision: 1.3 $
4  $Name: $
5  $Author: shoops $
6  $Date: 2010/02/03 17:18:42 $
7  End CVS Header */
8 
9 // Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
11 // and The University of Manchester.
12 // All rights reserved.
13 
14 // Copyright (C) 2001 - 2007 by Pedro Mendes, Virginia Tech Intellectual
15 // Properties, Inc. and EML Research, gGmbH.
16 // All rights reserved.
17 
18 /**
19  * File name: CEFMProblem.h
20  *
21  * Programmer: Yongqun He
22  * Contact email: yohe@vt.edu
23  * Purpose: This is the header file of the CEFMProblem class.
24  * It specifies the optimization problem with its own members and
25  * functions. It's used by CEFMAlgorithm class and CEFMimization class
26  */
27 
28 #ifndef COPASI_CEFMProblem
29 #define COPASI_CEFMProblem
30 
31 #include <vector>
32 
34 
35 class CFluxMode;
36 class CReaction;
37 
38 /** @dia:pos -4.4,4.15 */
39 class CEFMProblem : public CCopasiProblem
40 {
41  // Implementation
42 
43 public:
44 
45  /**
46  * Default constructor
47  * @param const CCopasiContainer * pParent (default: NULL)
48  */
49  CEFMProblem(const CCopasiContainer * pParent = NULL);
50 
51  /**
52  * Copy constructor.
53  * @param const CEFMProblem & src
54  * @param const CCopasiContainer * pParent (default: NULL)
55  */
56  CEFMProblem(const CEFMProblem & src,
57  const CCopasiContainer * pParent = NULL);
58 
59  /**
60  * Destructor
61  */
62  virtual ~CEFMProblem();
63 
64  /**
65  * This methods must be called to elevate subgroups to
66  * derived objects. The default implementation does nothing.
67  * @return bool success
68  */
69  virtual bool elevateChildren();
70 
71  /**
72  * Set the call back of the problem
73  * @param CProcessReport * pCallBack
74  * @result bool success
75  */
76  virtual bool setCallBack(CProcessReport * pCallBack);
77 
78  /**
79  * Do all necessary initialization so that calls to calculate will
80  * be successful. This is called once from CCopasiTask::process()
81  * @result bool success
82  */
83  virtual bool initialize();
84 
85  /**
86  * Return the flux modes after a successful analysis.
87  * @return const std::vector< CFluxMode > & fluxModes
88  */
89  const std::vector< CFluxMode > & getFluxModes() const;
90 
91  /**
92  * Return the flux modes after a successful analysis.
93  * @return std::vector< CFluxMode > & fluxModes
94  */
95  std::vector< CFluxMode > & getFluxModes();
96 
97  /**
98  * Return the reactions in the order they are used in the flux modes
99  * @return const std::vector< const CReaction * > & reorderedReactions
100  */
101  const std::vector< const CReaction * > & getReorderedReactions() const;
102 
103  /**
104  * Return the reactions in the order they are used in the flux modes
105  * @return std::vector< const CReaction * > & reorderedReactions
106  */
107  std::vector< const CReaction * > & getReorderedReactions();
108 
109  /**
110  * This is the output method for any result of a problem. The default implementation
111  * provided with CCopasiProblem. Does only print "Not implemented." To override this
112  * default behavior one needs to reimplement the virtual printResult function.
113  * @param std::ostream * ostream
114  */
115  virtual void printResult(std::ostream * ostream) const;
116 
117 private:
118  /**
119  * Allocates all group parameters and assures that they are
120  * properly initialized.
121  */
122  void initializeParameter();
123 
124  void initObjects();
125 
126  // Attributes
127 protected:
128  /**
129  * The resulting elementary flux modes
130  */
131  std::vector< CFluxMode > mFluxModes;
132 
133  /**
134  * Reactions in the order used in the analysis
135  */
136  std::vector< const CReaction * > mReorderedReactions;
137 };
138 
139 #endif // COPASI_CEFMProblem
void initObjects()
Definition: CEFMProblem.cpp:72
void initializeParameter()
Definition: CEFMProblem.cpp:59
CEFMProblem(const CCopasiContainer *pParent=NULL)
Definition: CEFMProblem.cpp:35
virtual bool initialize()
Definition: CEFMProblem.cpp:75
const std::vector< CFluxMode > & getFluxModes() const
Definition: CEFMProblem.cpp:80
virtual bool setCallBack(CProcessReport *pCallBack)
Definition: CEFMProblem.cpp:65
const std::vector< const CReaction * > & getReorderedReactions() const
Definition: CEFMProblem.cpp:86
virtual ~CEFMProblem()
Definition: CEFMProblem.cpp:56
std::vector< const CReaction * > mReorderedReactions
Definition: CEFMProblem.h:135
std::vector< CFluxMode > mFluxModes
Definition: CEFMProblem.h:130
virtual void printResult(std::ostream *ostream) const
Definition: CEFMProblem.cpp:92
virtual bool elevateChildren()
Definition: CEFMProblem.cpp:62