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>
76 template <
size_t NROWS,
size_t NCOLS>
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>".
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.
mrpt::serialization::CArchive & operator>>(mrpt::serialization::CArchive &in, CMatrixD::Ptr &pObj)
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.
GLdouble GLdouble GLdouble r
mrpt::serialization::CArchive & operator<<(mrpt::serialization::CArchive &s, const CVectorFloat &a)
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
constexpr size_type cols() const
Number of columns in the matrix.
void WriteObject(const CSerializable *o)
Writes an object to the stream.