more fixes
parent
199c0a0f24
commit
214bf4ec1a
|
@ -67,7 +67,7 @@ namespace gtsam {
|
||||||
DecisionTreeFactor DiscreteFactorGraph::product() const {
|
DecisionTreeFactor DiscreteFactorGraph::product() const {
|
||||||
DecisionTreeFactor result;
|
DecisionTreeFactor result;
|
||||||
for (const sharedFactor& factor : *this) {
|
for (const sharedFactor& factor : *this) {
|
||||||
if (factor) result = result * (*factor);
|
if (factor) result = (*factor) * result;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -254,7 +254,7 @@ namespace gtsam {
|
||||||
// now divide product/sum to get conditional
|
// now divide product/sum to get conditional
|
||||||
gttic_(divide);
|
gttic_(divide);
|
||||||
auto conditional =
|
auto conditional =
|
||||||
std::make_shared<DiscreteConditional>(product, sum, orderedKeys);
|
std::make_shared<DiscreteConditional>(product, *sum, orderedKeys);
|
||||||
gttoc_(divide);
|
gttoc_(divide);
|
||||||
|
|
||||||
return {conditional, sum};
|
return {conditional, sum};
|
||||||
|
|
|
@ -22,7 +22,7 @@ void SingleValue::print(const string& s, const KeyFormatter& formatter) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
double SingleValue::operator()(const DiscreteValues& values) const {
|
double SingleValue::operator()(const Assignment<Key>& values) const {
|
||||||
return (double)(values.at(keys_[0]) == value_);
|
return (double)(values.at(keys_[0]) == value_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue