PruneAlphaPlane.h
Go to the documentation of this file.
00001 
00009 #ifndef PruneAlphaPlane_H
00010 #define PruneAlphaPlane_H
00011 
00012 #include "MOMDP.h"
00013 #include "AlphaPlane.h"
00014 using namespace std;
00015 using namespace momdp;
00016 namespace momdp
00017 {
00018         class AlphaPlanePool;
00019         class PruneAlphaPlane 
00020         {
00021         public:
00022                 PruneAlphaPlane();
00023 
00024                 SharedPointer<MOMDP> problem;
00025                 AlphaPlanePool* alphaPlanePool;
00026                 int lastPruneNumPlanes;
00027 
00028                 double global_delta;
00029 
00030                 double pruneTime;
00031                 int numPrune;
00032                 // int state;   //SYL COMMENTED OUT
00033 
00034                 void setup(SharedPointer<MOMDP> _problem, AlphaPlanePool* _alphaPlanePool)
00035                 {
00036                         lastPruneNumPlanes = 0;
00037 
00038                         problem = _problem;
00039                         alphaPlanePool = _alphaPlanePool;
00040                         global_delta = 0.1;
00041 
00042                         pruneTime = 0.0;
00043                         numPrune = 0;
00044                         //state = 2;            //SYLMOD
00045                 }
00047                 //pruning public methods
00049                 void prune(void);
00050                 void prunePlanes(void);
00051                 void pruneNotCertedAndNotUsed(void);
00052                 void updateCertsAndUses(int timeStamp);
00053 
00054                 //statistical methods accessing 'count' and 'used'
00055                 int countUses(void);
00056                 int countUsedPlanes(void);
00057                 int countCerts(void);
00058                 int countCertedPlanes(void);
00059                 void resetUseds(void);//added!! rn 20060925
00060 
00061                 void pruneDynamicDeltaVersion(int timeStamp, int&, int&);  // SYL MOD
00062 
00063                 void Sanity();
00064                 void setDelta(double newDelta);
00065 
00066         protected:
00068                 //protected pruning related methods
00070                 void updateCorners(SharedPointer<AlphaPlane> plane, std::vector<double, std::allocator<double> >* values, std::vector<SharedPointer<AlphaPlane>, std::allocator<SharedPointer<AlphaPlane> > >* indices);
00071                 void updateCerts(SharedPointer<AlphaPlane> plane, double delta, int timeStamp);
00072                 void updateMax(SharedPointer<AlphaPlane> plane, double delta, int timeStamp);
00073                 void updateUsesByCorners(void);
00074                 void updateCertsByDeltaDominance(double delta, int timeStamp);
00075 
00076 
00077 
00078                 void resetAlphaPlaneStateMachine();
00079                 void computePruneStats(int *oP, int *uP);
00080                 //void updateDelta(int overPrune, int underPrune);  // SYL - not used
00081                 //void updateDeltaVersion2(int overPrune, int underPrune);      // SYL - these three moved to Bounds
00082                 //void increaseDelta();
00083                 //void decreaseDelta();
00084 
00085                 static bool isMax(SharedPointer<AlphaPlane> alphaPlane);
00086 
00087         };
00088 };
00089 
00090 #endif // PRUNEALPHA_H


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