10#include <Eigen/SparseCore>
17template <
typename Derived,
typename CharT>
18 requires std::derived_from<Derived, Eigen::MatrixBase<Derived>> ||
19 std::derived_from<Derived, Eigen::SparseCompressedBase<Derived>>
20struct fmt::formatter<Derived, CharT> {
22 return m_underlying.parse(ctx);
28 for (
int row = 0; row < mat.rows(); ++row) {
29 for (
int col = 0; col < mat.cols(); ++col) {
31 out = m_underlying.format(mat.coeff(row, col), ctx);
34 if (row < mat.rows() - 1) {
43 fmt::formatter<typename Derived::Scalar, CharT> m_underlying;
buffer_context< char > format_context
Definition: core.h:1759
basic_format_parse_context< char > format_parse_context
Definition: core.h:722
auto format_to(OutputIt out, const S &fmt, T &&... args) -> OutputIt
Definition: xchar.h:156