DiscreteConditional evaluate method for conditionals
parent
de652eafc2
commit
b57e448232
|
@ -24,13 +24,13 @@
|
|||
#include <gtsam/hybrid/HybridValues.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <random>
|
||||
#include <set>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
|
||||
using namespace std;
|
||||
using std::pair;
|
||||
|
@ -478,6 +478,11 @@ double DiscreteConditional::evaluate(const HybridValues& x) const {
|
|||
return this->evaluate(x.discrete());
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
double DiscreteConditional::evaluate(const Assignment<Key>& values) const {
|
||||
return BaseFactor::evaluate(values);
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
double DiscreteConditional::negLogConstant() const { return 0.0; }
|
||||
|
||||
|
|
|
@ -249,6 +249,9 @@ class GTSAM_EXPORT DiscreteConditional
|
|||
*/
|
||||
double evaluate(const HybridValues& x) const override;
|
||||
|
||||
/// Evaluate the conditional given values.
|
||||
virtual double evaluate(const Assignment<Key>& values) const override;
|
||||
|
||||
using BaseConditional::operator(); ///< HybridValues version
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue