comparison liboctave/array/fNDArray.cc @ 20263:00cf2847355d

Deprecate Array::nelem() and Range::nelem() in favour of ::numel(). * liboctave/array/Array.h (Array::nelem) deprecate in favour of numel(). (Array::capacity, Array:: length): change to call numel() directly. These methods will be deprecated soon. * liboctave/array/PermMatrix.h (PermMatrix::nelem): deprecate in favour of numel(). * liboctave/array/Range.h (Range::numel) new method to replace nelem(). (Range::nelem) deprecate in favour of the new method numel. * liboctave/array/Sparse.h (Sparse::nelem) deprecate in favour of nzmax(). This one is secially bad because unlike the other classes, it is different from numel(). * libinterp/corefcn/debug.cc, libinterp/corefcn/jit-typeinfo.cc, libinterp/corefcn/ls-mat4.cc, libinterp/corefcn/lu.cc, libinterp/corefcn/luinc.cc, libinterp/corefcn/max.cc, libinterp/corefcn/pr-output.cc, libinterp/corefcn/rand.cc, libinterp/corefcn/xpow.cc, libinterp/dldfcn/__magick_read__.cc, libinterp/dldfcn/audioread.cc, libinterp/octave-value/ov-base-int.cc, libinterp/octave-value/ov-bool-mat.cc, libinterp/octave-value/ov-flt-re-mat.cc, libinterp/octave-value/ov-perm.cc, libinterp/octave-value/ov-range.cc, libinterp/octave-value/ov-range.h, libinterp/octave-value/ov-re-mat.cc, libinterp/parse-tree/pt-eval.cc, liboctave/array/Array.cc, liboctave/array/CNDArray.cc, liboctave/array/Range.cc, liboctave/array/dNDArray.cc, liboctave/array/fCNDArray.cc, liboctave/array/fNDArray.cc, liboctave/array/idx-vector.cc, liboctave/array/intNDArray.cc, liboctave/numeric/SparseCmplxLU.cc, liboctave/numeric/SparsedbleLU.cc: replace use of nelem() with numel().
author Carnë Draug <carandraug@octave.org>
date Sun, 24 May 2015 02:41:37 +0100
parents b2100e1659ac
children
comparison
equal deleted inserted replaced
20262:9f484edd8767 20263:00cf2847355d
554 // the largest and smallest values and return them in MAX_VAL and MIN_VAL. 554 // the largest and smallest values and return them in MAX_VAL and MIN_VAL.
555 555
556 bool 556 bool
557 FloatNDArray::all_integers (float& max_val, float& min_val) const 557 FloatNDArray::all_integers (float& max_val, float& min_val) const
558 { 558 {
559 octave_idx_type nel = nelem (); 559 octave_idx_type nel = numel ();
560 560
561 if (nel > 0) 561 if (nel > 0)
562 { 562 {
563 max_val = elem (0); 563 max_val = elem (0);
564 min_val = elem (0); 564 min_val = elem (0);
841 841
842 // This contains no information on the array structure !!! 842 // This contains no information on the array structure !!!
843 std::ostream& 843 std::ostream&
844 operator << (std::ostream& os, const FloatNDArray& a) 844 operator << (std::ostream& os, const FloatNDArray& a)
845 { 845 {
846 octave_idx_type nel = a.nelem (); 846 octave_idx_type nel = a.numel ();
847 847
848 for (octave_idx_type i = 0; i < nel; i++) 848 for (octave_idx_type i = 0; i < nel; i++)
849 { 849 {
850 os << " "; 850 os << " ";
851 octave_write_float (os, a.elem (i)); 851 octave_write_float (os, a.elem (i));
855 } 855 }
856 856
857 std::istream& 857 std::istream&
858 operator >> (std::istream& is, FloatNDArray& a) 858 operator >> (std::istream& is, FloatNDArray& a)
859 { 859 {
860 octave_idx_type nel = a.nelem (); 860 octave_idx_type nel = a.numel ();
861 861
862 if (nel > 0) 862 if (nel > 0)
863 { 863 {
864 float tmp; 864 float tmp;
865 for (octave_idx_type i = 0; i < nel; i++) 865 for (octave_idx_type i = 0; i < nel; i++)