diff options
author | Gael Guennebaud <g.gael@free.fr> | 2008-10-24 21:42:03 +0000 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2008-10-24 21:42:03 +0000 |
commit | 8ea8b481de07169706343f35f928eac845b706fe (patch) | |
tree | 9a082b32a020aebd6df50bf73de275e5e2cdaef8 /Eigen/src/Core/Redux.h | |
parent | 65abb4c52e198c7379ad50655bfaa9d4ddd20c77 (diff) |
As discussed on ML:
* remove the automatic resizing feature of operator =
* add function Matrix::set() to be used when the previous
behavior is wanted
* the default constructor of dynamic-size matrices now
creates a "null" matrix (data=0, rows = cols = 0)
instead of a 1x1 matrix
* fix UnixX typos ;)
Diffstat (limited to 'Eigen/src/Core/Redux.h')
-rw-r--r-- | Eigen/src/Core/Redux.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Eigen/src/Core/Redux.h b/Eigen/src/Core/Redux.h index 6e4f9897d..041a98479 100644 --- a/Eigen/src/Core/Redux.h +++ b/Eigen/src/Core/Redux.h @@ -65,6 +65,7 @@ struct ei_redux_impl<BinaryOp, Derived, Start, Dynamic> typedef typename ei_result_of<BinaryOp(typename Derived::Scalar)>::type Scalar; static Scalar run(const Derived& mat, const BinaryOp& func) { + ei_assert(mat.rows()>0 && mat.cols()>0 && "you are using a non initialized matrix"); Scalar res; res = mat.coeff(0,0); for(int i = 1; i < mat.rows(); i++) |