VariableRelation.h
Go to the documentation of this file.
00001 #ifndef VariableRelation_H
00002 #define VariableRelation_H
00003 
00004 
00005 #include <vector>
00006 #include <map>
00007 #include <string>
00008 #include "MObject.h"
00009 #include "IVariableValue.h"
00010 #include "VariableValue.h"
00011 #include "IVariable.h"
00012 using namespace std;
00013 using namespace momdp;
00014 
00015 namespace momdp
00016 {
00017         // relation entry
00018         class RelEntry : public MObject
00019         {
00020         public:
00021                 //map<string, SharedPointer<IVariableValue> > sourceValues;
00022                 map<string, SharedPointer<IVariableValue> > destValues;
00023                 double prob;
00024         };
00025         // generic class for variable, holds user defined variable value
00026         class VariableRelation : public MObject
00027         {
00028         protected:
00029                 vector<SharedPointer<IVariable> > srcVars;
00030                 SharedPointer<IVariable> destVar;
00031                 
00032         public:
00033                 VariableRelation();
00034                 virtual ~VariableRelation(void);
00035                 
00036                 virtual void addSourceVar(SharedPointer<IVariable> var);
00037                 virtual void setDestVariable(SharedPointer<IVariable> var);
00038                 virtual vector<SharedPointer<IVariable> > getSourceVars();
00039                 virtual SharedPointer<IVariable> getDestVariable();
00040                 
00041                 virtual vector<SharedPointer<RelEntry> > getProb(map<string, SharedPointer<IVariableValue> > sourceVals) = 0;
00042                 
00043         };
00044 
00045         
00046 
00047 }
00048 
00049 #endif
00050 


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