00001 // ChemicalTimeSeriesData.h: interface for the ChemicalTimeSeriesData class. 00002 // 00004 00005 #if !defined(AFX_CHEMICALTIMESERIESDATA_H__DF38E9BB_9342_4B5F_8516_BBAECCE50783__INCLUDED_) 00006 #define AFX_CHEMICALTIMESERIESDATA_H__DF38E9BB_9342_4B5F_8516_BBAECCE50783__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 "DataPoint.h" 00017 #include "TimeVectorPoint.h" 00018 #include "ReactionNetwork.h" 00019 #include "typedefs.h" 00020 #include <string> 00021 #include <algorithm> 00022 #include <fstream> 00023 #include <sstream> 00024 //#include <strstrea.h> 00025 #include <assert.h> 00026 #include <stdexcept> 00027 00028 00029 class ChemicalTimeSeriesData : public DataPoint 00030 { 00031 public: 00032 ChemicalTimeSeriesData(ReactionNetwork *reactionNetwork, std::string fileName); 00033 ChemicalTimeSeriesData(ReactionNetwork *reactionNetwork); 00034 virtual ~ChemicalTimeSeriesData(); 00035 std::vector<DataPoint *> GetTimeSeries(int chemIndex); 00036 std::vector<TimeVectorPoint *> GetTimeVector() {return timeVector;} 00037 void AttachNewTimeSeries(ReactionNetwork *reactionNetwork, std::string fileName); 00038 void SortChemTimeSeriesData(); 00039 void SortTimeVector(); 00040 void TimeVectorSynchronize(); 00041 // searches the time vector and returns the next time stored in 00042 // the time vector (indicating there is data at that time) >= the 00043 // time given to the function 00044 double GetNextDataTime(double time); 00045 double GetLatestDataTime(); 00046 int GetNDataPoints(); 00047 int GetNTimeSeries(); 00048 int GetNChemicals(); 00049 private: 00050 int nChem; 00051 int nTimeSeries; 00052 // Units will be used later for different experimental data formats 00053 // (fold over basal, % total, etc.) 00054 std::string m_sUnits; 00055 std::vector<TimeVectorPoint *> timeVector; 00056 vvpDataPoint chemData; 00057 }; 00058 00059 #endif // !defined(AFX_CHEMICALTIMESERIESDATA_H__DF38E9BB_9342_4B5F_8516_BBAECCE50783__INCLUDED_)