gtsam 4.1.1
gtsam
gtsam::DecisionTree< L, Y >::Leaf< L, Y > Class Template Reference
+ Inheritance diagram for gtsam::DecisionTree< L, Y >::Leaf< L, Y >:

Public Member Functions

 Leaf (const Y &constant)
 Constructor from constant.
 
const Y & constant () const
 return the constant
 
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...
 
bool equals (const Node &q, double tol) const override
 equality up to tolerance More...
 
void print (const std::string &s) const override
 print More...
 
void dot (std::ostream &os, bool showZero) const override
 to graphviz file More...
 
const Y & operator() (const Assignment< L > &x) const override
 evaluate More...
 
NodePtr apply (const Unary &op) const override
 apply unary operator More...
 
NodePtr apply_f_op_g (const Node &g, const Binary &op) const override
 
NodePtr apply_g_op_fL (const Leaf &fL, const Binary &op) const override
 
NodePtr apply_g_op_fC (const Choice &fC, const Binary &op) const override
 
NodePtr choose (const L &label, size_t index) const override
 choose a branch, create new memory ! More...
 
bool isLeaf () const override
 
- Public Member Functions inherited from gtsam::DecisionTree< L, Y >::Node
const void * id () const
 
virtual void print (const std::string &s="") const =0
 
virtual void dot (std::ostream &os, bool showZero) const =0
 
virtual bool sameLeaf (const Leaf &q) const =0
 
virtual bool sameLeaf (const Node &q) const =0
 
virtual bool equals (const Node &other, double tol=1e-9) const =0
 
virtual const Y & operator() (const Assignment< L > &x) const =0
 
virtual Ptr apply (const Unary &op) const =0
 
virtual Ptr apply_f_op_g (const Node &, const Binary &) const =0
 
virtual Ptr apply_g_op_fL (const Leaf &, const Binary &) const =0
 
virtual Ptr apply_g_op_fC (const Choice &, const Binary &) const =0
 
virtual Ptr choose (const L &label, size_t index) const =0
 
virtual bool isLeaf () const =0
 

Additional Inherited Members

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

Member Function Documentation

◆ apply()

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.

◆ apply_f_op_g()

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

◆ apply_g_op_fC()

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

◆ apply_g_op_fL()

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

◆ choose()

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.

◆ dot()

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.

◆ equals()

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.

◆ isLeaf()

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

◆ operator()()

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.

◆ print()

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

◆ sameLeaf() [1/2]

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.

◆ sameLeaf() [2/2]

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.


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