Rewards.cpp
Go to the documentation of this file.
00001 #include "Rewards.h"
00002 #include "BeliefWithState.h"
00003 #include "Actions.h"
00004 
00005 Rewards::Rewards(void)
00006 {
00007 }
00008 
00009 Rewards::~Rewards(void)
00010 {
00011 }
00012 SharedPointer<SparseMatrix> Rewards::getMatrix(int x)
00013 {
00014         return matrix[x];
00015 }
00016 REAL_VALUE Rewards::getReward(BeliefWithState& b, int a)
00017 {
00018         int Xc = b.sval; // currrent value for observed state variable
00019         SharedPointer<belief_vector> Bc = b.bvec; // current belief for unobserved state variable
00020 
00021         if (!(matrix[Xc]->isColumnEmpty(a)))
00022         {
00023                 return inner_prod_column( *matrix[Xc], a, *Bc );
00024         }
00025         else
00026         {
00027                 return 0;
00028         }
00029 }


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