29 template <
size_t NROWS,
size_t NCOLS>
38 "Size mismatch: deserialized is %ux%u, expected is %ux%u",
39 (
unsigned)aux.
rows(), (unsigned)aux.
cols(), (unsigned)NROWS,
46 template <
size_t NROWS,
size_t NCOLS>
55 "Size mismatch: deserialized is %ux%u, expected is %ux%u",
56 (
unsigned)aux.
rows(), (unsigned)aux.
cols(), (unsigned)NROWS,
64 template <
size_t NROWS,
size_t NCOLS>
71 out.WriteObject(&aux);
76 template <
size_t NROWS,
size_t NCOLS>
83 out.WriteObject(&aux);
94 template <
typename MAT>
99 for (decltype(N) i = 0; i < N; i++) in >> m(i, i);
100 for (decltype(N) r = 0; r < N - 1; r++)
102 for (decltype(N) c = r + 1; c < N; c++)
106 m(r, c) = m(c, r) = x;
113 template <
typename MAT>
118 for (decltype(N) i = 0; i < N; i++)
out << m(i, i);
119 for (decltype(N) r = 0; r < N - 1; r++)
120 for (decltype(N) c = r + 1; c < N; c++)
out << m(r, c);
A compile-time fixed-size numeric matrix container.
void serializeSymmetricMatrixTo(MAT &m, mrpt::serialization::CArchive &out)
Binary serialization of symmetric matrices, saving the space of duplicated values.
This class is a "CSerializable" wrapper for "CMatrixDynamic<double>".
std::string std::string format(std::string_view fmt, ARGS &&... args)
mrpt::serialization::CArchive & operator>>(mrpt::serialization::CArchive &in, CMatrixD::Ptr &pObj)
This base provides a set of functions for maths stuff.
#define ASSERT_EQUAL_(__A, __B)
Assert comparing two values, reporting their actual values upon failure.
void deserializeSymmetricMatrixFrom(MAT &m, mrpt::serialization::CArchive &in)
Binary serialization of symmetric matrices, saving the space of duplicated values.
#define ASSERTMSG_(f, __ERROR_MSG)
Defines an assertion mechanism.
size_type rows() const
Number of rows in the matrix.
size_type cols() const
Number of columns in the matrix.
constexpr size_type rows() const
Number of rows in the matrix.
This class is a "CSerializable" wrapper for "CMatrixFloat".
Virtual base class for "archives": classes abstracting I/O streams.
mrpt::vision::TStereoCalibResults out
mrpt::serialization::CArchive & operator<<(mrpt::serialization::CArchive &s, const CVectorFloat &a)
CSerializable::Ptr ReadObject()
Reads an object from stream, its class determined at runtime, and returns a smart pointer to the obje...
constexpr size_type cols() const
Number of columns in the matrix.