38 #ifndef PCL_ML_DT_DECISION_FOREST_H_
39 #define PCL_ML_DT_DECISION_FOREST_H_
43 #include <pcl/ml/dt/decision_tree.h>
52 template <
class NodeType>
54 :
public std::vector<pcl::DecisionTree<NodeType> >
83 const int num_of_trees =
static_cast<int> (this->size ());
84 stream.write (
reinterpret_cast<const char*
> (&num_of_trees),
sizeof (num_of_trees));
86 for (
size_t tree_index = 0; tree_index < this->size (); ++tree_index)
88 (*this) [tree_index].serialize (stream);
107 stream.read (
reinterpret_cast<char*
> (&num_of_trees),
sizeof (num_of_trees));
108 this->resize (num_of_trees);
110 for (
size_t tree_index = 0; tree_index < this->size (); ++tree_index)
112 (*this) [tree_index].deserialize (stream);