GTSAM  4.0.2
C++ library for smoothing and mapping (SAM)
Public Types | Public Member Functions | Public Attributes | List of all members
gtsam::Visit< L, Y > Struct Template Reference

#include <DecisionTree-inl.h>

Public Types

using F = std::function< void(const Y &)>
 

Public Member Functions

 Visit (F f)
 Construct from folding function.
 
void operator() (const typename DecisionTree< L, Y >::NodePtr &node) const
 Do a depth-first visit on the tree rooted at node.
 

Public Attributes

f
 folding function object.
 

Detailed Description

template<typename L, typename Y>
struct gtsam::Visit< L, Y >

Functor performing depth-first visit to each leaf with the leaf value as the argument.

NOTE: We differentiate between leaves and assignments. Concretely, a 3 binary variable tree will have 2^3=8 assignments, but based on pruning, it can have less than 8 leaves. For example, if a tree has all assignment values as 1, then pruning will cause the tree to have only 1 leaf yet 8 assignments.


The documentation for this struct was generated from the following file: