#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< ProbabilityTable > | mTable |
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.
| ProbabilisticSceneRecognition::MappedProbabilityTable::MappedProbabilityTable | ( | ) |
Constructor.
Definition at line 22 of file MappedProbabilityTable.cpp.
| ProbabilisticSceneRecognition::MappedProbabilityTable::MappedProbabilityTable | ( | boost::property_tree::ptree & | pPt | ) |
Constructor.
| pPt | The 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.
| void ProbabilisticSceneRecognition::MappedProbabilityTable::add | ( | std::string | pType | ) |
Adds an entry for the given object type.
| pType | The 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.
| pRow | The number of the row. |
| pType | The object type to add an entry for. |
Definition at line 122 of file MappedProbabilityTable.cpp.
|
private |
Returns the index for the given object type or zero, if not in list.
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.
| pRow | The number of the row the probability should be read from. |
| pType | The type of object to return the probability for. |
Definition at line 101 of file MappedProbabilityTable.cpp.
| void ProbabilisticSceneRecognition::MappedProbabilityTable::initializeTable | ( | unsigned int | pRows | ) |
Initializes the table based on the mapping.
| pRow | The 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.
| pPt | Data 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.
| pPt | Data 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.
| pRow | The number of the row the default class counter should be set. |
| pCount | The number of counts for the default class. |
Definition at line 132 of file MappedProbabilityTable.cpp.
|
private |
Mapping from human readable object type descriptions (from the ros messages) a probability table index.
Definition at line 144 of file MappedProbabilityTable.h.
|
private |
The probability table.
Definition at line 139 of file MappedProbabilityTable.h.