From fabaa6915be063a5390ad78c4ddd86b335691418 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Thu, 18 Dec 2008 20:36:25 +0000 Subject: * fix in IO.h, a useless copy was made because of assignment from Derived to MatrixBase. * the optimization of eval() for Matrix now consists in a partial specialization of ei_eval, which returns a reference type for Matrix. No overriding of eval() in Matrix anymore. Consequence: careful, ei_eval is no longer guaranteed to give a plain matrix type! For that, use ei_plain_matrix_type, or the PlainMatrixType typedef. * so lots of changes to adapt to that everywhere. Hope this doesn't break (too much) MSVC compilation. * add code examples for the new image() stuff. * lower a bit the precision for floats in the unit tests as we were already doing some workarounds in inverse.cpp and we got some failed tests. --- Eigen/src/Core/IO.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Eigen/src/Core/IO.h') diff --git a/Eigen/src/Core/IO.h b/Eigen/src/Core/IO.h index ca00cae3d..2b00d5bc5 100644 --- a/Eigen/src/Core/IO.h +++ b/Eigen/src/Core/IO.h @@ -122,9 +122,10 @@ MatrixBase::format(const IOFormat& fmt) const /** \internal * print the matrix \a _m to the output stream \a s using the output format \a fmt */ template -std::ostream & ei_print_matrix(std::ostream & s, const MatrixBase & _m, const IOFormat& fmt) +std::ostream & ei_print_matrix(std::ostream & s, const Derived& _m, const IOFormat& fmt) { const typename Derived::Nested m = _m; + int width = 0; if (fmt.flags & AlignCols) { -- cgit v1.2.3