21template<
typename Derived>
22std::ostream &
print_matrix(std::ostream & s,
const Derived& _m,
const IOFormat& fmt);
55 const std::string& _coeffSeparator =
" ",
56 const std::string& _rowSeparator =
"\n",
const std::string& _rowPrefix=
"",
const std::string& _rowSuffix=
"",
57 const std::string& _matPrefix=
"",
const std::string& _matSuffix=
"",
const char _fill=
' ')
95template<
typename ExpressionType>
119template<
typename Scalar>
130template<
typename Derived>
142 typename Derived::Nested m = _m;
143 typedef typename Derived::Scalar Scalar;
163 std::streamsize explicit_precision;
166 explicit_precision = 0;
172 explicit_precision = 0;
184 std::streamsize old_precision = 0;
185 if(explicit_precision) old_precision = s.precision(explicit_precision);
191 for(
Index j = 0; j < m.cols(); ++j)
192 for(
Index i = 0; i < m.rows(); ++i)
194 std::stringstream sstr;
196 sstr << static_cast<PrintType>(m.coeff(i,j));
197 width = std::max<Index>(width,
Index(sstr.str().length()));
200 std::streamsize old_width = s.width();
201 char old_fill_character = s.fill();
203 for(
Index i = 0; i < m.rows(); ++i)
212 s << static_cast<PrintType>(m.coeff(i, 0));
213 for(
Index j = 1; j < m.cols(); ++j)
220 s << static_cast<PrintType>(m.coeff(i, j));
223 if( i < m.rows() - 1)
227 if(explicit_precision) s.precision(old_precision);
229 s.fill(old_fill_character);
248template<
typename Derived>
249std::ostream &
operator <<
#define EIGEN_DEFAULT_IO_FORMAT
Definition: Macros.h:1180
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:47
type
Definition: core.h:575
std::ostream & print_matrix(std::ostream &s, const Derived &_m, const IOFormat &fmt)
Definition: IO.h:131
Namespace containing all symbols from the Eigen library.
Definition: MatrixExponential.h:16
@ DontAlignCols
Definition: IO.h:16
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
@ StreamPrecision
Definition: IO.h:17
@ FullPrecision
Definition: IO.h:18
Definition: Eigen_Colamd.h:50
Holds information about the various numeric (i.e.
Definition: NumTraits.h:233
static int run()
Definition: IO.h:122
auto format(wformat_string< T... > fmt, T &&... args) -> std::wstring
Definition: xchar.h:87