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