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 result;
for (const sharedFactor& factor : *this) {
if (factor) result = (*factor) * result;
DiscreteFactor::shared_ptr result = *this->begin();
for (auto it = this->begin() + 1; it != this->end(); ++it) {
if (*it) result = result->multiply(*it);
}
return result;
return result->toDecisionTreeFactor();
}
/* ************************************************************************ */