30struct fmt::formatter<Eigen::Matrix<Scalar, n_dim, 1>> : formatter<Scalar>
32 static_assert(n_dim > 0,
"Dimension of a vector must be positive");
33 fmt::appender format(
const Eigen::Matrix<Scalar, n_dim, 1>& v, format_context& ctx)
const
35 fmt::appender iter = fmt::format_to(ctx.out(),
"(");
36 iter = formatter<Scalar>::format(v(0), ctx);
37 for (
int i = 1; i < n_dim; ++i) {
38 iter = fmt::format_to(iter,
", ");
39 iter = formatter<Scalar>::format(v(i), ctx);
41 iter = fmt::format_to(iter,
")");
80struct fmt::formatter<Eigen::Matrix<Scalar, n_dim, n_dim, 0, n_dim, n_dim>> : formatter<Scalar>
82 static_assert(n_dim > 0,
"Dimension of a square matrix must be positive");
83 fmt::appender format(
const Eigen::Matrix<Scalar, n_dim, n_dim, 0, n_dim, n_dim>& m, format_context& ctx)
const
85 fmt::appender iter = fmt::format_to(ctx.out(),
"\n");
86 for (
int row = 0; row < n_dim - 1; ++row) {
87 for (
int column = 0; column < n_dim; ++column) {
88 iter = formatter<Scalar>::format(m(row, column), ctx);
89 iter = fmt::format_to(iter,
" ");
91 iter = fmt::format_to(iter,
"\n");
93 for (
int column = 0; column < n_dim; ++column) {
94 iter = formatter<Scalar>::format(m(n_dim - 1, column), ctx);
95 iter = fmt::format_to(iter,
" ");