23 uint8_t
CMatrixF::serializeGetVersion()
const {
return 0; }
27 out.WriteAs<uint32_t>(rows()).WriteAs<uint32_t>(cols());
30 if (rows() > 0 && cols() > 0)
32 &(*
this)(0, 0), cols() * rows());
42 const uint32_t nRows = in.
ReadAs<uint32_t>();
43 const uint32_t nCols = in.
ReadAs<uint32_t>();
45 setSize(nRows, nCols);
47 if (nRows > 0 && nCols > 0)
49 &(*this)(0, 0), nRows * nCols);
61 out[
"nrows"] =
static_cast<uint32_t
>(this->rows());
62 out[
"ncols"] =
static_cast<uint32_t
>(this->cols());
63 out[
"data"] = this->inMatlabFormat();
74 this->fromMatlabStringFormat(static_cast<std::string>(in[
"data"]));
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
To be added to all CSerializable-classes implementation files.
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Serialize CSchemeArchiveBase derived object to CSerializable Object.
Virtual base class for "schematic archives" (JSON, XML,...)
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
This base provides a set of functions for maths stuff.
STORED_TYPE ReadAs()
De-serialize a variable and returns it by value.
T value_type
The type of the matrix elements.
#define SCHEMA_DESERIALIZE_DATATYPE_VERSION()
For use inside serializeFrom(CSchemeArchiveBase) methods.
This class is a "CSerializable" wrapper for "CMatrixFloat".
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Virtual base class for "archives": classes abstracting I/O streams.
mrpt::vision::TStereoCalibResults out
The virtual base class which provides a unified interface for all persistent objects in MRPT...
void serializeTo(mrpt::serialization::CArchive &out) const override
Serialize CSerializable Object to CSchemeArchiveBase derived object.
#define SCHEMA_SERIALIZE_DATATYPE_VERSION(ser_version)
For use inside all serializeTo(CSchemeArchiveBase) methods.
size_t ReadBufferFixEndianness(T *ptr, size_t ElementCount)
Reads a sequence of elemental datatypes, taking care of reordering their bytes from the MRPT stream s...