add division with DiscreteFactor::shared_ptr for convenience
parent
975fe627d9
commit
fc2d33f437
|
|
@ -156,6 +156,11 @@ namespace gtsam {
|
||||||
return apply(f, safe_div);
|
return apply(f, safe_div);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// divide by DiscreteFactor::shared_ptr f (safely)
|
||||||
|
DecisionTreeFactor operator/(const DiscreteFactor::shared_ptr& f) const {
|
||||||
|
return apply(*std::dynamic_pointer_cast<DecisionTreeFactor>(f), safe_div);
|
||||||
|
}
|
||||||
|
|
||||||
/// Convert into a decision tree
|
/// Convert into a decision tree
|
||||||
DecisionTreeFactor toDecisionTreeFactor() const override { return *this; }
|
DecisionTreeFactor toDecisionTreeFactor() const override { return *this; }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue