PersistenceModel.h
Go to the documentation of this file.
00001 
00012 #ifndef SPATIAL_TEMPORAL_LEARNING_WORLDLIB_MODEL_PERSISTENCE_MODEL_H_
00013 #define SPATIAL_TEMPORAL_LEARNING_WORLDLIB_MODEL_PERSISTENCE_MODEL_H_
00014 
00015 // worldlib
00016 #include "../world/Item.h"
00017 #include "../world/Surface.h"
00018 
00019 // ROS
00020 #include <ros/duration.h>
00021 #include <ros/time.h>
00022 
00023 // Boost
00024 #include <boost/math/distributions/exponential.hpp>
00025 
00026 namespace rail
00027 {
00028 namespace spatial_temporal_learning
00029 {
00030 namespace worldlib
00031 {
00032 namespace model
00033 {
00034 
00042 class PersistenceModel
00043 {
00044 public:
00056   PersistenceModel(const world::Item &item = world::Item(), const world::Surface &surface = world::Surface(),
00057       const double lambda = 1, const uint32_t count = 0, const ros::Time &last_seen = ros::Time(0));
00058 
00066   const world::Item &getItem() const;
00067 
00075   world::Item &getItem();
00076 
00084   void setItem(const world::Item &item);
00085 
00093   const world::Surface &getSurface() const;
00094 
00102   world::Surface &getSurface();
00103 
00111   void setSurface(const world::Surface &surface);
00112 
00120   double getLambda() const;
00121 
00129   void setLambda(const double lambda);
00130 
00138   ros::Duration getExpectedPersistence() const;
00139 
00148   double getProbabilityItemStillExists(const ros::Time &time = ros::Time::now()) const;
00149 
00158   double getProbabilityItemRemoved(const ros::Time &time = ros::Time::now()) const;
00159 
00167   uint32_t getCount() const;
00168 
00176   void setCount(const uint32_t count);
00177 
00185   const ros::Time &getLastSeen() const;
00186 
00194   ros::Time &getLastSeen();
00195 
00203   void setLastSeen(const ros::Time &last_seen);
00204 
00205 private:
00207   world::Item item_;
00209   world::Surface surface_;
00211   boost::math::exponential_distribution<> exponential_;
00213   uint32_t count_;
00215   ros::Time last_seen_;
00216 };
00217 
00218 }
00219 }
00220 }
00221 }
00222 
00223 #endif


worldlib
Author(s): Russell Toris
autogenerated on Fri Feb 12 2016 00:24:19