Public Member Functions | Private Member Functions | Private Attributes | List of all members
ProbabilisticSceneRecognition::MappedProbabilityTable Class Reference

#include <MappedProbabilityTable.h>

Public Member Functions

void add (std::string pType)
 
void add (unsigned int pRow, std::string pType)
 
unsigned int getNumberOfColumns ()
 
unsigned int getNumberOfRows ()
 
double getProbability (unsigned int pRow, std::string pType)
 
void initializeTable (unsigned int pRows)
 
void load (boost::property_tree::ptree &pPt)
 
 MappedProbabilityTable ()
 
 MappedProbabilityTable (boost::property_tree::ptree &pPt)
 
void normalize ()
 
void save (boost::property_tree::ptree &pPt)
 
void setDefaultClassCounter (unsigned int pRow, double pCount)
 
 ~MappedProbabilityTable ()
 

Private Member Functions

unsigned int getIndex (std::string pType)
 

Private Attributes

std::map< std::string, unsigned int > mMappingTypeToIndice
 
boost::shared_ptr< ProbabilityTablemTable
 

Detailed Description

A probability table that handles learning, queries and persistence. Table entries are queried not ba an index, but by a clear text object name.

Definition at line 39 of file MappedProbabilityTable.h.

Constructor & Destructor Documentation

ProbabilisticSceneRecognition::MappedProbabilityTable::MappedProbabilityTable ( )

Constructor.

Definition at line 22 of file MappedProbabilityTable.cpp.

ProbabilisticSceneRecognition::MappedProbabilityTable::MappedProbabilityTable ( boost::property_tree::ptree &  pPt)

Constructor.

Parameters
pPtThe data structure used to load the container from XML.

Definition at line 28 of file MappedProbabilityTable.cpp.

ProbabilisticSceneRecognition::MappedProbabilityTable::~MappedProbabilityTable ( )

Destructor.

Definition at line 37 of file MappedProbabilityTable.cpp.

Member Function Documentation

void ProbabilisticSceneRecognition::MappedProbabilityTable::add ( std::string  pType)

Adds an entry for the given object type.

Parameters
pTypeThe object type to add an entry for.

Definition at line 115 of file MappedProbabilityTable.cpp.

void ProbabilisticSceneRecognition::MappedProbabilityTable::add ( unsigned int  pRow,
std::string  pType 
)

Adds a count for the object in the given row.

Parameters
pRowThe number of the row.
pTypeThe object type to add an entry for.

Definition at line 122 of file MappedProbabilityTable.cpp.

unsigned int ProbabilisticSceneRecognition::MappedProbabilityTable::getIndex ( std::string  pType)
private

Returns the index for the given object type or zero, if not in list.

Returns
Returns the index for the given object type or zero.

Definition at line 142 of file MappedProbabilityTable.cpp.

unsigned int ProbabilisticSceneRecognition::MappedProbabilityTable::getNumberOfColumns ( )

Returns the number of columns in the probability table.

Definition at line 155 of file MappedProbabilityTable.cpp.

unsigned int ProbabilisticSceneRecognition::MappedProbabilityTable::getNumberOfRows ( )

Returns the number of rows in the probability table.

Definition at line 160 of file MappedProbabilityTable.cpp.

double ProbabilisticSceneRecognition::MappedProbabilityTable::getProbability ( unsigned int  pRow,
std::string  pType 
)

Returns the probability for the given object type.

Parameters
pRowThe number of the row the probability should be read from.
pTypeThe type of object to return the probability for.
Returns
Returns the probability for the given object type.

Definition at line 101 of file MappedProbabilityTable.cpp.

void ProbabilisticSceneRecognition::MappedProbabilityTable::initializeTable ( unsigned int  pRows)

Initializes the table based on the mapping.

Parameters
pRowThe number of the row.

Definition at line 95 of file MappedProbabilityTable.cpp.

void ProbabilisticSceneRecognition::MappedProbabilityTable::load ( boost::property_tree::ptree &  pPt)

Loads the content from XML.

Parameters
pPtData structure for handling XML operations.

Definition at line 42 of file MappedProbabilityTable.cpp.

void ProbabilisticSceneRecognition::MappedProbabilityTable::normalize ( )

Normalizes the given probability table so that the values sum up to one.

Definition at line 137 of file MappedProbabilityTable.cpp.

void ProbabilisticSceneRecognition::MappedProbabilityTable::save ( boost::property_tree::ptree &  pPt)

Saves the content to XML.

Parameters
pPtData structure for handling XML operations.

Definition at line 71 of file MappedProbabilityTable.cpp.

void ProbabilisticSceneRecognition::MappedProbabilityTable::setDefaultClassCounter ( unsigned int  pRow,
double  pCount 
)

Sets the counter for the default class.

Parameters
pRowThe number of the row the default class counter should be set.
pCountThe number of counts for the default class.

Definition at line 132 of file MappedProbabilityTable.cpp.

Member Data Documentation

std::map<std::string, unsigned int> ProbabilisticSceneRecognition::MappedProbabilityTable::mMappingTypeToIndice
private

Mapping from human readable object type descriptions (from the ros messages) a probability table index.

Definition at line 144 of file MappedProbabilityTable.h.

boost::shared_ptr<ProbabilityTable> ProbabilisticSceneRecognition::MappedProbabilityTable::mTable
private

The probability table.

Definition at line 139 of file MappedProbabilityTable.h.


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


asr_psm
Author(s): Braun Kai, Gehrung Joachim, Heizmann Heinrich, Meißner Pascal
autogenerated on Fri Nov 15 2019 04:00:09