Mercurial > hg > octave-lyh
diff src/ov-base-diag.cc @ 14590:6250e1232c9c stable
Implement proper op() indexing for diagonal matrices (bug #36368)
* DiagArray2.h (DiagArray2<T>::check_idx): New function.
(DiagArray2<T>::checkelem): Deleted. (DiagArray2<T>::operator()): New
non-const version, returns references. Conditionally call check_idx.
* DiagArray2.cc (DiagArray2<T>::check_idx): Contents copied over from
checkelem.
(DiagArray2<T>::checkelem): Deleted.
* ov-base-diag.cc (octave_base_diag<DMT, MT>::do_index_op): Replace
call to now-inaccessible checkelem() with elem().
* ov-cx-diag.cc: Add a test for this bug.
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Wed, 02 May 2012 17:29:40 -0400 |
parents | 72c96de7a403 |
children | f4acb362b513 fd5c0159b588 |
line wrap: on
line diff