comparison liboctave/array/Array.h @ 20439: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 00cf2847355d
children a9574e3c6e9e
comparison
equal deleted inserted replaced
20438:00cf2847355d 20439:5dfaaaae784f
251 251
252 // Number of elements in the array. These are all synonyms. 252 // Number of elements in the array. These are all synonyms.
253 //@{ 253 //@{
254 //! Number of elements in the array. 254 //! Number of elements in the array.
255 //! Synonymous with numel(). 255 //! Synonymous with numel().
256 octave_idx_type capacity (void) const { return numel (); } 256 //! @note This method is deprecated in favour of numel().
257 GCC_ATTR_DEPRECATED octave_idx_type capacity (void) const { return numel (); }
257 258
258 //! Number of elements in the array. 259 //! Number of elements in the array.
259 /*! Synonymous with capacity() and numel(). 260 /*! Synonymous with numel().
260
261 @note This method is deprecated in favour of numel(). 261 @note This method is deprecated in favour of numel().
262 262
263 @note 263 @note
264 This is @em not the same as @c %length() at the Octave interpreter. 264 This is @em not the same as @c %length() at the Octave interpreter.
265 At the Octave interpreter, the function @c %length() returns the 265 At the Octave interpreter, the function @c %length() returns the
267 number of elements. 267 number of elements.
268 */ 268 */
269 octave_idx_type length (void) const { return numel (); } 269 octave_idx_type length (void) const { return numel (); }
270 270
271 //! Number of elements in the array. 271 //! Number of elements in the array.
272 //! Synonymous with capacity() and numel(). 272 //! Synonymous with numel().
273 //! @note This method is deprecated in favour of numel(). 273 //! @note This method is deprecated in favour of numel().
274 GCC_ATTR_DEPRECATED octave_idx_type nelem (void) const { return numel (); } 274 GCC_ATTR_DEPRECATED octave_idx_type nelem (void) const { return numel (); }
275 275
276 //! Number of elements in the array. 276 //! Number of elements in the array.
277 //! Synonymous with capacity().
278 octave_idx_type numel (void) const { return slice_len; } 277 octave_idx_type numel (void) const { return slice_len; }
279 //@} 278 //@}
280 279
281 //! Return the array as a column vector. 280 //! Return the array as a column vector.
282 Array<T> as_column (void) const 281 Array<T> as_column (void) const