implement DecisionTreeFactor::restrict

release/4.3a0
Varun Agrawal 2025-03-25 09:47:29 -04:00
parent 5c2e8d6746
commit d01bfba763
1 changed files with 3 additions and 1 deletions

View File

@ -547,7 +547,9 @@ namespace gtsam {
/* ************************************************************************ */ /* ************************************************************************ */
DiscreteFactor::shared_ptr DecisionTreeFactor::restrict( DiscreteFactor::shared_ptr DecisionTreeFactor::restrict(
const DiscreteValues& assignment) const { const DiscreteValues& assignment) const {
throw std::runtime_error("DecisionTreeFactor::restrict not implemented"); ADT restricted_tree = ADT::restrict(assignment);
return std::make_shared<DecisionTreeFactor>(this->discreteKeys(),
restricted_tree);
} }
/* ************************************************************************ */ /* ************************************************************************ */