RMOL Logo Get Revenue Management Optimisation Library at SourceForge.net. Fast, secure and Free Open Source software downloads

HistoricalDataHolder.hpp

Go to the documentation of this file.
00001 #ifndef __RMOL_BOM_HISTORICALDATAHOLDER_HPP
00002 #define __RMOL_BOM_HISTORICALDATAHOLDER_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // STL
00008 #include <vector>
00009 // RMOL
00010 #include <rmol/bom/StructAbstract.hpp>
00011 
00012 namespace RMOL {
00013     
00023   struct HistoricalDataHolder : public StructAbstract {
00024       
00025   public:
00026     // Getters
00028     const double getNumberOfHistoricalData() const {
00029       return _historicalDataVector.size();
00030     }
00031 
00033     const double& getHistoricalData(const short i) const {
00034       return _historicalDataVector.at(i);
00035     }
00036     
00038     const double getMean () const;
00039 
00041     const double getStandardDeviation (const double& iMean) const;
00042 
00044     void addHistoricalData (const double iHistoricalData) {
00045       _historicalDataVector.push_back(iHistoricalData);
00046     }
00047 
00051     void toStream (std::ostream& ioOut) const;
00052 
00053     // ///////// Display Methods //////////
00055     const std::string describe() const;
00056       
00058     void display () const;
00059       
00061     virtual ~HistoricalDataHolder();
00062       
00063   public:
00065     HistoricalDataHolder ();
00066 
00067     HistoricalDataHolder (const HistoricalDataHolder&);
00068       
00069   private:
00071     std::vector<double> _historicalDataVector;
00072   };
00073 }
00074 #endif // __RMOL_BOM_HISTORICALDATAHOLDER_HPP
SourceForge Logo

Generated on Sun Mar 7 13:11:10 2010 for RMOL by Doxygen 1.6.1