overload apply method in DecisionTreeFactor
parent
6d69ca16da
commit
f751a5bfcf
|
@ -101,6 +101,14 @@ namespace gtsam {
|
|||
return DecisionTreeFactor(keys, result);
|
||||
}
|
||||
|
||||
/* ************************************************************************ */
|
||||
DecisionTreeFactor DecisionTreeFactor::apply(ADT::UnaryAssignment op) const {
|
||||
// apply operand
|
||||
ADT result = ADT::apply(op);
|
||||
// Make a new factor
|
||||
return DecisionTreeFactor(discreteKeys(), result);
|
||||
}
|
||||
|
||||
/* ************************************************************************ */
|
||||
DecisionTreeFactor::shared_ptr DecisionTreeFactor::combine(
|
||||
size_t nrFrontals, ADT::Binary op) const {
|
||||
|
|
|
@ -147,8 +147,11 @@ namespace gtsam {
|
|||
/// @name Advanced Interface
|
||||
/// @{
|
||||
|
||||
/// Inherit all the `apply` methods from AlgebraicDecisionTree
|
||||
using ADT::apply;
|
||||
/**
|
||||
* Apply unary operator (*this) "op" f
|
||||
* @param op a unary operator that operates on AlgebraicDecisionTree
|
||||
*/
|
||||
DecisionTreeFactor apply(ADT::UnaryAssignment op) const;
|
||||
|
||||
/**
|
||||
* Apply binary operator (*this) "op" f
|
||||
|
|
Loading…
Reference in New Issue