Public Types | Public Member Functions | Protected Attributes
omip::FeaturesDataBase Class Reference

#include <FeaturesDataBase.h>

List of all members.

Public Types

typedef boost::unordered_map
< Feature::Id,
Feature::LocationPair
MapOfFeatureLocationPairs
typedef boost::unordered_map
< Feature::Id,
Feature::Location
MapOfFeatureLocations
typedef boost::unordered_map
< Feature::Id, Feature::Ptr
MapOfFeatures
typedef boost::shared_ptr
< FeaturesDataBase
Ptr

Public Member Functions

bool addFeatureLocation (Feature::Id f_id, Feature::Location f_loc)
Feature::Id addFeatureLocation (Feature::Location f_loc)
void clearListOfAliveFeatureIds ()
 FeaturesDataBase ()
MapOfFeatures getAllFeatures () const
MapOfFeatureLocations getAllFeaturesLastLocation () const
MapOfFeatureLocations getAllFeaturesNextToLastLocation () const
MapOfFeatureLocationPairs getAllFeaturesTwoLastLocations () const
Feature::Ptr getFeature (Feature::Id f_id) const
size_t getFeatureAge (Feature::Id f_id) const
Feature::Ptr getFeatureClone (Feature::Id f_id) const
Feature::Location getFeatureFirstLocation (Feature::Id f_id) const
Feature::Location getFeatureLastLocation (Feature::Id f_id) const
double getFeatureLastX (Feature::Id f_id) const
double getFeatureLastY (Feature::Id f_id) const
double getFeatureLastZ (Feature::Id f_id) const
Feature::Location getFeatureNextToLastLocation (Feature::Id f_id) const
Feature::Location getFeatureNToLastLocation (Feature::Id f_id, int frames_to_last) const
Feature::Trajectory getFeatureTrajectory (Feature::Id f_id) const
Feature::LocationPair getFeatureTwoLastLocations (Feature::Id f_id) const
std::vector< Feature::IdgetListOfAliveFeatureIds () const
int getTime () const
bool isFeatureStored (Feature::Id f_id) const
void step ()
virtual ~FeaturesDataBase ()

Protected Attributes

std::vector< Feature::Id_alive_feat_ids
MapOfFeatures _map_of_features
int _time

Detailed Description

Definition at line 41 of file FeaturesDataBase.h.


Member Typedef Documentation

Definition at line 55 of file FeaturesDataBase.h.

Definition at line 52 of file FeaturesDataBase.h.

Definition at line 49 of file FeaturesDataBase.h.

typedef boost::shared_ptr<FeaturesDataBase> omip::FeaturesDataBase::Ptr

Definition at line 46 of file FeaturesDataBase.h.


Constructor & Destructor Documentation

Constructor

Definition at line 9 of file FeaturesDataBase.cpp.

Destructor

Definition at line 15 of file FeaturesDataBase.cpp.


Member Function Documentation

Add a new location of a Feature that could be already in the data base or not The Id of the Feature is added to the alive Features list

Parameters:
f_id- Id of the Feature that gets a new Location
f_loc- New Location of the Feature
Returns:
- TRUE if the Feature is new and FALSE if it was already contained int he data base

Definition at line 20 of file FeaturesDataBase.cpp.

Add the first location of a new Feature, requiring to create first the new Feature The Id of the Feature is added to the alive Features list

Parameters:
f_loc- First location of the new Feature
Returns:
- Feature Id of the new Feature

Definition at line 42 of file FeaturesDataBase.cpp.

Clear the list of Ids of alive Features Every time a new Location of a contained Feature or the first Location of a new Feature is added, the Id of that Feature gets into the list of alive Features This Function MUST be called before the next iteration!!!! (before it was done internally in the step function)

Definition at line 68 of file FeaturesDataBase.cpp.

Get a map of Feature::Ids -> Feature::Ptr

Returns:
- Map with the shared pointers of all contained Features

Definition at line 324 of file FeaturesDataBase.cpp.

Get a map of Feature::Ids -> Feature last location

Returns:
- Map with the last locations of all contained Features

Definition at line 274 of file FeaturesDataBase.cpp.

Get a map of Feature::Ids -> Feature next to last location

Returns:
- Map with the next to last locations of all contained Features

Definition at line 285 of file FeaturesDataBase.cpp.

Get a map of Feature::Ids -> Feature last and next to last location

Returns:
- Map with last and the next to last locations of all contained Features

Definition at line 296 of file FeaturesDataBase.cpp.

Get a shared pointer to a Feature

Parameters:
f_id- Id of the Feature to get the shared pointer from
Returns:
- Shared pointer to the Feature

Definition at line 93 of file FeaturesDataBase.cpp.

Get the age of a Feature

Parameters:
f_id- Id of the Feature to get the age from
Returns:
- Age of a Feature

Definition at line 202 of file FeaturesDataBase.cpp.

Get the clone of a Feature

Parameters:
f_id- Id of the Feature to get the clone from
Returns:
- Shared pointer to the cloned Feature

Definition at line 78 of file FeaturesDataBase.cpp.

Get first Location of a Feature

Parameters:
f_id- Id of the Feature to get the first Location from
Returns:
- First Location of a Feature

Definition at line 106 of file FeaturesDataBase.cpp.

Get last location of a Feature

Parameters:
f_id- Id of the Feature to get the last Location from
Returns:
- Last Location of a Feature

Definition at line 122 of file FeaturesDataBase.cpp.

Get the x coordinate of the last Location of a Feature

Parameters:
f_id- Id of the Feature to get the x coordinate from
Returns:
- x coordinate of the last Location of a Feature

Definition at line 229 of file FeaturesDataBase.cpp.

Get the y coordinate of the last Location of a Feature

Parameters:
f_id- Id of the Feature to get the y coordinate from
Returns:
- y coordinate of the last Location of a Feature

Definition at line 244 of file FeaturesDataBase.cpp.

Get the z coordinate of the last Location of a Feature

Parameters:
f_id- Id of the Feature to get the z coordinate from
Returns:
- z coordinate of the last Location of a Feature

Definition at line 259 of file FeaturesDataBase.cpp.

Get next to last location of a Feature

Parameters:
f_id- Id of the Feature to get the next to last Location from
Returns:
- Next to last Location of a Feature

Definition at line 138 of file FeaturesDataBase.cpp.

Get the Location of a Feature N frames before the last Location

Parameters:
f_id- Id of the Feature to get the two last Locations from
frames_to_last- Number of frames before the last frame where we want the Location from
Returns:
- Location of a Feature in the last minus N frame

Definition at line 170 of file FeaturesDataBase.cpp.

Get the Trajectory of a Feature

Parameters:
f_id- Id of the Feature to get the Trajectory from
Returns:
- Trajectory of a Feature

Definition at line 186 of file FeaturesDataBase.cpp.

Get the two last Locations (last and next to last) of a Feature

Parameters:
f_id- Id of the Feature to get the two last Locations from
Returns:
- two last Locations of a Feature

Definition at line 154 of file FeaturesDataBase.cpp.

Get a vector containing the Ids of the Features that are still alive

Returns:
- vector of Ids of alive Features

Definition at line 73 of file FeaturesDataBase.cpp.

Get the frame counter of this Database (the number of times that this->step() was called()

Returns:
- Frame counter

Definition at line 329 of file FeaturesDataBase.cpp.

Check if a Feature is stored in the Data base

Parameters:
f_id- Id of the Feature we want to know if is stored or not
Returns:
- TRUE if the Feature with the given Id is in the Database

Definition at line 217 of file FeaturesDataBase.cpp.

Step the Data base: 1: Update the frame counter (used to set the Feature birthdays) 2: Delete from the Data base all Features that have not been updated (get a new Location) in the last step

Definition at line 50 of file FeaturesDataBase.cpp.


Member Data Documentation

Definition at line 235 of file FeaturesDataBase.h.

Definition at line 233 of file FeaturesDataBase.h.

Definition at line 237 of file FeaturesDataBase.h.


The documentation for this class was generated from the following files:


omip_common
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:26:37