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

PartialSumHolder.hpp

Go to the documentation of this file.
00001 #ifndef __RMOL_BOM_PARTIALSUMHOLDER_HPP
00002 #define __RMOL_BOM_PARTIALSUMHOLDER_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // STL
00008 #include <iostream>
00009 // RMOL
00010 #include <rmol/bom/BomAbstract.hpp>
00011 #include <rmol/bom/PartialSumList.hpp>
00012 
00013 namespace RMOL {
00014 
00017   class PartialSumHolder : public BomAbstract {
00021     friend class FacPartialSumHolder;
00022     
00023   public:
00024     // ///////// Getters /////////
00026     const double getPartialSum (const int k) const;
00027 
00030     const int getLowerBound (const double& value) const;
00031 
00033     void initSize (const int K);
00034 
00036     void addPartialSum (const double iPartialSum);
00037 
00041     void sort ();
00042 
00043   public:
00044     // ///////// Display methods ////////
00047     void toStream (std::ostream&) const;
00048 
00051     void fromStream (std::istream&);
00052 
00054     std::string toString() const;
00055 
00058     const std::string describeKey() const;
00059 
00062     const std::string describeShortKey() const;
00063     
00065     const std::string display() const;
00066 
00068     const std::string shortDisplay() const;
00069 
00070     
00071   private:
00073     PartialSumHolder ();
00074     PartialSumHolder (const PartialSumHolder&);
00075 
00077     virtual ~PartialSumHolder();
00078 
00079     
00080   private:
00081     // ///////// Attributes /////////
00083     PartialSumList_T _partialSumList;
00084   };
00085 }
00086 #endif // __RMOL_BOM_PARTIALSUMHOLDER_HPP
SourceForge Logo

Generated on Sat Sep 26 13:13:51 2009 for RMOL by Doxygen 1.6.1