Mercurial > hg > octave-nkf
diff liboctave/CSparse.cc @ 10431:5dd7a7bf4950
simplify sparse->full conversions in liboctave
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Mon, 22 Mar 2010 12:05:33 +0100 |
parents | 99e9bae2d81e |
children | 189274f6c7c4 |
line wrap: on
line diff
--- a/liboctave/CSparse.cc +++ b/liboctave/CSparse.cc @@ -634,15 +634,7 @@ ComplexMatrix SparseComplexMatrix::matrix_value (void) const { - octave_idx_type nr = rows (); - octave_idx_type nc = cols (); - ComplexMatrix retval (nr, nc, Complex (0.0, 0.0)); - - for (octave_idx_type j = 0; j < nc; j++) - for (octave_idx_type i = cidx(j); i < cidx(j+1); i++) - retval.elem (ridx(i), j) = data (i); - - return retval; + return Sparse<Complex>::array_value (); } SparseComplexMatrix