From 6cd3eeb692618420dcec555cf8e193a283b96d87 Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Mon, 3 Jan 2022 11:07:28 -0500 Subject: [PATCH] Some small doc changes --- gtsam/discrete/AlgebraicDecisionTree.h | 4 ++-- gtsam/discrete/DecisionTree-inl.h | 4 ++-- gtsam/discrete/DecisionTree.h | 21 +++++++-------------- 3 files changed, 11 insertions(+), 18 deletions(-) diff --git a/gtsam/discrete/AlgebraicDecisionTree.h b/gtsam/discrete/AlgebraicDecisionTree.h index 637f56066..60f3017f4 100644 --- a/gtsam/discrete/AlgebraicDecisionTree.h +++ b/gtsam/discrete/AlgebraicDecisionTree.h @@ -158,7 +158,7 @@ namespace gtsam { return this->combine(labelC, &Ring::add); } - /// print method customized to node type `double`. + /// print method customized to value type `double`. void print(const std::string& s, const typename Base::LabelFormatter& labelFormatter = &DefaultFormatter) const { @@ -168,7 +168,7 @@ namespace gtsam { Base::print(s, labelFormatter, valueFormatter); } - /// Equality method customized to node type `double`. + /// Equality method customized to value type `double`. bool equals(const AlgebraicDecisionTree& other, double tol = 1e-9) const { // lambda for comparison of two doubles upto some tolerance. auto compare = [tol](double a, double b) { diff --git a/gtsam/discrete/DecisionTree-inl.h b/gtsam/discrete/DecisionTree-inl.h index 0c016b6c5..5de5d7ed2 100644 --- a/gtsam/discrete/DecisionTree-inl.h +++ b/gtsam/discrete/DecisionTree-inl.h @@ -86,8 +86,8 @@ namespace gtsam { * @brief Print method. * * @param s Prefix string. - * @param labelFormatter Functor to format the node label. - * @param valueFormatter Functor to format the node value. + * @param labelFormatter Functor to format the labels of type L. + * @param valueFormatter Functor to format the values of type Y. */ void print(const std::string& s, const LabelFormatter& labelFormatter, const ValueFormatter& valueFormatter) const override { diff --git a/gtsam/discrete/DecisionTree.h b/gtsam/discrete/DecisionTree.h index 6aa97d8ac..db8a12a20 100644 --- a/gtsam/discrete/DecisionTree.h +++ b/gtsam/discrete/DecisionTree.h @@ -127,10 +127,10 @@ namespace gtsam { * @brief Convert from a DecisionTree to DecisionTree. * * @tparam M The previous label type. - * @tparam X The previous node type. + * @tparam X The previous value type. * @param f The node pointer to the root of the previous DecisionTree. * @param L_of_M Functor to convert from label type M to type L. - * @param Y_of_X Functor to convert from node type X to type Y. + * @param Y_of_X Functor to convert from value type X to type Y. * @return NodePtr */ template @@ -170,22 +170,22 @@ namespace gtsam { const DecisionTree& f0, const DecisionTree& f1); /** - * @brief Convert from a different node type. + * @brief Convert from a different value type. * - * @tparam X The previous node type. + * @tparam X The previous value type. * @param other The DecisionTree to convert from. - * @param Y_of_X Functor to convert from node type X to type Y. + * @param Y_of_X Functor to convert from value type X to type Y. */ template DecisionTree(const DecisionTree& other, std::function Y_of_X); /** - * @brief Convert from a different node type X to node type Y, also transate + * @brief Convert from a different value type X to value type Y, also transate * labels via map from type M to L. * * @tparam M Previous label type. - * @tparam X Previous node type. + * @tparam X Previous value type. * @param other The decision tree to convert. * @param L_of_M Map from label type M to type L. * @param Y_of_X Functor to convert from type X to type Y. @@ -286,13 +286,6 @@ namespace gtsam { return f.apply(op); } - /// Apply unary operator `op` to DecisionTree `f` but with node type. - template - DecisionTree apply(const DecisionTree& f, - const std::function& op) { - return f.apply(op); - } - /// Apply binary operator `op` to DecisionTree `f`. template DecisionTree apply(const DecisionTree& f,