make DecisionTree docstrings clearer
parent
99825fcfe2
commit
383439efcf
|
|
@ -236,7 +236,7 @@ namespace gtsam {
|
||||||
/**
|
/**
|
||||||
* @brief Visit all leaves in depth-first fashion.
|
* @brief Visit all leaves in depth-first fashion.
|
||||||
*
|
*
|
||||||
* @param f (side-effect) Function taking a value.
|
* @param f (side-effect) Function taking the value of the leaf node.
|
||||||
*
|
*
|
||||||
* @note Due to pruning, the number of leaves may not be the same as the
|
* @note Due to pruning, the number of leaves may not be the same as the
|
||||||
* number of assignments. E.g. if we have a tree on 2 binary variables with
|
* number of assignments. E.g. if we have a tree on 2 binary variables with
|
||||||
|
|
@ -245,7 +245,7 @@ namespace gtsam {
|
||||||
* Example:
|
* Example:
|
||||||
* int sum = 0;
|
* int sum = 0;
|
||||||
* auto visitor = [&](int y) { sum += y; };
|
* auto visitor = [&](int y) { sum += y; };
|
||||||
* tree.visitWith(visitor);
|
* tree.visit(visitor);
|
||||||
*/
|
*/
|
||||||
template <typename Func>
|
template <typename Func>
|
||||||
void visit(Func f) const;
|
void visit(Func f) const;
|
||||||
|
|
@ -261,8 +261,8 @@ namespace gtsam {
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* int sum = 0;
|
* int sum = 0;
|
||||||
* auto visitor = [&](int y) { sum += y; };
|
* auto visitor = [&](const Leaf& leaf) { sum += leaf.constant(); };
|
||||||
* tree.visitWith(visitor);
|
* tree.visitLeaf(visitor);
|
||||||
*/
|
*/
|
||||||
template <typename Func>
|
template <typename Func>
|
||||||
void visitLeaf(Func f) const;
|
void visitLeaf(Func f) const;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue