Loading...
Searching...
No Matches
gtsam::VisitLeaf< L, Y > Struct Template Reference

## Detailed Description

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

Functor performing depth-first visit to each leaf with the Leaf object passed as an 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 <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.

## Public Member Functions

| VisitLeaf (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 | f
| folding function object.

## Public Types

using | F = std::function<void(const typename DecisionTree<L, Y>::Leaf&)>

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

- /build/gtsam-RkN8wG/gtsam-4.2.2+dfsg/gtsam/discrete/DecisionTree-inl.h