19template <
int Rows,
int Cols,
int... Args>
20struct fmt::formatter<
Eigen::Matrix<double, Rows, Cols, Args...>> {
24 char presentation =
'f';
32 auto it = ctx.begin(),
end = ctx.end();
33 if (it !=
end && (*it ==
'f' || *it ==
'e')) {
37 if (it !=
end && *it !=
'}') {
38 throw fmt::format_error(
"invalid format");
51 template <
typename FormatContext>
55 for (
int i = 0; i < mat.
rows(); ++i) {
56 for (
int j = 0; j < mat.
cols(); ++j) {
60 if (i < mat.
rows() - 1) {
75template <
int Options,
typename StorageIndex>
76struct fmt::formatter<
Eigen::SparseMatrix<double, Options, StorageIndex>> {
80 char presentation =
'f';
88 auto it = ctx.begin(),
end = ctx.end();
89 if (it !=
end && (*it ==
'f' || *it ==
'e')) {
93 if (it !=
end && *it !=
'}') {
94 throw fmt::format_error(
"invalid format");
107 template <
typename FormatContext>
109 FormatContext& ctx) {
110 auto out = ctx.out();
111 for (
int i = 0; i < mat.
rows(); ++i) {
112 for (
int j = 0; j < mat.
cols(); ++j) {
116 if (i < mat.
rows() - 1) {
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:180
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: PlainObjectBase.h:145
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: PlainObjectBase.h:143
A versatible sparse matrix representation.
Definition: SparseMatrix.h:98
Scalar coeff(Index row, Index col) const
Definition: SparseMatrix.h:190
Index rows() const
Definition: SparseMatrix.h:138
Index cols() const
Definition: SparseMatrix.h:140
basic_format_parse_context< char > format_parse_context
Definition: core.h:724
static EIGEN_DEPRECATED const end_t end
Definition: IndexedViewHelper.h:181
Namespace containing all symbols from the Eigen library.
Definition: MatrixExponential.h:16
auto format_to(OutputIt out, const S &fmt, Args &&... args) -> OutputIt
Definition: xchar.h:136