41 #include <pcl/ml/dt/decision_tree.h>
49 template <
class NodeType>
66 const int num_of_trees =
static_cast<int>(this->size());
67 stream.write(
reinterpret_cast<const char*
>(&num_of_trees),
sizeof(num_of_trees));
69 for (std::size_t tree_index = 0; tree_index < this->size(); ++tree_index) {
70 (*this)[tree_index].serialize(stream);
91 stream.read(
reinterpret_cast<char*
>(&num_of_trees),
sizeof(num_of_trees));
92 this->resize(num_of_trees);
94 for (std::size_t tree_index = 0; tree_index < this->size(); ++tree_index) {
95 (*this)[tree_index].deserialize(stream);