comparison liboctave/Array.h @ 9878:ead4f9c82a9a

implement Array<T>::nnz
author Jaroslav Hajek <highegg@gmail.com>
date Fri, 27 Nov 2009 09:10:21 +0100
parents c0b54271904b
children 7c8392a034e6
comparison
equal deleted inserted replaced
9877:cac3b4e5035b 9878:ead4f9c82a9a
639 Array<octave_idx_type> lookupm (const Array<T>& values, sortmode mode = UNSORTED) const; 639 Array<octave_idx_type> lookupm (const Array<T>& values, sortmode mode = UNSORTED) const;
640 640
641 // This looks up only exact matches, returning true/false if match. 641 // This looks up only exact matches, returning true/false if match.
642 Array<bool> lookupb (const Array<T>& values, sortmode mode = UNSORTED) const; 642 Array<bool> lookupb (const Array<T>& values, sortmode mode = UNSORTED) const;
643 643
644 // Count nonzero elements.
645 octave_idx_type nnz (void) const;
646
644 // Find indices of (at most n) nonzero elements. If n is specified, backward 647 // Find indices of (at most n) nonzero elements. If n is specified, backward
645 // specifies search from backward. 648 // specifies search from backward.
646 Array<octave_idx_type> find (octave_idx_type n = -1, bool backward = false) const; 649 Array<octave_idx_type> find (octave_idx_type n = -1, bool backward = false) const;
647 650
648 // Returns the n-th element in increasing order, using the same ordering as 651 // Returns the n-th element in increasing order, using the same ordering as