DecisionTreeFactor apply methods
parent
c8e9a57cac
commit
2b85cfedd4
|
|
@ -82,6 +82,22 @@ namespace gtsam {
|
|||
ADT::print("", formatter);
|
||||
}
|
||||
|
||||
/* ************************************************************************ */
|
||||
DecisionTreeFactor DecisionTreeFactor::apply(ADT::Unary op) const {
|
||||
// apply operand
|
||||
ADT result = ADT::apply(op);
|
||||
// Make a new factor
|
||||
return DecisionTreeFactor(discreteKeys(), result);
|
||||
}
|
||||
|
||||
/* ************************************************************************ */
|
||||
DecisionTreeFactor DecisionTreeFactor::apply(ADT::UnaryAssignment op) const {
|
||||
// apply operand
|
||||
ADT result = ADT::apply(op);
|
||||
// Make a new factor
|
||||
return DecisionTreeFactor(discreteKeys(), result);
|
||||
}
|
||||
|
||||
/* ************************************************************************ */
|
||||
DecisionTreeFactor DecisionTreeFactor::apply(const DecisionTreeFactor& f,
|
||||
ADT::Binary op) const {
|
||||
|
|
|
|||
|
|
@ -147,8 +147,18 @@ 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::Unary op) const;
|
||||
|
||||
/**
|
||||
* Apply unary operator (*this) "op" f
|
||||
* @param op a unary operator that operates on AlgebraicDecisionTree. Takes
|
||||
* both the assignment and the value.
|
||||
*/
|
||||
DecisionTreeFactor apply(ADT::UnaryAssignment op) const;
|
||||
|
||||
/**
|
||||
* Apply binary operator (*this) "op" f
|
||||
|
|
|
|||
Loading…
Reference in New Issue