9 #include <stdair/basic/BasConst_General.hpp>
10 #include <stdair/basic/BasConst_Inventory.hpp>
11 #include <stdair/bom/BomManager.hpp>
12 #include <stdair/bom/SegmentCabin.hpp>
13 #include <stdair/bom/BookingClass.hpp>
14 #include <stdair/service/Logger.hpp>
24 bool isSucceeded =
true;
28 const stdair::BookingClassList_T& lBCList =
29 stdair::BomManager::getList<stdair::BookingClass> (iSegmentCabin);
30 for (stdair::BookingClassList_T::const_iterator itBC = lBCList.begin();
31 itBC != lBCList.end(); ++itBC) {
32 stdair::BookingClass* lBC_ptr = *itBC;
33 assert (lBC_ptr != NULL);
35 const stdair::MeanValue_T& lPriceDemMean = lBC_ptr->getPriceDemMean();
36 const stdair::StdDevValue_T& lPriceStdDev = lBC_ptr->getPriceDemStdDev();
37 const stdair::MeanValue_T& lProductDemMean = lBC_ptr->getProductDemMean();
38 const stdair::StdDevValue_T& lProductStdDev =
39 lBC_ptr->getProductDemStdDev();
41 const stdair::MeanValue_T lNewMeanValue = lPriceDemMean + lProductDemMean;
42 const stdair::StdDevValue_T lNewStdDev =
43 std::sqrt(lPriceStdDev*lPriceStdDev + lProductStdDev*lProductStdDev);
45 lBC_ptr->setMean (lNewMeanValue);
46 lBC_ptr->setStdDev (lNewStdDev);