Added cautionary notes about fold/visit
parent
beb3985c8c
commit
fa1cde2f60
|
@ -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; };
|
||||
|
@ -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; };
|
||||
|
@ -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; };
|
||||
|
|
Loading…
Reference in New Issue