00001 #ifndef InRangeAllNto1VarRel_H 00002 #define InRangeAllNto1VarRel_H 00003 00004 00005 #include <vector> 00006 #include <string> 00007 #include "MObject.h" 00008 #include "IVariableValue.h" 00009 #include "IVariable.h" 00010 #include "VariableValue.h" 00011 #include "Variable.h" 00012 #include "BooleanVariable.h" 00013 #include "VariableRelation.h" 00014 #include "Map2DPosValue.h" 00015 #include "Map2DPosVar.h" 00016 using namespace std; 00017 using namespace momdp; 00018 00019 namespace momdp 00020 { 00021 // generic class for variable, holds user defined variable value 00022 class InRangeAllNto1VarRel: public VariableRelation 00023 { 00024 private: 00025 vector<SharedPointer<Map2DPosVar> > mapSrcVars; 00026 SharedPointer<Map2DPosVar> mapDestVar; 00027 SharedPointer<BooleanVariable> resultVar; 00028 double range; 00029 00030 public: 00031 00032 InRangeAllNto1VarRel(SharedPointer<BooleanVariable> resultVar, SharedPointer<Map2DPosVar> mapDestVar, double range); 00033 virtual ~InRangeAllNto1VarRel(void); 00034 00035 void addSrcVar(SharedPointer<Map2DPosVar> srcVar); 00036 virtual vector<SharedPointer<RelEntry> > getProb(map<string, SharedPointer<IVariableValue> > sourceVals) ; 00037 00038 }; 00039 00040 } 00041 00042 #endif 00043