more fixes

release/4.3a0
Varun Agrawal 2024-12-08 17:15:40 -05:00
parent 199c0a0f24
commit 214bf4ec1a
2 changed files with 3 additions and 3 deletions

View File

@ -67,7 +67,7 @@ namespace gtsam {
DecisionTreeFactor DiscreteFactorGraph::product() const {
DecisionTreeFactor result;
for (const sharedFactor& factor : *this) {
if (factor) result = result * (*factor);
if (factor) result = (*factor) * result;
}
return result;
}
@ -254,7 +254,7 @@ namespace gtsam {
// now divide product/sum to get conditional
gttic_(divide);
auto conditional =
std::make_shared<DiscreteConditional>(product, sum, orderedKeys);
std::make_shared<DiscreteConditional>(product, *sum, orderedKeys);
gttoc_(divide);
return {conditional, sum};

View File

@ -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_);
}