Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
varunagrawal committed Dec 8, 2024
1 parent 199c0a0 commit 214bf4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gtsam/discrete/DiscreteFactorGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion gtsam_unstable/discrete/SingleValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_);
}

Expand Down

0 comments on commit 214bf4e

Please sign in to comment.