Fix docs
parent
d8abdc280d
commit
7e956d2bb7
|
|
@ -248,17 +248,17 @@ void DiscreteConditional::solveInPlace(DiscreteValues* values) const {
|
|||
// Get all Possible Configurations
|
||||
const auto allPosbValues = frontalAssignments();
|
||||
|
||||
// Find the MPE
|
||||
// Find the maximum
|
||||
for (const auto& frontalVals : allPosbValues) {
|
||||
double pValueS = pFS(frontalVals); // P(F=value|S=parentsValues)
|
||||
// Update MPE solution if better
|
||||
// Update maximum solution if better
|
||||
if (pValueS > maxP) {
|
||||
maxP = pValueS;
|
||||
mpe = frontalVals;
|
||||
}
|
||||
}
|
||||
|
||||
// set values (inPlace) to mpe
|
||||
// set values (inPlace) to maximum
|
||||
for (Key j : frontals()) {
|
||||
(*values)[j] = mpe[j];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ class GTSAM_EXPORT DiscreteConditional
|
|||
/**
|
||||
* solve a conditional
|
||||
* @param parentsValues Known values of the parents
|
||||
* @return MPE value of the child (1 frontal variable).
|
||||
* @return maximum value for the (single) frontal variable.
|
||||
*/
|
||||
size_t solve(const DiscreteValues& parentsValues) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,15 +25,12 @@
|
|||
namespace gtsam {
|
||||
|
||||
/**
|
||||
* TODO: Update comments. The following comments are out of date!!!
|
||||
*
|
||||
* Base class for conditional densities, templated on KEY type. This class
|
||||
* provides storage for the keys involved in a conditional, and iterators and
|
||||
* Base class for conditional densities. This class iterators and
|
||||
* access to the frontal and separator keys.
|
||||
*
|
||||
* Derived classes *must* redefine the Factor and shared_ptr typedefs to refer
|
||||
* to the associated factor type and shared_ptr type of the derived class. See
|
||||
* IndexConditional and GaussianConditional for examples.
|
||||
* SymbolicConditional and GaussianConditional for examples.
|
||||
* \nosubgrouping
|
||||
*/
|
||||
template<class FACTOR, class DERIVEDCONDITIONAL>
|
||||
|
|
|
|||
Loading…
Reference in New Issue