Loading...
Searching...
No Matches
pcl::Fern< FeatureType, NodeType > Class Template Reference

Class representing a Fern. More...

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

## Public Member Functions

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

## Detailed Description

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

Class representing a Fern.

Definition at line 49 of file fern.h.

## Constructor & Destructor Documentation

## Fern()

template<class FeatureType, class NodeType>

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

inline

Constructor.

Definition at line 52 of file fern.h.

## Member Function Documentation

## accessFeature() [1/2]

template<class FeatureType, class NodeType>

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

inline

Access operator for features.

Parameters

  feature_index | the index of the feature to access

Definition at line 157 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 std::size_t | feature_index | ) | const

inline

Access operator for features.

Parameters

  feature_index | the index of the feature to access

Definition at line 167 of file fern.h.

## accessThreshold() [1/2]

template<class FeatureType, class NodeType>

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

inline

Access operator for thresholds.

Parameters

  threshold_index | the index of the threshold to access

Definition at line 177 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 std::size_t | threshold_index | ) | const

inline

Access operator for thresholds.

Parameters

  threshold_index | the index of the threshold to access

Definition at line 187 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 111 of file fern.h.

## getNumOfFeatures()

template<class FeatureType, class NodeType>

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

inline

Returns the number of features the Fern has.

Definition at line 76 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>

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

inline

Returns the number of nodes the Fern has.

Definition at line 69 of file fern.h.

## initialize()

template<class FeatureType, class NodeType>

void pcl::Fern< FeatureType, NodeType >::initialize | ( | const std::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 59 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 std::size_t | node_index | ) |

inline

Access operator for nodes.

Parameters

  node_index | the index of the node to access

Definition at line 137 of file fern.h.

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

template<class FeatureType, class NodeType>

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

inline

Access operator for nodes.

Parameters

  node_index | the index of the node to access

Definition at line 147 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 86 of file fern.h.

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

- pcl/ml/ferns/fern.h