BinManagerSet.cpp
Go to the documentation of this file.
00001 
00005 #include "BinManagerSet.h"
00006 #include "BinManager.h"
00007 //#include <cmath>
00008 //#include <map>
00009 
00010 namespace momdp
00011 {
00012         //constructor
00013         BinManagerSet::BinManagerSet(BeliefValuePairPoolSet * _bounds)
00014         {
00015                 bounds = _bounds;
00016                 size_t xStateNum = bounds->problem->XStates->size();
00017                 binManagerSet.resize(xStateNum);
00018 
00019                 for (size_t state_indx = 0; state_indx <xStateNum; state_indx++) 
00020                 {
00021                         binManagerSet[state_indx] = new BinManager(bounds->set[state_indx], bounds->set[state_indx]->beliefCache, state_indx); 
00022                 }
00023         }
00024 
00025         void BinManagerSet::updateNode(cacherow_stval cacheIndexRow)
00026         {
00027                 binManagerSet[cacheIndexRow.sval]->updateNode(cacheIndexRow.row);
00028 
00029         }
00030 
00031 
00032         void BinManagerSet::printBinCount()
00033         {
00034                 FOR (stateidx, bounds->problem->XStates->size()) {
00035                         binManagerSet[stateidx]->printBinCount();
00036 
00037                 }
00038         }
00039 
00040 
00041         double BinManagerSet::getBinValue(cacherow_stval cacheIndexRow)
00042         {
00043 
00044                 return binManagerSet[cacheIndexRow.sval]->getBinValue(cacheIndexRow.row);
00045         }
00046 
00047 };


appl
Author(s): petercai
autogenerated on Tue Jan 7 2014 11:02:28