Hello I have a code which implements libeigen2 to calculate eigen vectors. Now I want to use boost::serialization to save the information for retrieving later. From the example tutorial I came up with the following code!
class RandomNode {
private:
friend class boost::serialization::access;
template<class Archive>
void serialize(Archive & ar, const unsigned int version)
{
ar & is_leaf_;
ar & depth_;
ar & num_classes_;
ar & num_features_;
// Split node members
ar & random_feature_indices_;
ar & random_feature_weights_;
ar & threshold_;
ar & leftChild_;
ar & rightChild_;
}
bool is_leaf_;
int depth_;
int num_classes_;
int num_features_;
// Split node members
VectorXi random_feature_indices_;
VectorXd random_feature_weights_;
double threshold_;
RandomNode* leftChild_;
RandomNode* rightChild_;
// Methods and so on
}
Now when i tries to run this code I get the following error
/usr/include/boost/serialization/access.hpp:118:9: error: ‘class Eigen::Matrix<double, 10000, 1>’ has no member named ‘serialize’
How can I serialize the Eigen::Matrix class ? Is it possible ? Thanks in advance.