Loading...
Searching...
No Matches
pcl::DecisionTree< NodeType > Class Template Reference

Class representing a decision tree. More...

`#include <pcl/ml/dt/decision_tree.h>`

## Public Member Functions

| DecisionTree ()
| Constructor.
virtual | ~DecisionTree ()=default
| Destructor.
void | setRoot (const NodeType &root)
| Sets the root node of the tree.
NodeType & | getRoot ()
| Returns the root node of the tree.
void | serialize (::std::ostream &stream) const
| Serializes the decision tree.
void | deserialize (::std::istream &stream)
| Deserializes the decision tree.

## Detailed Description

template<class NodeType>
class pcl::DecisionTree< NodeType >

Class representing a decision tree.

Definition at line 49 of file decision_tree.h.

## Constructor & Destructor Documentation

## DecisionTree()

template<class NodeType>

pcl::DecisionTree< NodeType >::DecisionTree | ( |  | ) |

inline

Constructor.

Definition at line 52 of file decision_tree.h.

## ~DecisionTree()

template<class NodeType>

virtual pcl::DecisionTree< NodeType >::~DecisionTree | ( |  | ) |

virtual default

Destructor.

## Member Function Documentation

## deserialize()

template<class NodeType>

void pcl::DecisionTree< NodeType >::deserialize | ( | ::std::istream & | stream | ) |

inline

Deserializes the decision tree.

Parameters

  [in] | stream | the source for the deserialization

Definition at line 89 of file decision_tree.h.

## getRoot()

template<class NodeType>

NodeType & pcl::DecisionTree< NodeType >::getRoot | ( |  | ) |

inline

Returns the root node of the tree.

Definition at line 69 of file decision_tree.h.

Referenced by pcl::DecisionTreeEvaluator< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::evaluate(), pcl::DecisionTreeEvaluator< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::evaluate(), pcl::DecisionTreeEvaluator< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::evaluateAndAdd(), pcl::DecisionTreeEvaluator< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::getNodes(), and pcl::DecisionTreeTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::train().

## serialize()

template<class NodeType>

void pcl::DecisionTree< NodeType >::serialize | ( | ::std::ostream & | stream | ) | const

inline

Serializes the decision tree.

Parameters

  [out] | stream | the destination for the serialization

Definition at line 79 of file decision_tree.h.

## setRoot()

template<class NodeType>

void pcl::DecisionTree< NodeType >::setRoot | ( | const NodeType & | root | ) |

inline

Sets the root node of the tree.

Parameters

  [in] | root | the root node

Definition at line 62 of file decision_tree.h.

Referenced by pcl::DecisionTreeTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::train().

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

- pcl/ml/dt/decision_tree.h