#include <ProbabilityTable.h>
Public Member Functions | |
| void | add (unsigned int pRow, unsigned int pColumn, unsigned int pCounts) |
| unsigned int | getNumberOfColumns () |
| unsigned int | getNumberOfRows () |
| double | getProbability (unsigned int pRow, unsigned int pColumn) |
| void | load (boost::property_tree::ptree &pPt) |
| void | normalize () |
| ProbabilityTable () | |
| ProbabilityTable (unsigned int pRows, unsigned int pColums) | |
| ProbabilityTable (boost::property_tree::ptree &pPt) | |
| void | save (boost::property_tree::ptree &pPt) |
| ~ProbabilityTable () | |
Private Attributes | |
| std::vector< std::vector< double > > | mEntries |
A probability table that handles learning, queries and persistence.
Definition at line 38 of file ProbabilityTable.h.
| ProbabilisticSceneRecognition::ProbabilityTable::ProbabilityTable | ( | ) |
Constructor.
Definition at line 22 of file ProbabilityTable.cpp.
| ProbabilisticSceneRecognition::ProbabilityTable::ProbabilityTable | ( | unsigned int | pRows, |
| unsigned int | pColums | ||
| ) |
Constructor.
| pRows | The number of rows. |
| pColums | The number of columns. |
Definition at line 26 of file ProbabilityTable.cpp.
| ProbabilisticSceneRecognition::ProbabilityTable::ProbabilityTable | ( | boost::property_tree::ptree & | pPt | ) |
Constructor.
| pPt | The data structure used to load the container from XML. |
Definition at line 36 of file ProbabilityTable.cpp.
| ProbabilisticSceneRecognition::ProbabilityTable::~ProbabilityTable | ( | ) |
Destructor.
Definition at line 41 of file ProbabilityTable.cpp.
| void ProbabilisticSceneRecognition::ProbabilityTable::add | ( | unsigned int | pRow, |
| unsigned int | pColumn, | ||
| unsigned int | pCounts | ||
| ) |
Adds the given number of counts to the given entry.
| pRow | The number of the row. |
| pColumn | The number of the column. |
| pCounts | The number of counts to add. |
Definition at line 113 of file ProbabilityTable.cpp.
| unsigned int ProbabilisticSceneRecognition::ProbabilityTable::getNumberOfColumns | ( | ) |
Returns the number of columns in the probability table.
Definition at line 103 of file ProbabilityTable.cpp.
| unsigned int ProbabilisticSceneRecognition::ProbabilityTable::getNumberOfRows | ( | ) |
Returns the number of rows in the probability table.
Definition at line 108 of file ProbabilityTable.cpp.
| double ProbabilisticSceneRecognition::ProbabilityTable::getProbability | ( | unsigned int | pRow, |
| unsigned int | pColumn | ||
| ) |
Returns the probability for the given object type.
| pRow | The number of the row. |
| pColumn | The number of the column. |
Definition at line 89 of file ProbabilityTable.cpp.
| void ProbabilisticSceneRecognition::ProbabilityTable::load | ( | boost::property_tree::ptree & | pPt | ) |
Loads the content from XML.
| pPt | Data structure for handling XML operations. |
Definition at line 46 of file ProbabilityTable.cpp.
| void ProbabilisticSceneRecognition::ProbabilityTable::normalize | ( | ) |
Normalizes the given probability table so that the values sum up to one.
Definition at line 127 of file ProbabilityTable.cpp.
| void ProbabilisticSceneRecognition::ProbabilityTable::save | ( | boost::property_tree::ptree & | pPt | ) |
Saves the content to XML.
| pPt | Data structure for handling XML operations. |
Definition at line 67 of file ProbabilityTable.cpp.
|
private |
The entries of the table. To be a valid probability distribution, they must sum up to one.
Definition at line 118 of file ProbabilityTable.h.