Skip to content

Commit

Permalink
Added cautionary notes about fold/visit
Browse files Browse the repository at this point in the history
  • Loading branch information
dellaert committed Jan 22, 2022
1 parent beb3985 commit fa1cde2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gtsam/discrete/DecisionTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ namespace gtsam {
*
* @param f side-effect taking a value.
*
* @note Due to pruning, leaves might not exhaust choices.
*
* Example:
* int sum = 0;
* auto visitor = [&](int y) { sum += y; };
Expand All @@ -247,6 +249,8 @@ namespace gtsam {
*
* @param f side-effect taking an assignment and a value.
*
* @note Due to pruning, leaves might not exhaust choices.
*
* Example:
* int sum = 0;
* auto visitor = [&](const Assignment<L>& choices, int y) { sum += y; };
Expand All @@ -264,6 +268,7 @@ namespace gtsam {
* @return X final value for accumulator.
*
* @note X is always passed by value.
* @note Due to pruning, leaves might not exhaust choices.
*
* Example:
* auto add = [](const double& y, double x) { return y + x; };
Expand Down

0 comments on commit fa1cde2

Please sign in to comment.