COPASI API  4.16.103
CMoietiesProblem.cpp
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/moieties/CMoietiesProblem.cpp,v $
3 // $Revision: 1.2 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2008/03/12 02:12:24 $
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 #include "copasi.h"
15 
16 #include "CMoietiesProblem.h"
17 
18 #include "model/CModel.h"
20 
21 // Default constructor
23  const CCopasiContainer * pParent):
24  CCopasiProblem(type, pParent)
25 {}
26 
27 // copy constructor
29  const CCopasiContainer * pParent):
30  CCopasiProblem(src, pParent)
31 {}
32 
33 // Destructor
35 {}
36 
37 void CMoietiesProblem::printResult(std::ostream * pOstream) const
38  {
39  if (mpModel == NULL) return;
40 
41  // Print all Moieties
42  *pOstream << "Dependent Species" << "\t";
43  *pOstream << "Total Amount" << "\t";
44  *pOstream << "Expression" << std::endl;
45 
48  for (; it != end; ++it)
49  {
50  *pOstream << (*it)->getObjectName() << "\t";
51  *pOstream << (*it)->getNumber() << "\t";
52  *pOstream << (*it)->getDescription(mpModel) << std::endl;
53  }
54  *pOstream << std::endl;
55 
56  // Print Reordered Stoichiometry Matrix
57  *pOstream << *dynamic_cast<const CArrayAnnotation *>(mpModel->getObject(CCopasiObjectName("Array=Stoichiometry(ann)"))) << std::endl;
58 
59  // Print Link Matrix
60  *pOstream << *dynamic_cast<const CArrayAnnotation *>(mpModel->getObject(CCopasiObjectName("Array=Link matrix(ann)"))) << std::endl;
61 
62  // Print Reduced Stoichiometry Matrix
63  *pOstream << *dynamic_cast<const CArrayAnnotation *>(mpModel->getObject(CCopasiObjectName("Array=Reduced stoichiometry(ann)"))) << std::endl;
64 
65  return;
66  }
iterator begin()
virtual ~CMoietiesProblem()
const CCopasiVector< CMoiety > & getMoieties() const
Definition: CModel.cpp:1163
iterator end()
Header file of class CArrayAnnotation.
virtual void printResult(std::ostream *pOstream) const
CModel * mpModel
virtual const CObjectInterface * getObject(const CCopasiObjectName &cn) const
CMoietiesProblem(const CCopasiTask::Type &type=CCopasiTask::moieties, const CCopasiContainer *pParent=NULL)