comparison liboctave/numeric/LSODE.cc @ 20264: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 4197fc428c7d
children a9574e3c6e9e
comparison
equal deleted inserted replaced
20263:00cf2847355d 20264:5dfaaaae784f
381 Matrix 381 Matrix
382 LSODE::do_integrate (const ColumnVector& tout) 382 LSODE::do_integrate (const ColumnVector& tout)
383 { 383 {
384 Matrix retval; 384 Matrix retval;
385 385
386 octave_idx_type n_out = tout.capacity (); 386 octave_idx_type n_out = tout.numel ();
387 octave_idx_type n = size (); 387 octave_idx_type n = size ();
388 388
389 if (n_out > 0 && n > 0) 389 if (n_out > 0 && n > 0)
390 { 390 {
391 retval.resize (n_out, n); 391 retval.resize (n_out, n);
411 Matrix 411 Matrix
412 LSODE::do_integrate (const ColumnVector& tout, const ColumnVector& tcrit) 412 LSODE::do_integrate (const ColumnVector& tout, const ColumnVector& tcrit)
413 { 413 {
414 Matrix retval; 414 Matrix retval;
415 415
416 octave_idx_type n_out = tout.capacity (); 416 octave_idx_type n_out = tout.numel ();
417 octave_idx_type n = size (); 417 octave_idx_type n = size ();
418 418
419 if (n_out > 0 && n > 0) 419 if (n_out > 0 && n > 0)
420 { 420 {
421 retval.resize (n_out, n); 421 retval.resize (n_out, n);
422 422
423 for (octave_idx_type i = 0; i < n; i++) 423 for (octave_idx_type i = 0; i < n; i++)
424 retval.elem (0, i) = x.elem (i); 424 retval.elem (0, i) = x.elem (i);
425 425
426 octave_idx_type n_crit = tcrit.capacity (); 426 octave_idx_type n_crit = tcrit.numel ();
427 427
428 if (n_crit > 0) 428 if (n_crit > 0)
429 { 429 {
430 octave_idx_type i_crit = 0; 430 octave_idx_type i_crit = 0;
431 octave_idx_type i_out = 1; 431 octave_idx_type i_out = 1;