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

EnsembleCombinationDirector.h

Go to the documentation of this file.
00001 // EnsembleCombinationDirector.h: interface for the CEnsembleCombinationDirector class.
00002 //
00004 
00005 #if !defined(AFX_ENSEMBLECOMBINATIONDIRECTOR_H__88C5875B_DD03_4339_BBDB_AF090CBA1D96__INCLUDED_)
00006 #define AFX_ENSEMBLECOMBINATIONDIRECTOR_H__88C5875B_DD03_4339_BBDB_AF090CBA1D96__INCLUDED_
00007 
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011 
00012 #include <iomanip>
00013 #include <iostream>
00014 #include "RunDirector.h"
00015 #include "SingleNetworkMinimizable.h"
00016 #include "GnuPlotterEnsembleRunDirectorObserver.h"
00017 #include "GnuPlotterEnsembleDataDirectorObserver.h"
00018 #include "ParameterReader.h"
00019 
00020 // avoid conflicts; both files refer to one another
00021 
00022 class GnuPlotterEnsembleRunDirectorObserver; 
00023 class GnuPlotterEnsembleDataDirectorObserver; 
00024 
00025 class CEnsembleCombinationDirector : public CRunDirector  
00026 {
00027 public:
00028         CEnsembleCombinationDirector(int ensembleSize);
00029         virtual ~CEnsembleCombinationDirector();
00030         void LoadEnsembleInfo(std::string parameterFile);
00031         void SumAllocate();
00032         void Execute();
00033         void ConvertToStatistics();
00034         const double **GetNoDataAverages(int index) const {return (const double **)m_vpdNoDataSumC[index];}
00035         const double **GetNoDataStdDevs(int index) const {return (const double **)m_vpdNoDataSumCSqr[index];}
00036         const double **GetDataAverages(int index) const {return (const double **)m_vpdDataSumC[index];}
00037         const double **GetDataStdDevs(int index) const {return (const double **)m_vpdDataSumCSqr[index];}
00038         // Returns a single mover associated with the networks
00039         virtual CReactionMover *GetMover(int moverIndex) {return m_vpMovers[moverIndex];}
00040         // Returns the number of experiments
00041         virtual int GetNExperiments() const {return m_vpExperiments.size();}
00042         virtual SingleNetworkMinimizable *GetMinimizable(int minIndex) {return m_vpMinimizables[minIndex];}
00043 private:
00044         // Initialization of conditions for each minimizable
00045         virtual void DefineExperiments() = 0;
00046         // Initialization of conditions for the runnables
00047         virtual void DefineRuns() = 0;
00048 protected:
00049         int m_iEnsembleSize;
00050         std::vector<double *> m_vpdEnsembleParameters;
00051         // go with runnables
00052         std::vector<double **> m_vpdNoDataSumC;
00053         std::vector<double **> m_vpdNoDataSumCSqr;
00054         // go with minimizables
00055         std::vector<double **> m_vpdDataSumC;
00056         std::vector<double **> m_vpdDataSumCSqr;
00057         std::vector<GnuPlotterEnsembleRunDirectorObserver *> m_vpEnsembleRunPlotters;
00058         std::vector<GnuPlotterEnsembleDataDirectorObserver *> m_vpEnsembleDataPlotters;
00059         // organizes the minimizables
00060         std::vector<SingleNetworkMinimizable *> m_vpMinimizables;
00061         std::vector<Experiment *> m_vpExperiments;
00062         std::vector<ReactionNetwork *> m_vpNetworks;
00063         std::vector<CReactionMover *> m_vpMovers;
00064 };
00065 
00066 #endif // !defined(AFX_ENSEMBLECOMBINATIONDIRECTOR_H__88C5875B_DD03_4339_BBDB_AF090CBA1D96__INCLUDED_)

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