COPASI API  4.16.103
CTableauMatrix.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/elementaryFluxModes/CTableauMatrix.h,v $
3 // $Revision: 1.15 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2011/07/08 20:13:34 $
7 // End CVS Header
8 
9 // Copyright (C) 2011 - 2010 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., University of Heidelberg, and The University
11 // of Manchester.
12 // All rights reserved.
13 
14 // Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual
15 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
16 // and The University of Manchester.
17 // All rights reserved.
18 
19 // Copyright (C) 2001 - 2007 by Pedro Mendes, Virginia Tech Intellectual
20 // Properties, Inc. and EML Research, gGmbH.
21 // All rights reserved.
22 
23 /**
24  * CTableauMatrix class.
25  * Used to calculate elementary flux modes
26  *
27  * Created for Copasi by Stefan Hoops 2002-05-08
28  * (C) Stefan Hoops 2002
29  */
30 
31 #ifndef COPASI_CTableauMatrix
32 #define COPASI_CTableauMatrix
33 
34 #include <list>
36 
38 {
39  friend std::ostream & operator << (std::ostream &, const CTableauMatrix &);
40  // Attributes
41 
42 private:
43  /**
44  * Vector containing the lines of the Matrix
45  * @associates <{CTableauLine}>
46  * @supplierCardinality 0..*
47  */
48  std::list< const CTableauLine * > mLine;
49 
50  /**
51  * Iterator pointing to the first irreversible reaction
52  */
53  std::list< const CTableauLine * >::iterator mFirstIrreversible;
54 
55  // Operations
56 
57 public:
58  /**
59  * Default constructor
60  */
62 
63  /**
64  * Specific constructor
65  * The first reversibleNumber lines of stoi must be reversible reactions.
66  * Note: stoi is actually the transpose of the stoichiometry matrix
67  * @param const std::vector < std::vector < double > > & stoi
68  * @param const size_t & reversibleNumber
69  */
70  CTableauMatrix(const std::vector < std::vector < double > > & stoi,
71  const size_t & reversibleNumber);
72 
73  /**
74  * Destructor
75  */
77 
78  /**
79  * Retrieve the number of tableau lines
80  * @return size_t size
81  */
82  size_t size() const;
83 
84  /**
85  * Retrieves the first line from the matrix
86  * @return list< const CTableauLine * >::iterator begin
87  */
88  std::list< const CTableauLine * >::iterator begin();
89 
90  /**
91  * Retrieves the first line from the matrix
92  * @return list< const CTableauLine * >::const_iterator begin
93  */
94  std::list< const CTableauLine * >::const_iterator begin() const;
95 
96  /**
97  * Retrieves the last line from the matrix
98  * @return list< const CTableauLine * >::iterator end
99  */
100  std::list< const CTableauLine * >::iterator end();
101 
102  /**
103  * Retrieves the last line from the matrix
104  * @return list< const CTableauLine * >::const_iterator end
105  */
106  std::list< const CTableauLine * >::const_iterator end() const;
107 
108  /**
109  * Add a line to the matrix
110  * @param const CTableauLine * src
111  * @param const bool & check (Default: true)
112  */
113  void addLine(const CTableauLine * src,
114  const bool & check = true);
115 
116  /**
117  * Remove the indexed line of the matrix
118  * @param "list< const CTableauLine * >::const_iterator" line
119  */
120  void removeLine(const std::list< const CTableauLine * >::iterator line);
121 
122 private:
123  /**
124  * Check whether the new line fullfills the constraints
125  * @param "const CTableauLine *" src
126  */
127  bool isValid(const CTableauLine * src);
128 };
129 
130 #endif // COPASI_CTableauMatrix
std::list< const CTableauLine * >::iterator begin()
size_t size() const
std::list< const CTableauLine * >::iterator end()
void removeLine(const std::list< const CTableauLine * >::iterator line)
std::list< const CTableauLine * >::iterator mFirstIrreversible
bool isValid(const CTableauLine *src)
void addLine(const CTableauLine *src, const bool &check=true)
friend std::ostream & operator<<(std::ostream &, const CTableauMatrix &)
std::list< const CTableauLine * > mLine