TraDemGen Logo  0.2.2
C++ Simulated Travel Demand Generation Library
DemandDistribution.cpp
Go to the documentation of this file.
00001 // //////////////////////////////////////////////////////////////////////
00002 // Import section
00003 // //////////////////////////////////////////////////////////////////////
00004 // STL
00005 #include <cassert>
00006 #include <sstream>
00007 // StdAir
00008 #include <stdair/stdair_date_time_types.hpp>
00009 // TraDemGen
00010 #include <trademgen/basic/DemandDistribution.hpp>
00011 
00012 namespace TRADEMGEN {
00013 
00014   // /////////////////////////////////////////////////////
00015   DemandDistribution::DemandDistribution (const stdair::NbOfRequests_T& iMean,
00016                                           const stdair::StdDevValue_T& iStdDev)
00017     : _meanNumberOfRequests (iMean),
00018       _stdDevNumberOfRequests (iStdDev) {
00019   }
00020   
00021   // /////////////////////////////////////////////////////
00022   DemandDistribution::DemandDistribution() {
00023   }
00024   
00025   // /////////////////////////////////////////////////////
00026   DemandDistribution::~DemandDistribution() {
00027   }
00028   
00029   // /////////////////////////////////////////////////////
00030   DemandDistribution::
00031   DemandDistribution (const DemandDistribution& iDemandDistribution)
00032     : _meanNumberOfRequests (iDemandDistribution._meanNumberOfRequests),
00033       _stdDevNumberOfRequests (iDemandDistribution._stdDevNumberOfRequests) {
00034   }
00035   
00036   // /////////////////////////////////////////////////////
00037   void DemandDistribution::fromStream (std::istream& ioIn) {
00038   }
00039 
00040   // /////////////////////////////////////////////////////
00041   const std::string DemandDistribution::describe() const {
00042     std::ostringstream oStr;
00043     oStr << "N (" << _meanNumberOfRequests << ", "
00044          << _stdDevNumberOfRequests << ")";
00045     return oStr.str();
00046   }
00047     
00048   // /////////////////////////////////////////////////////
00049   std::string DemandDistribution::display() const {
00050     std::ostringstream oStr;
00051     oStr << describe() << std::endl;
00052     return oStr.str();
00053   }
00054     
00055 }
00056