Mercurial > octave
comparison liboctave/numeric/DASPK.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 | 4197fc428c7d |
children | a9574e3c6e9e |
comparison
equal
deleted
inserted
replaced
20228:00cf2847355d | 20229:5dfaaaae784f |
---|---|
536 Matrix | 536 Matrix |
537 DASPK::integrate (const ColumnVector& tout, Matrix& xdot_out) | 537 DASPK::integrate (const ColumnVector& tout, Matrix& xdot_out) |
538 { | 538 { |
539 Matrix retval; | 539 Matrix retval; |
540 | 540 |
541 octave_idx_type n_out = tout.capacity (); | 541 octave_idx_type n_out = tout.numel (); |
542 octave_idx_type n = size (); | 542 octave_idx_type n = size (); |
543 | 543 |
544 if (n_out > 0 && n > 0) | 544 if (n_out > 0 && n > 0) |
545 { | 545 { |
546 retval.resize (n_out, n); | 546 retval.resize (n_out, n); |
581 DASPK::integrate (const ColumnVector& tout, Matrix& xdot_out, | 581 DASPK::integrate (const ColumnVector& tout, Matrix& xdot_out, |
582 const ColumnVector& tcrit) | 582 const ColumnVector& tcrit) |
583 { | 583 { |
584 Matrix retval; | 584 Matrix retval; |
585 | 585 |
586 octave_idx_type n_out = tout.capacity (); | 586 octave_idx_type n_out = tout.numel (); |
587 octave_idx_type n = size (); | 587 octave_idx_type n = size (); |
588 | 588 |
589 if (n_out > 0 && n > 0) | 589 if (n_out > 0 && n > 0) |
590 { | 590 { |
591 retval.resize (n_out, n); | 591 retval.resize (n_out, n); |
595 { | 595 { |
596 retval.elem (0, i) = x.elem (i); | 596 retval.elem (0, i) = x.elem (i); |
597 xdot_out.elem (0, i) = xdot.elem (i); | 597 xdot_out.elem (0, i) = xdot.elem (i); |
598 } | 598 } |
599 | 599 |
600 octave_idx_type n_crit = tcrit.capacity (); | 600 octave_idx_type n_crit = tcrit.numel (); |
601 | 601 |
602 if (n_crit > 0) | 602 if (n_crit > 0) |
603 { | 603 { |
604 octave_idx_type i_crit = 0; | 604 octave_idx_type i_crit = 0; |
605 octave_idx_type i_out = 1; | 605 octave_idx_type i_out = 1; |