Mercurial > octave-dspies
view liboctave/util/module.mk @ 19006:2e0613dadfee draft
All calls to "find" use the same generic implementation (bug #42408, 42421)
* find.cc: Rewrite.
Move generic "find" logic to find.h
(Ffind) : Changed calls to find_nonzero_elem_idx to find_templated
Added unit test for bug #42421
* Array.cc (and .h) (Array::find): Deleted function. Replaced with find::find(Array)
from find.h
* Array.h: Added typedef for array_iterator (in nz-iterators.h) as
Array::iter_type
* DiagArray2.h: Added typedef for diag_iterator (in nz-iterators.h) as
DiagArray2::iter_type
* PermMatrix.h: Added typedef for perm_iterator (in nz-iterators.h) as
PermMatrix::iter_type
Also added typedef for bool as PermMatrix::element_type
(not octave_idx_type)
Added an nnz() function (which is an alias for perm_length) and a
perm_elem(i) function for retrieving the ith element of the permutation
* Sparse.h: Added typedef for sparse_iterator (in nz-iterators.h) as
Sparse::iter_type
Added a short comment documenting the the argument to the numel
function
* idx-vector.cc (idx_vector::idx_mask_rep::as_array): Changed Array.find to
find::find(Array) (in find.h)
* (new file) find.h
* (new file) interp-idx.h: Simple methods for converting between interpreter
index type and internal octave_idx_type/row-col pair
* (new file) min-with-nnz.h: Fast methods for taking an arbitrary matrix M and
an octave_idx_type n and finding min(M.nnz(), n)
* (new file) nz-iterators.h: Iterators for traversing (in column-major order)
the nonzero elements of any array or matrix backwards or forwards
* (new file) direction.h: Generic methods for simplifying code has to deal with
a "backwards or forwards" template argument
* build-sparse-tests.sh: Removed 5-return-value calls to "find" in unit-tests;
Admittedly this commit breaks this "feature" which was undocumented and only
partially supported to begin with (ie never worked for full matrices,
permutation matrices, or diagonal matrices)
author | David Spies <dnspies@gmail.com> |
---|---|
date | Tue, 17 Jun 2014 16:41:11 -0600 |
parents | 89bd70fae066 |
children | 3fb030666878 |
line wrap: on
line source
EXTRA_DIST += \ util/module.mk UTIL_INC = \ util/action-container.h \ util/base-list.h \ util/byte-swap.h \ util/caseless-str.h \ util/cmd-edit.h \ util/cmd-hist.h \ util/data-conv.h \ util/direction.h \ util/find.h \ util/functor.h \ util/glob-match.h \ util/interp-idx.h \ util/lo-array-gripes.h \ util/lo-cutils.h \ util/lo-ieee.h \ util/lo-macros.h \ util/lo-math.h \ util/lo-traits.h \ util/lo-utils.h \ util/min-with-nnz.h \ util/nz-iterators.h \ util/oct-alloc.h \ util/oct-base64.h \ util/oct-binmap.h \ util/oct-cmplx.h \ util/oct-glob.h \ util/oct-inttypes.h \ util/oct-locbuf.h \ util/oct-md5.h \ util/oct-mem.h \ util/oct-mutex.h \ util/oct-refcount.h \ util/oct-rl-edit.h \ util/oct-rl-hist.h \ util/oct-shlib.h \ util/oct-sort.h \ util/oct-sparse.h \ util/pathsearch.h \ util/lo-regexp.h \ util/singleton-cleanup.h \ util/sparse-sort.h \ util/sparse-util.h \ util/statdefs.h \ util/str-vec.h \ util/sun-utils.h \ util/unwind-prot.h \ util/url-transfer.h UTIL_C_SRC = \ util/f2c-main.c \ util/lo-cutils.c \ util/oct-rl-edit.c \ util/oct-rl-hist.c UTIL_SRC = \ util/cmd-edit.cc \ util/cmd-hist.cc \ util/data-conv.cc \ util/glob-match.cc \ util/lo-array-gripes.cc \ util/lo-ieee.cc \ util/lo-utils.cc \ util/oct-alloc.cc \ util/oct-base64.cc \ util/oct-glob.cc \ util/oct-inttypes.cc \ util/oct-locbuf.cc \ util/oct-md5.cc \ util/oct-mutex.cc \ util/oct-shlib.cc \ util/pathsearch.cc \ util/lo-regexp.cc \ util/singleton-cleanup.cc \ util/sparse-sort.cc \ util/sparse-util.cc \ util/str-vec.cc \ util/unwind-prot.cc \ util/url-transfer.cc \ $(UTIL_C_SRC) TEMPLATE_SRC += \ util/oct-sort.cc OTHER_INC += \ util/kpse.cc noinst_LTLIBRARIES += util/libutil.la util_libutil_la_SOURCES = $(UTIL_SRC) util_libutil_la_CPPFLAGS = \ $(liboctave_la_CPPFLAGS) \ $(PCRE_CPPFLAGS) \ $(SPARSE_XCPPFLAGS)