Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ReactionNetwork.h

Go to the documentation of this file.
00001 // ReactionNetwork.h: interface for the ReactionNetwork class.
00002 //
00004 
00005 #if !defined(AFX_REACTIONNETWORK_H__17E9EE61_DB43_11D3_8099_00A0C9B3BB18__INCLUDED_)
00006 #define AFX_REACTIONNETWORK_H__17E9EE61_DB43_11D3_8099_00A0C9B3BB18__INCLUDED_
00007 
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011 
00012 #ifdef _WIN32
00013 #include <strstream>
00014 #endif
00015 
00016 #include <vector>
00017 #include <fstream>
00018 #include <iostream>
00019 //#include <strstrea.h>
00020 #include <algorithm>
00021 #include "Reaction.h"
00022 #include "Chemical.h"
00023 #include "RateConstant.h"
00024 #include "SubjectObserver.h"
00025 
00026 class Reaction;         // Avoid recursion
00027 class Chemical;
00028 class RateConstant;
00029 
00030 class ReactionNetwork
00031 {
00032 public:
00033         ReactionNetwork();
00034         virtual ~ReactionNetwork();
00035         virtual Chemical *GetChemical(int chemicalNumber);
00036         virtual RateConstant *GetRateConstant(int rateConstantNumber);
00037         virtual Reaction *GetReaction(int reactionNumber);
00038         virtual int GetNumberOfRateConstants() const;
00039         virtual int GetNumberOfReactions() const;
00040         virtual int GetNumberOfChemicals() const;
00041         virtual int GetNumberOfAlgebraicChemicals() const;
00042         virtual void SetAmount(int chemicalNumber, double amount);
00043         virtual void AddAlgebraicIndex(Chemical *chemical);
00044         virtual void ChemicalReset();
00045         virtual void RateConstantReset();
00046         virtual std::vector<int> *GetAlgebraicIndices();
00047         virtual std::vector<Reaction*> *GetReactions();
00048         virtual std::vector<Chemical*> *GetChemicals();
00049         virtual std::vector<RateConstant*> *GetRateConstants();
00050         virtual std::vector<double> *GetReactionRates();
00051         // this could be a dangerous function, but used properly it allows one to 
00052         // model simple Loss-of-Function mutations without changing the number of
00053         // parameters (very useful for ensembles where a couple of the networks 
00054         // are only different in a subtle way)
00055         virtual void RemoveReaction(int rxnNumber);
00056         virtual void DumpTeXForm(std::string fileName);
00057         virtual void DumpPetriNetDotFile(std::string fileName);
00058         virtual int GetNTermsPerLine() {return 1;}
00059         virtual bool GetLRGraph() {return false;}
00060 protected:      // Probably should be private!  protected should be fine.
00061         std::vector<Chemical*> chemicals;
00062         std::vector<Reaction*> reactions;
00063         std::vector<RateConstant*> rateConstants;       
00064         std::vector<double> reactionRates;
00065         std::vector<int> algebraicIndices;
00066 };
00067 
00068 #endif // !defined(AFX_REACTIONNETWORK_H__17E9EE61_DB43_11D3_8099_00A0C9B3BB18__INCLUDED_)

Generated on Mon Nov 3 09:38:12 2003 by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002