comparison liboctave/array/Sparse.cc @ 20229:5dfaaaae784f

Deprecate Array::capacity() and Sparse::capacity() for numel() and nzmax(). * liboctave/array/Array.h (Array::capacity): deprecate for ::numel(). * liboctave/array/Sparse.h (Sparse::capacity): deprecate for ::nzmax(). Also move comments into doxygen docs. * libinterp/corefcn/daspk.cc, libinterp/corefcn/dasrt.cc, libinterp/corefcn/dassl.cc, libinterp/corefcn/jit-typeinfo.h, libinterp/corefcn/quad.cc, libinterp/corefcn/variables.cc, libinterp/octave-value/ov-base-sparse.h, libinterp/octave-value/ov-base.h, libinterp/octave-value/ov.h, liboctave/array/Sparse.cc, liboctave/numeric/DASPK.cc, liboctave/numeric/DASRT.cc, liboctave/numeric/DASSL.cc, liboctave/numeric/LSODE.cc, liboctave/numeric/Quad.cc, liboctave/numeric/base-de.h, liboctave/numeric/base-min.h, liboctave/numeric/oct-rand.cc: replace use of capacity by numel() or nzmax() as appropriate.
author Carnë Draug <carandraug@octave.org>
date Sun, 24 May 2015 04:47:20 +0100
parents b2100e1659ac
children a9574e3c6e9e
comparison
equal deleted inserted replaced
20228:00cf2847355d 20229:5dfaaaae784f
1877 octave_idx_type li = lblookup (ridx (), nz, lb); 1877 octave_idx_type li = lblookup (ridx (), nz, lb);
1878 octave_idx_type ui = lblookup (ridx (), nz, ub); 1878 octave_idx_type ui = lblookup (ridx (), nz, ub);
1879 octave_idx_type rnz = rhs.nnz (); 1879 octave_idx_type rnz = rhs.nnz ();
1880 octave_idx_type new_nz = nz - (ui - li) + rnz; 1880 octave_idx_type new_nz = nz - (ui - li) + rnz;
1881 1881
1882 if (new_nz >= nz && new_nz <= capacity ()) 1882 if (new_nz >= nz && new_nz <= nzmax ())
1883 { 1883 {
1884 // Adding/overwriting elements, enough capacity allocated. 1884 // Adding/overwriting elements, enough capacity allocated.
1885 1885
1886 if (new_nz > nz) 1886 if (new_nz > nz)
1887 { 1887 {
2060 octave_idx_type li = cidx (lb); 2060 octave_idx_type li = cidx (lb);
2061 octave_idx_type ui = cidx (ub); 2061 octave_idx_type ui = cidx (ub);
2062 octave_idx_type rnz = rhs.nnz (); 2062 octave_idx_type rnz = rhs.nnz ();
2063 octave_idx_type new_nz = nz - (ui - li) + rnz; 2063 octave_idx_type new_nz = nz - (ui - li) + rnz;
2064 2064
2065 if (new_nz >= nz && new_nz <= capacity ()) 2065 if (new_nz >= nz && new_nz <= nzmax ())
2066 { 2066 {
2067 // Adding/overwriting elements, enough capacity allocated. 2067 // Adding/overwriting elements, enough capacity allocated.
2068 2068
2069 if (new_nz > nz) 2069 if (new_nz > nz)
2070 { 2070 {