We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c2e8d6 commit d01bfbaCopy full SHA for d01bfba
gtsam/discrete/DecisionTreeFactor.cpp
@@ -547,7 +547,9 @@ namespace gtsam {
547
/* ************************************************************************ */
548
DiscreteFactor::shared_ptr DecisionTreeFactor::restrict(
549
const DiscreteValues& assignment) const {
550
- throw std::runtime_error("DecisionTreeFactor::restrict not implemented");
+ ADT restricted_tree = ADT::restrict(assignment);
551
+ return std::make_shared<DecisionTreeFactor>(this->discreteKeys(),
552
+ restricted_tree);
553
}
554
555
0 commit comments