Mercurial > hg > octave-nkf
diff liboctave/Sparse.cc @ 9469:c6edba80dfae
sanity checks for loading sparse matrices
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 29 Jul 2009 12:15:27 -0400 |
parents | 39be2c4531c8 |
children | 829e69ec3110 |
line wrap: on
line diff
--- a/liboctave/Sparse.cc +++ b/liboctave/Sparse.cc @@ -43,6 +43,7 @@ #include "Sparse.h" #include "sparse-sort.h" +#include "sparse-util.h" #include "oct-spparms.h" template <class T> @@ -199,6 +200,13 @@ } template <class T> +bool +Sparse<T>::SparseRep::indices_ok (void) const +{ + return sparse_indices_ok (r, c, nrows, ncols, nnz ()); +} + +template <class T> template <class U> Sparse<T>::Sparse (const Sparse<U>& a) : dimensions (a.dimensions), idx (0), idx_count (0)