#include <DecisionTree-inl.h>
Public Member Functions | |
NodePtr | apply (const Unary &op) const override |
NodePtr | apply_f_op_g (const Node &g, const Binary &op) const override |
template<typename OP > | |
NodePtr | apply_fC_op_gL (const Leaf &gL, OP op) const |
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 |
const std::vector< NodePtr > & | branches () const |
Choice (const L &label, size_t count) | |
Choice (const Choice &f, const Choice &g, const Binary &op) | |
Choice (const L &label, const Choice &f, const Unary &op) | |
NodePtr | choose (const L &label, size_t index) const override |
void | dot (std::ostream &os, bool showZero) const override |
bool | equals (const Node &q, double tol) const override |
bool | isLeaf () const override |
const L & | label () const |
size_t | nrChoices () const |
const Y & | operator() (const Assignment< L > &x) const override |
void | print (const std::string &s) const override |
void | push_back (const NodePtr &node) |
bool | sameLeaf (const Leaf &q) const override |
Choice-Leaf equality: always false. More... | |
bool | sameLeaf (const Node &q) const override |
polymorphic equality: if q is a leaf, could be... More... | |
~Choice () override | |
Public Member Functions inherited from gtsam::DecisionTree< L, Y >::Node | |
const void * | id () const |
Node () | |
virtual | ~Node () |
Static Public Member Functions | |
static NodePtr | Unique (const ChoicePtr &f) |
Private Types | |
typedef boost::shared_ptr< const Choice > | ChoicePtr |
Private Attributes | |
size_t | allSame_ |
std::vector< NodePtr > | branches_ |
L | label_ |
Additional Inherited Members | |
Public Types inherited from gtsam::DecisionTree< L, Y >::Node | |
typedef boost::shared_ptr< const Node > | Ptr |
Definition at line 142 of file DecisionTree-inl.h.
|
private |
Definition at line 154 of file DecisionTree-inl.h.
|
inlineoverride |
Definition at line 158 of file DecisionTree-inl.h.
|
inline |
Constructor, given choice label and mandatory expected branch count
Definition at line 181 of file DecisionTree-inl.h.
|
inline |
Construct from applying binary op to two Choice nodes
Definition at line 189 of file DecisionTree-inl.h.
|
inline |
Construct from applying unary op to a Choice node
Definition at line 308 of file DecisionTree-inl.h.
|
inlineoverridevirtual |
apply unary operator
Implements gtsam::DecisionTree< L, Y >::Node.
Definition at line 317 of file DecisionTree-inl.h.
|
inlineoverridevirtual |
Implements gtsam::DecisionTree< L, Y >::Node.
Definition at line 327 of file DecisionTree-inl.h.
|
inline |
Definition at line 347 of file DecisionTree-inl.h.
|
inlineoverridevirtual |
Implements gtsam::DecisionTree< L, Y >::Node.
Definition at line 340 of file DecisionTree-inl.h.
|
inlineoverridevirtual |
Implements gtsam::DecisionTree< L, Y >::Node.
Definition at line 332 of file DecisionTree-inl.h.
|
inline |
Definition at line 225 of file DecisionTree-inl.h.
|
inlineoverridevirtual |
choose a branch, recursively
Implements gtsam::DecisionTree< L, Y >::Node.
Definition at line 355 of file DecisionTree-inl.h.
|
inlineoverridevirtual |
output to graphviz (as a a graph)
Implements gtsam::DecisionTree< L, Y >::Node.
Definition at line 248 of file DecisionTree-inl.h.
|
inlineoverridevirtual |
equality up to tolerance
Implements gtsam::DecisionTree< L, Y >::Node.
Definition at line 279 of file DecisionTree-inl.h.
|
inlineoverridevirtual |
Implements gtsam::DecisionTree< L, Y >::Node.
Definition at line 178 of file DecisionTree-inl.h.
|
inline |
Definition at line 217 of file DecisionTree-inl.h.
|
inline |
Definition at line 221 of file DecisionTree-inl.h.
|
inlineoverridevirtual |
evaluate
Implements gtsam::DecisionTree< L, Y >::Node.
Definition at line 291 of file DecisionTree-inl.h.
|
inlineoverridevirtual |
print (as a tree)
Implements gtsam::DecisionTree< L, Y >::Node.
Definition at line 239 of file DecisionTree-inl.h.
|
inline |
add a branch: TODO merge into constructor
Definition at line 230 of file DecisionTree-inl.h.
|
inlineoverridevirtual |
Choice-Leaf equality: always false.
Implements gtsam::DecisionTree< L, Y >::Node.
Definition at line 269 of file DecisionTree-inl.h.
|
inlineoverridevirtual |
polymorphic equality: if q is a leaf, could be...
Implements gtsam::DecisionTree< L, Y >::Node.
Definition at line 274 of file DecisionTree-inl.h.
|
inlinestatic |
If all branches of a choice node f are the same, just return a branch
Definition at line 165 of file DecisionTree-inl.h.
|
private |
incremental allSame
Definition at line 152 of file DecisionTree-inl.h.
|
private |
The children of this Choice node.
Definition at line 148 of file DecisionTree-inl.h.
|
private |
the label of the variable on which we split
Definition at line 145 of file DecisionTree-inl.h.