Public Member Functions | Private Attributes | List of all members
gtsam::DecisionTree< L, Y >::Leaf< L, Y > Class Template Reference

#include <DecisionTree-inl.h>

Inheritance diagram for gtsam::DecisionTree< L, Y >::Leaf< L, Y >:
Inheritance graph
[legend]

Public Member Functions

NodePtr apply (const Unary &op) const override
 
NodePtr apply_f_op_g (const Node &g, const Binary &op) const override
 
NodePtr apply_g_op_fC (const Choice &fC, const Binary &op) const override
 
NodePtr apply_g_op_fL (const Leaf &fL, const Binary &op) const override
 
NodePtr choose (const L &label, size_t index) const override
 
const Yconstant () const
 
void dot (std::ostream &os, bool showZero) const override
 
bool equals (const Node &q, double tol) const override
 
bool isLeaf () const override
 
 Leaf (const Y &constant)
 
const Yoperator() (const Assignment< L > &x) const override
 
void print (const std::string &s) const override
 
bool sameLeaf (const Leaf &q) const override
 Leaf-Leaf equality. More...
 
bool sameLeaf (const Node &q) const override
 polymorphic equality: is q is a leaf, could be More...
 
- Public Member Functions inherited from gtsam::DecisionTree< L, Y >::Node
const void * id () const
 
 Node ()
 
virtual ~Node ()
 

Private Attributes

Y constant_
 

Additional Inherited Members

- Public Types inherited from gtsam::DecisionTree< L, Y >::Node
typedef boost::shared_ptr< const NodePtr
 

Detailed Description

template<typename L, typename Y>
template<typename L, typename Y>
class gtsam::DecisionTree< L, Y >::Leaf< L, Y >

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

Constructor & Destructor Documentation

template<typename L, typename Y>
template<typename L , typename Y >
gtsam::DecisionTree< L, Y >::Leaf< L, Y >::Leaf ( const Y constant)
inline

Constructor from constant

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

Member Function Documentation

template<typename L, typename Y>
template<typename L , typename Y >
NodePtr gtsam::DecisionTree< L, Y >::Leaf< L, Y >::apply ( const Unary op) const
inlineoverridevirtual

apply unary operator

Implements gtsam::DecisionTree< L, Y >::Node.

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

template<typename L, typename Y>
template<typename L , typename Y >
NodePtr gtsam::DecisionTree< L, Y >::Leaf< L, Y >::apply_f_op_g ( const Node g,
const Binary op 
) const
inlineoverridevirtual

Implements gtsam::DecisionTree< L, Y >::Node.

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

template<typename L, typename Y>
template<typename L , typename Y >
NodePtr gtsam::DecisionTree< L, Y >::Leaf< L, Y >::apply_g_op_fC ( const Choice fC,
const Binary op 
) const
inlineoverridevirtual

Implements gtsam::DecisionTree< L, Y >::Node.

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

template<typename L, typename Y>
template<typename L , typename Y >
NodePtr gtsam::DecisionTree< L, Y >::Leaf< L, Y >::apply_g_op_fL ( const Leaf< L, Y > &  fL,
const Binary op 
) const
inlineoverridevirtual

Implements gtsam::DecisionTree< L, Y >::Node.

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

template<typename L, typename Y>
template<typename L , typename Y >
NodePtr gtsam::DecisionTree< L, Y >::Leaf< L, Y >::choose ( const L label,
size_t  index 
) const
inlineoverridevirtual

choose a branch, create new memory !

Implements gtsam::DecisionTree< L, Y >::Node.

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

template<typename L, typename Y>
template<typename L , typename Y >
const Y& gtsam::DecisionTree< L, Y >::Leaf< L, Y >::constant ( ) const
inline

return the constant

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

template<typename L, typename Y>
template<typename L , typename Y >
void gtsam::DecisionTree< L, Y >::Leaf< L, Y >::dot ( std::ostream &  os,
bool  showZero 
) const
inlineoverridevirtual

to graphviz file

Implements gtsam::DecisionTree< L, Y >::Node.

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

template<typename L, typename Y>
template<typename L , typename Y >
bool gtsam::DecisionTree< L, Y >::Leaf< L, Y >::equals ( const Node q,
double  tol 
) const
inlineoverridevirtual

equality up to tolerance

Implements gtsam::DecisionTree< L, Y >::Node.

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

template<typename L, typename Y>
template<typename L , typename Y >
bool gtsam::DecisionTree< L, Y >::Leaf< L, Y >::isLeaf ( ) const
inlineoverridevirtual

Implements gtsam::DecisionTree< L, Y >::Node.

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

template<typename L, typename Y>
template<typename L , typename Y >
const Y& gtsam::DecisionTree< L, Y >::Leaf< L, Y >::operator() ( const Assignment< L > &  x) const
inlineoverridevirtual

evaluate

Implements gtsam::DecisionTree< L, Y >::Node.

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

template<typename L, typename Y>
template<typename L , typename Y >
void gtsam::DecisionTree< L, Y >::Leaf< L, Y >::print ( const std::string &  s) const
inlineoverridevirtual

print

Implements gtsam::DecisionTree< L, Y >::Node.

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

template<typename L, typename Y>
template<typename L , typename Y >
bool gtsam::DecisionTree< L, Y >::Leaf< L, Y >::sameLeaf ( const Leaf< L, Y > &  q) const
inlineoverridevirtual

Leaf-Leaf equality.

Implements gtsam::DecisionTree< L, Y >::Node.

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

template<typename L, typename Y>
template<typename L , typename Y >
bool gtsam::DecisionTree< L, Y >::Leaf< L, Y >::sameLeaf ( const Node q) const
inlineoverridevirtual

polymorphic equality: is q is a leaf, could be

Implements gtsam::DecisionTree< L, Y >::Node.

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

Member Data Documentation

template<typename L, typename Y>
template<typename L , typename Y >
Y gtsam::DecisionTree< L, Y >::Leaf< L, Y >::constant_
private

constant stored in this leaf

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


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


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:58:07