pcl::Fern< FeatureType, NodeType > Class Template Reference

Class representing a Fern. More...

`#include <pcl/ml/ferns/fern.h>`

## Public Member Functions

| Fern ()
| Constructor. More...
virtual | ~Fern ()
| Destructor. More...
void | initialize (const size_t num_of_decisions)
| Initializes the fern. More...
size_t | getNumOfNodes ()
| Returns the number of nodes the Fern has. More...
size_t | getNumOfFeatures ()
| Returns the number of features the Fern has. More...
void | serialize (::std::ostream &stream) const
| Serializes the fern. More...
void | deserialize (::std::istream &stream)
| Deserializes the fern. More...
NodeType & | operator[] (const size_t node_index)
| Access operator for nodes. More...
const NodeType & | operator[] (const size_t node_index) const
| Access operator for nodes. More...
FeatureType & | accessFeature (const size_t feature_index)
| Access operator for features. More...
const FeatureType & | accessFeature (const size_t feature_index) const
| Access operator for features. More...
float & | accessThreshold (const size_t threshold_index)
| Access operator for thresholds. More...
const float & | accessThreshold (const size_t threshold_index) const
| Access operator for thresholds. More...

## Detailed Description

### template<class FeatureType, class NodeType>
class pcl::Fern< FeatureType, NodeType >

Class representing a Fern.

Definition at line 51 of file fern.h.

## Constructor & Destructor Documentation

## Fern()

template<class FeatureType, class NodeType>

pcl::Fern< FeatureType, NodeType >::Fern | ( |  | ) |

inline

Constructor.

Definition at line 56 of file fern.h.

## ~Fern()

template<class FeatureType, class NodeType>

virtual pcl::Fern< FeatureType, NodeType >::~Fern | ( |  | ) |

inline virtual

Destructor.

Definition at line 65 of file fern.h.

## Member Function Documentation

## accessFeature() [1/2]

template<class FeatureType, class NodeType>

FeatureType& pcl::Fern< FeatureType, NodeType >::accessFeature | ( | const size_t | feature_index | ) |

inline

Access operator for features.

Parameters

  feature_index | The index of the feature to access.

Definition at line 168 of file fern.h.

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

## accessFeature() [2/2]

template<class FeatureType, class NodeType>

const FeatureType& pcl::Fern< FeatureType, NodeType >::accessFeature | ( | const size_t | feature_index | ) | const

inline

Access operator for features.

Parameters

  feature_index | The index of the feature to access.

Definition at line 177 of file fern.h.

## accessThreshold() [1/2]

template<class FeatureType, class NodeType>

float& pcl::Fern< FeatureType, NodeType >::accessThreshold | ( | const size_t | threshold_index | ) |

inline

Access operator for thresholds.

Parameters

  threshold_index | The index of the threshold to access.

Definition at line 186 of file fern.h.

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

## accessThreshold() [2/2]

template<class FeatureType, class NodeType>

const float& pcl::Fern< FeatureType, NodeType >::accessThreshold | ( | const size_t | threshold_index | ) | const

inline

Access operator for thresholds.

Parameters

  threshold_index | The index of the threshold to access.

Definition at line 195 of file fern.h.

## deserialize()

template<class FeatureType, class NodeType>

void pcl::Fern< FeatureType, NodeType >::deserialize | ( | ::std::istream & | stream | ) |

inline

Deserializes the fern.

Parameters

  [in] | stream | The source for the deserialization.

Definition at line 122 of file fern.h.

## getNumOfFeatures()

template<class FeatureType, class NodeType>

size_t pcl::Fern< FeatureType, NodeType >::getNumOfFeatures | ( |  | ) |

inline

Returns the number of features the Fern has.

Definition at line 88 of file fern.h.

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

## getNumOfNodes()

template<class FeatureType, class NodeType>

size_t pcl::Fern< FeatureType, NodeType >::getNumOfNodes | ( |  | ) |

inline

Returns the number of nodes the Fern has.

Definition at line 81 of file fern.h.

## initialize()

template<class FeatureType, class NodeType>

void pcl::Fern< FeatureType, NodeType >::initialize | ( | const size_t | num_of_decisions | ) |

inline

Initializes the fern.

Parameters

  num_of_decisions | The number of decisions taken to access the nodes.

Definition at line 71 of file fern.h.

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

## operator[]() [1/2]

template<class FeatureType, class NodeType>

NodeType& pcl::Fern< FeatureType, NodeType >::operator[] | ( | const size_t | node_index | ) |

inline

Access operator for nodes.

Parameters

  node_index | The index of the node to access.

Definition at line 150 of file fern.h.

## operator[]() [2/2]

template<class FeatureType, class NodeType>

const NodeType& pcl::Fern< FeatureType, NodeType >::operator[] | ( | const size_t | node_index | ) | const

inline

Access operator for nodes.

Parameters

  node_index | The index of the node to access.

Definition at line 159 of file fern.h.

## serialize()

template<class FeatureType, class NodeType>

void pcl::Fern< FeatureType, NodeType >::serialize | ( | ::std::ostream & | stream | ) | const

inline

Serializes the fern.

Parameters

  [out] | stream | The destination for the serialization.

Definition at line 97 of file fern.h.

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

- /build/pcl-qv3n_B/pcl-1.8.1+dfsg1/ml/include/pcl/ml/ferns/fern.h