fix the build of eigensolver_complex test.

it was calling the .value() method on an inner product, and that was blocked in bad zero-sized case.

fixed by adding the .value() method to DenseBase for all 1x1 expressions, and allowing coeff accessors in ProductBase for 1x1 expressions.
This commit is contained in:
Benoit Jacob
2010-12-09 03:47:35 -05:00
parent 1be6449f2e
commit aec0782719
4 changed files with 44 additions and 11 deletions

View File

@@ -422,6 +422,14 @@ template<typename Derived> class DenseBase
inline const WithFormat<Derived> format(const IOFormat& fmt) const;
/** \returns the unique coefficient of a 1x1 expression */
CoeffReturnType value() const
{
EIGEN_STATIC_ASSERT_SIZE_1x1(Derived)
eigen_assert(this->rows() == 1 && this->cols() == 1);
return derived().coeff(0,0);
}
/////////// Array module ///////////
bool all(void) const;