From 729618c945aaf5183316abd1badc4921cecd86f1 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Wed, 26 Mar 2008 08:48:04 +0000 Subject: * #define EIGEN_NDEBUG now also disables asserts. Useful to disable eigen's asserts without disabling one's own program's asserts. Notice that Eigen code should now use ei_assert() instead of assert(). * Remove findBiggestCoeff() as it's now almost redundant. * Improve echelon.cpp: inner for loop replaced by xprs. * remove useless "(*this)." here and there. I think they were first introduced by automatic search&replace. * fix compilation in Visitor.h (issue triggered by echelon.cpp) * improve comment on swap(). --- Eigen/src/Core/Random.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Eigen/src/Core/Random.h') diff --git a/Eigen/src/Core/Random.h b/Eigen/src/Core/Random.h index 188f7513a..f756c9649 100644 --- a/Eigen/src/Core/Random.h +++ b/Eigen/src/Core/Random.h @@ -65,7 +65,7 @@ template class Random : ei_no_assignment_operator, Random(int rows, int cols) : m_rows(rows), m_cols(cols) { - assert(rows > 0 + ei_assert(rows > 0 && (RowsAtCompileTime == Dynamic || RowsAtCompileTime == rows) && cols > 0 && (ColsAtCompileTime == Dynamic || ColsAtCompileTime == cols)); @@ -117,7 +117,7 @@ template const Eval > MatrixBase::random(int size) { - assert(IsVectorAtCompileTime); + ei_assert(IsVectorAtCompileTime); if(RowsAtCompileTime == 1) return Random(1, size).eval(); else return Random(size, 1).eval(); } -- cgit v1.2.3