Public Types | Public Member Functions | Public Attributes | List of all members
gtsam::VisitWith< L, Y > Struct Template Reference

#include <DecisionTree-inl.h>

Public Types

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

Public Member Functions

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

Public Attributes

Assignment< Lassignment
 Assignment, mutating through recursion. More...
 
F f
 folding function object. More...
 

Detailed Description

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

Functor performing depth-first visit to each leaf with the leaf's Assignment<L> and value passed as arguments.

NOTE: Follows the same pruning semantics as visit.

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

Member Typedef Documentation

◆ F

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

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

Constructor & Destructor Documentation

◆ VisitWith()

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

Construct from folding function.

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

Member Function Documentation

◆ operator()()

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

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

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

Member Data Documentation

◆ assignment

template<typename L, typename Y>
Assignment<L> gtsam::VisitWith< L, Y >::assignment

Assignment, mutating through recursion.

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

◆ f

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

folding function object.

Definition at line 791 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