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

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

Public Attributes

F f
 folding function object. More...
 

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.

Definition at line 716 of file DecisionTree-inl.h.

Member Typedef Documentation

◆ F

template<typename L, typename Y>
using gtsam::Visit< L, Y >::F = std::function<void(const Y&)>

Definition at line 717 of file DecisionTree-inl.h.

Constructor & Destructor Documentation

◆ Visit()

template<typename L, typename Y>
gtsam::Visit< L, Y >::Visit ( F  f)
inlineexplicit

Construct from folding function.

Definition at line 718 of file DecisionTree-inl.h.

Member Function Documentation

◆ operator()()

template<typename L, typename Y>
void gtsam::Visit< L, Y >::operator() ( const typename DecisionTree< L, Y >::NodePtr &  node) const
inline

Do a depth-first visit on the tree rooted at node.

Definition at line 722 of file DecisionTree-inl.h.

Member Data Documentation

◆ f

template<typename L, typename Y>
F gtsam::Visit< L, Y >::f

folding function object.

Definition at line 719 of file DecisionTree-inl.h.


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


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:47:15