00001 // EnsembleRunDirector.h: interface for the CEnsembleRunDirector class. 00002 // 00004 00005 #if !defined(AFX_ENSEMBLERUNDIRECTOR_H__34F97A37_EFEC_4BE8_B7D7_B84B2BCE85EF__INCLUDED_) 00006 #define AFX_ENSEMBLERUNDIRECTOR_H__34F97A37_EFEC_4BE8_B7D7_B84B2BCE85EF__INCLUDED_ 00007 00008 #if _MSC_VER > 1000 00009 #pragma once 00010 #endif // _MSC_VER > 1000 00011 00012 #include <cmath> 00013 #include "RunDirector.h" 00014 #include "ParameterReader.h" 00015 #include "GnuPlotterEnsembleRunDirectorObserver.h" 00016 00017 class GnuPlotterEnsembleRunDirectorObserver; // Both files refer to one another 00018 00019 class CEnsembleRunDirector : public CRunDirector 00020 { 00021 public: 00022 CEnsembleRunDirector(int ensembleSize); 00023 virtual ~CEnsembleRunDirector(); 00024 void LoadEnsembleInfo(std::string parameterFile); 00025 void SumAllocate(); 00026 void Execute(); 00027 void ConvertToStatistics(); 00028 const double **GetAverages(int index) const {return (const double **)m_vpdSumC[index];} 00029 const double **GetStdDevs(int index) const {return (const double **)m_vpdSumCSqr[index];} 00030 protected: 00031 int m_iEnsembleSize; 00032 std::vector<double *> m_vpdEnsembleParameters; 00033 std::vector<double **> m_vpdSumC; 00034 std::vector<double **> m_vpdSumCSqr; 00035 std::vector<GnuPlotterEnsembleRunDirectorObserver *> m_vpEnsemblePlotters; 00036 }; 00037 00038 #endif // !defined(AFX_ENSEMBLERUNDIRECTOR_H__34F97A37_EFEC_4BE8_B7D7_B84B2BCE85EF__INCLUDED_)