use new multiply method
parent
700ad2bae3
commit
260d448887
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue