use new multiply method

release/4.3a0
Varun Agrawal 2025-01-05 13:57:07 -05:00
parent 700ad2bae3
commit 260d448887
1 changed files with 4 additions and 4 deletions

View File

@ -65,11 +65,11 @@ namespace gtsam {
/* ************************************************************************ */ /* ************************************************************************ */
DecisionTreeFactor DiscreteFactorGraph::product() const { DecisionTreeFactor DiscreteFactorGraph::product() const {
DecisionTreeFactor result; DiscreteFactor::shared_ptr result = *this->begin();
for (const sharedFactor& factor : *this) { for (auto it = this->begin() + 1; it != this->end(); ++it) {
if (factor) result = (*factor) * result; if (*it) result = result->multiply(*it);
} }
return result; return result->toDecisionTreeFactor();
} }
/* ************************************************************************ */ /* ************************************************************************ */