aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-06-27 10:53:30 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-06-27 10:53:30 +0000
commit844f69e4a9d0dad5ff49330ddf137ba38e956dc9 (patch)
treee60a6a699e45ab63a88fac7a1d152ad1988316ff /Eigen/src/Core
parent6de4871c8c991c63601c211f35475225080352f1 (diff)
* update CMakeLists, only build instantiations if TEST_LIB is defined
* allow default Matrix constructor in dynamic size, defaulting to (1, 1), this is convenient in mandelbrot example.
Diffstat (limited to 'Eigen/src/Core')
-rw-r--r--Eigen/src/Core/Matrix.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h
index bf4b8d739..5074ea88f 100644
--- a/Eigen/src/Core/Matrix.h
+++ b/Eigen/src/Core/Matrix.h
@@ -235,13 +235,12 @@ class Matrix : public MatrixBase<Matrix<_Scalar, _Rows, _Cols, _MaxRows, _MaxCol
EIGEN_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Matrix, *=)
EIGEN_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Matrix, /=)
- /** Default constructor, does nothing. Only for fixed-size matrices.
- * For dynamic-size matrices and vectors, this constructor is forbidden (guarded by
- * an assertion) because it would leave the matrix without an allocated data buffer.
+ /** Default constructor, for fixed-size matrices, does nothing.
+ * For dynamic-size matrices, initializes with initial size 1x1, which is inefficient, hence
+ * when performance matters one should avoid using this constructor on dynamic-size matrices.
*/
- inline explicit Matrix()
+ inline explicit Matrix() : m_storage(1, 1, 1)
{
- ei_assert(RowsAtCompileTime != Dynamic && ColsAtCompileTime != Dynamic);
ei_assert(RowsAtCompileTime > 0 && ColsAtCompileTime > 0);
}