14 VirtualClassStruct::VirtualClassStruct() {
20 : _bookingClassList (iVC._bookingClassList), _yield (iVC._yield),
21 _mean (iVC._mean), _stdDev (iVC._stdDev) {
27 _bookingClassList = ioBookingClassList;
46 std::ostringstream oStr;
47 oStr <<
"Yield: " << _yield
48 <<
", Demand N (" << _mean <<
", " << _stdDev <<
")";
56 const bool isBookingClassListEmpty = _bookingClassList.empty();
57 if (isBookingClassListEmpty ==
false) {
58 assert (isBookingClassListEmpty ==
false);
59 BookingClassList_T::const_iterator itBC = _bookingClassList.begin();
63 const unsigned int lFirstDemandVectorSize = lFirstDemandVector.size();
64 for (
unsigned int i = 0; i < lFirstDemandVectorSize; ++i) {
65 const double& lDemand = lFirstDemandVector[i];
66 lDemandVector.push_back(lDemand);
68 const unsigned int& lDemandVectorSize = lDemandVector.size();
70 for (; itBC != _bookingClassList.end(); ++ itBC) {
72 assert(lBC_ptr != NULL);
75 const unsigned int& lCurrentDemandVectorSize =
76 lCurrentDemandVector.size();
77 assert(lDemandVectorSize == lCurrentDemandVectorSize);
78 for (
unsigned int i = 0; i < lDemandVectorSize; ++i) {
79 lDemandVector[i] += lCurrentDemandVector[i];
Handle on the StdAir library context.
std::list< BookingClass * > BookingClassList_T
void fromStream(std::istream &ioIn)
const GeneratedDemandVector_T getGeneratedDemandVector() const
std::vector< double > GeneratedDemandVector_T
const std::string describe() const
void toStream(std::ostream &ioOut) const
const GeneratedDemandVector_T & getGeneratedDemandVector() const