Persistence model information. More...
#include <PersistenceModel.h>
Public Member Functions | |
uint32_t | getCount () const |
Count value accessor. | |
ros::Duration | getExpectedPersistence () const |
Expected persistence value accessor. | |
const world::Item & | getItem () const |
Item value accessor (immutable). | |
world::Item & | getItem () |
Item value accessor. | |
double | getLambda () const |
Lambda value accessor. | |
const ros::Time & | getLastSeen () const |
Last seen time value accessor (immutable). | |
ros::Time & | getLastSeen () |
Last seen time value accessor. | |
double | getProbabilityItemRemoved (const ros::Time &time=ros::Time::now()) const |
Probability Item was removed. | |
double | getProbabilityItemStillExists (const ros::Time &time=ros::Time::now()) const |
Probability Item still exists. | |
const world::Surface & | getSurface () const |
Surface value accessor (immutable). | |
world::Surface & | getSurface () |
Surface value accessor. | |
PersistenceModel (const world::Item &item=world::Item(), const world::Surface &surface=world::Surface(), const double lambda=1, const uint32_t count=0, const ros::Time &last_seen=ros::Time(0)) | |
Create a new PersistenceModel. | |
void | setCount (const uint32_t count) |
Count value mutator. | |
void | setItem (const world::Item &item) |
Item value mutator. | |
void | setLambda (const double lambda) |
Lambda value mutator. | |
void | setLastSeen (const ros::Time &last_seen) |
Last seen time value mutator. | |
void | setSurface (const world::Surface &surface) |
Surface value mutator. | |
Private Attributes | |
uint32_t | count_ |
boost::math::exponential_distribution | exponential_ |
world::Item | item_ |
ros::Time | last_seen_ |
world::Surface | surface_ |
Persistence model information.
A persistence model contains information about the estimated time an item will disappear from the surface. Persistence models are in the granularity of hours.
Definition at line 42 of file PersistenceModel.h.
PersistenceModel::PersistenceModel | ( | const world::Item & | item = world::Item() , |
const world::Surface & | surface = world::Surface() , |
||
const double | lambda = 1 , |
||
const uint32_t | count = 0 , |
||
const ros::Time & | last_seen = ros::Time(0) |
||
) |
Create a new PersistenceModel.
Create a new PersistenceModel with the given parameters.
item | The Item of this PersistenceModel (defaults to empty Item). |
surface | The Surface of this PersistenceModel (defaults to empty Surface). |
lambda | The exponential distribution's lambda value of this PersistenceModel (defaults to 1). |
count | The number of observations used to create this model (i.e., our 'n'; defaults to 0). |
last_seen | The last time the item was seen (defaults to 0 time). |
Definition at line 19 of file PersistenceModel.cpp.
uint32_t PersistenceModel::getCount | ( | ) | const |
Count value accessor.
Get the count value of this PersistenceModel.
Definition at line 89 of file PersistenceModel.cpp.
Expected persistence value accessor.
Get the expected persistence duration value of this PersistenceModel.
Definition at line 65 of file PersistenceModel.cpp.
const Item & PersistenceModel::getItem | ( | ) | const |
Item value accessor (immutable).
Get the Item value of this PersistenceModel.
Definition at line 25 of file PersistenceModel.cpp.
Item value accessor.
Get the Item value of this PersistenceModel.
Definition at line 30 of file PersistenceModel.cpp.
double PersistenceModel::getLambda | ( | ) | const |
Lambda value accessor.
Get the lambda value of this PersistenceModel.
Definition at line 55 of file PersistenceModel.cpp.
const ros::Time & PersistenceModel::getLastSeen | ( | ) | const |
Last seen time value accessor (immutable).
Get the time value of this PersistenceModel.
Definition at line 99 of file PersistenceModel.cpp.
Last seen time value accessor.
Get the last seen time value of this PersistenceModel.
Definition at line 104 of file PersistenceModel.cpp.
double PersistenceModel::getProbabilityItemRemoved | ( | const ros::Time & | time = ros::Time::now() | ) | const |
Probability Item was removed.
Get probability the Item was removed from the Surface based on the given time.
time | The time to check the probability for (defaults to now). |
Definition at line 79 of file PersistenceModel.cpp.
double PersistenceModel::getProbabilityItemStillExists | ( | const ros::Time & | time = ros::Time::now() | ) | const |
Probability Item still exists.
Get probability the Item still exists on the Surface based on the given time.
time | The time to check the probability for (defaults to now). |
Definition at line 73 of file PersistenceModel.cpp.
const Surface & PersistenceModel::getSurface | ( | ) | const |
Surface value accessor (immutable).
Get the Surface value of this PersistenceModel.
Definition at line 40 of file PersistenceModel.cpp.
Surface value accessor.
Get the Surface value of this PersistenceModel.
Definition at line 45 of file PersistenceModel.cpp.
void PersistenceModel::setCount | ( | const uint32_t | count | ) |
Count value mutator.
Set the count value of this PersistenceModel.
count | The new count value of this PersistenceModel. |
Definition at line 94 of file PersistenceModel.cpp.
void PersistenceModel::setItem | ( | const world::Item & | item | ) |
Item value mutator.
Set the Item value of this PersistenceModel.
item | The new Item value of this PersistenceModel. |
Definition at line 35 of file PersistenceModel.cpp.
void PersistenceModel::setLambda | ( | const double | lambda | ) |
Lambda value mutator.
Set the lambda value of this PersistenceModel.
lambda | The new lambda value of this PersistenceModel. |
Definition at line 60 of file PersistenceModel.cpp.
void PersistenceModel::setLastSeen | ( | const ros::Time & | last_seen | ) |
Last seen time value mutator.
Set the time value of this PersistenceModel.
last_seen | The new last seen time value of this PersistenceModel. |
Definition at line 109 of file PersistenceModel.cpp.
void PersistenceModel::setSurface | ( | const world::Surface & | surface | ) |
Surface value mutator.
Set the Surface value of this PersistenceModel.
surface | The new Surface value of this PersistenceModel. |
Definition at line 50 of file PersistenceModel.cpp.
uint32_t rail::spatial_temporal_learning::worldlib::model::PersistenceModel::count_ [private] |
The number of observations used to create this model (i.e., our 'n').
Definition at line 213 of file PersistenceModel.h.
boost::math::exponential_distribution rail::spatial_temporal_learning::worldlib::model::PersistenceModel::exponential_ [private] |
The exponential distribution.
Definition at line 211 of file PersistenceModel.h.
The Item value for the model.
Definition at line 207 of file PersistenceModel.h.
The last seen time the Item was observed on the Surface.
Definition at line 215 of file PersistenceModel.h.
world::Surface rail::spatial_temporal_learning::worldlib::model::PersistenceModel::surface_ [private] |
The Surface value for the model.
Definition at line 209 of file PersistenceModel.h.