Go to the documentation of this file.
21 template<
typename Derived>
22 std::ostream &
print_matrix(std::ostream &
s,
const Derived& _m,
const IOFormat& fmt);
54 const std::string& _coeffSeparator =
" ",
55 const std::string& _rowSeparator =
"\n",
const std::string& _rowPrefix=
"",
const std::string& _rowSuffix=
"",
56 const std::string& _matPrefix=
"",
const std::string& _matSuffix=
"")
93 template<
typename ExpressionType>
117 template<
typename Scalar>
128 template<
typename Derived>
137 typename Derived::Nested m = _m;
142 std::streamsize explicit_precision;
145 explicit_precision = 0;
151 explicit_precision = 0;
163 std::streamsize old_precision = 0;
164 if(explicit_precision) old_precision =
s.precision(explicit_precision);
170 for(
Index j = 0; j < m.cols(); ++j)
171 for(
Index i = 0; i < m.rows(); ++i)
173 std::stringstream sstr;
175 sstr << m.coeff(i,j);
176 width = std::max<Index>(width,
Index(sstr.str().length()));
180 for(
Index i = 0; i < m.rows(); ++i)
185 if(width)
s.width(width);
187 for(
Index j = 1; j < m.cols(); ++j)
190 if (width)
s.width(width);
194 if( i < m.rows() - 1)
198 if(explicit_precision)
s.precision(old_precision);
215 template<
typename Derived>
216 std::ostream &
operator <<
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
Base class for all dense matrices, vectors, and arrays.
#define EIGEN_DEFAULT_IO_FORMAT
std::ostream & print_matrix(std::ostream &s, const Derived &_m, const IOFormat &fmt)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
control_box_rst
Author(s): Christoph Rösmann
autogenerated on Wed Mar 2 2022 00:05:49