Mercurial > hg > octave-lyh
comparison liboctave/Sparse.cc @ 5766:f3be83cff153
[project @ 2006-04-18 15:17:34 by jwe]
author | jwe |
---|---|
date | Tue, 18 Apr 2006 15:18:22 +0000 |
parents | 7ba9ad1fec11 |
children | ace8d8d26933 |
comparison
equal
deleted
inserted
replaced
5765:7ba9ad1fec11 | 5766:f3be83cff153 |
---|---|
1892 { | 1892 { |
1893 // Special case permutation like indexing for speed | 1893 // Special case permutation like indexing for speed |
1894 retval = Sparse<T> (n, m, nnz ()); | 1894 retval = Sparse<T> (n, m, nnz ()); |
1895 octave_idx_type *ri = retval.xridx (); | 1895 octave_idx_type *ri = retval.xridx (); |
1896 | 1896 |
1897 // Can't use OCTAVE_LOCAL_BUFFER with bool, and so | 1897 std::vector<T> X (n); |
1898 // can't with T either | |
1899 T X [n]; | |
1900 for (octave_idx_type i = 0; i < nr; i++) | 1898 for (octave_idx_type i = 0; i < nr; i++) |
1901 itmp [i] = -1; | 1899 itmp [i] = -1; |
1902 for (octave_idx_type i = 0; i < n; i++) | 1900 for (octave_idx_type i = 0; i < n; i++) |
1903 itmp[idx_i.elem(i)] = i; | 1901 itmp[idx_i.elem(i)] = i; |
1904 | 1902 |