eos 1.4.0
|
Serialisation of Eigen matrices for the serialisation library cereal (http://uscilab.github.io/cereal/index.html). More...
Functions | |
template<class Archive , class _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols> | |
std::enable_if< traits::is_output_serializable< BinaryData< _Scalar >, Archive >::value, void >::type | save (Archive &ar, const Eigen::Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &matrix) |
Serialise an Eigen::Matrix using cereal. | |
template<class Archive , class _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols> | |
std::enable_if< traits::is_input_serializable< BinaryData< _Scalar >, Archive >::value, void >::type | load (Archive &ar, Eigen::Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &matrix) |
De-serialise an Eigen::Matrix using cereal. | |
Serialisation of Eigen matrices for the serialisation library cereal (http://uscilab.github.io/cereal/index.html).
Contains serialisation for Eigen matrices to binary archives, i.e. matrices like Eigen::MatrixXf
, Eigen::Matrix4d
, or Eigen::Vector3f
.
Todo: Add serialisation to and from JSON. Need to find out how to combine the two variants of SFINAE that are used.
|
inline |
De-serialise an Eigen::Matrix using cereal.
Reads the block of binary data back from a cereal archive into the Eigen::Matrix.
[in] | ar | The archive to deserialise from. |
[in] | matrix | The matrix to deserialise into. |
|
inline |
Serialise an Eigen::Matrix using cereal.
Note: Writes the binary data from Matrix::data(), so not sure what happens if a matrix ever has non-contiguous data (if that can ever happen with Eigen).
[in] | ar | The archive to serialise to. |
[in] | matrix | The matrix to serialise. |