TraDemGen Logo  1.00.8
C++ Simulated Travel Demand Generation Library
DemandDistribution.cpp
Go to the documentation of this file.
1// //////////////////////////////////////////////////////////////////////
2// Import section
3// //////////////////////////////////////////////////////////////////////
4// STL
5#include <cassert>
6#include <sstream>
7// StdAir
8#include <stdair/stdair_date_time_types.hpp>
9// TraDemGen
11
12namespace TRADEMGEN {
13
14 // /////////////////////////////////////////////////////
15 DemandDistribution::DemandDistribution (const stdair::NbOfRequests_T& iMean,
16 const stdair::StdDevValue_T& iStdDev)
17 : _meanNumberOfRequests (iMean),
18 _stdDevNumberOfRequests (iStdDev) {
19 }
20
21 // /////////////////////////////////////////////////////
23 }
24
25 // /////////////////////////////////////////////////////
27 }
28
29 // /////////////////////////////////////////////////////
31 DemandDistribution (const DemandDistribution& iDemandDistribution)
32 : _meanNumberOfRequests (iDemandDistribution._meanNumberOfRequests),
33 _stdDevNumberOfRequests (iDemandDistribution._stdDevNumberOfRequests) {
34 }
35
36 // /////////////////////////////////////////////////////
37 void DemandDistribution::fromStream (std::istream& ioIn) {
38 }
39
40 // /////////////////////////////////////////////////////
41 const std::string DemandDistribution::describe() const {
42 std::ostringstream oStr;
43 oStr << "N (" << _meanNumberOfRequests << ", "
45 return oStr.str();
46 }
47
48 // /////////////////////////////////////////////////////
49 std::string DemandDistribution::display() const {
50 std::ostringstream oStr;
51 oStr << describe() << std::endl;
52 return oStr.str();
53 }
54
55}
56
Class modeling the distribution of a demand type.
stdair::NbOfRequests_T _meanNumberOfRequests
void fromStream(std::istream &ioIn)
const std::string describe() const
stdair::StdDevValue_T _stdDevNumberOfRequests