Mercurial > octave-nkf
comparison libinterp/corefcn/dassl.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 |
---|---|
61 dassl_user_function (const ColumnVector& x, const ColumnVector& xdot, | 61 dassl_user_function (const ColumnVector& x, const ColumnVector& xdot, |
62 double t, octave_idx_type& ires) | 62 double t, octave_idx_type& ires) |
63 { | 63 { |
64 ColumnVector retval; | 64 ColumnVector retval; |
65 | 65 |
66 assert (x.capacity () == xdot.capacity ()); | 66 assert (x.numel () == xdot.numel ()); |
67 | 67 |
68 octave_value_list args; | 68 octave_value_list args; |
69 | 69 |
70 args(2) = t; | 70 args(2) = t; |
71 args(1) = xdot; | 71 args(1) = xdot; |
109 dassl_user_jacobian (const ColumnVector& x, const ColumnVector& xdot, | 109 dassl_user_jacobian (const ColumnVector& x, const ColumnVector& xdot, |
110 double t, double cj) | 110 double t, double cj) |
111 { | 111 { |
112 Matrix retval; | 112 Matrix retval; |
113 | 113 |
114 assert (x.capacity () == xdot.capacity ()); | 114 assert (x.numel () == xdot.numel ()); |
115 | 115 |
116 octave_value_list args; | 116 octave_value_list args; |
117 | 117 |
118 args(3) = cj; | 118 args(3) = cj; |
119 args(2) = t; | 119 args(2) = t; |
425 DASSL_ABORT1 ("expecting critical time vector as fifth argument"); | 425 DASSL_ABORT1 ("expecting critical time vector as fifth argument"); |
426 | 426 |
427 crit_times_set = 1; | 427 crit_times_set = 1; |
428 } | 428 } |
429 | 429 |
430 if (state.capacity () != deriv.capacity ()) | 430 if (state.numel () != deriv.numel ()) |
431 DASSL_ABORT1 ("x and xdot must have the same size"); | 431 DASSL_ABORT1 ("x and xdot must have the same size"); |
432 | 432 |
433 double tzero = out_times (0); | 433 double tzero = out_times (0); |
434 | 434 |
435 DAEFunc func (dassl_user_function); | 435 DAEFunc func (dassl_user_function); |