changeset | 3fb030666878 |
---|---|
branch | default |
bookmark | dspies |
tag | tip |
user | David Spies <dnspies@gmail.com> |
description | Added special-case logical-indexing function * logical-index.h (New file) : Logical-indexing function. May be called on octave_value types via call_bool_index * nz-iterators.h : Add base-class nz_iterator for iterator types. Array has template bool for whether to internally store row-col or compute on the fly Add skip_ahead method which skips forward to the next nonzero after its argument Add flat_index for computing octave_idx_type index of current position (with assertion failure in the case of overflow) Move is_zero to separate file * ov-base-diag.cc, ov-base-mat.cc, ov-base-sparse.cc, ov-perm.cc (do_index_op): Add call to call_bool_index in logical-index.h * Array.h : Move forward-declaration for array_iterator to separate header file * dim-vector.cc (dim_max): Refers to idx-bounds.h (max_idx) * array-iter-decl.h (New file): Header file for forward declaration of array-iterator * direction.h : Add constants fdirc and bdirc to avoid having to reconstruct them * dv-utils.h, dv-utils.cc (New files) : Utility functions for querying and constructing dim-vectors * idx-bounds.h (New file) : Utility constants and functions for determining whether things will overflow the maximum allowed bounds * interp-idx.h (New function : to_flat_idx) : Converts row-col pair to linear index of octave_idx_type * is-zero.h (New file) : Function for determining whether an element is zero * logical-index.tst : Add tests for correct return-value dimensions and large sparse matrix behavior |
files | libinterp/octave-value/ov-base-diag.cc libinterp/octave-value/ov-base-mat.cc libinterp/octave-value/ov-base-sparse.cc libinterp/octave-value/ov-perm.cc liboctave/array/Array.h liboctave/array/dim-vector.cc liboctave/util/array-iter-decl.h liboctave/util/direction.h liboctave/util/dv-utils.cc liboctave/util/dv-utils.h |
changeset | 8d47ce2053f2 |
---|---|
branch | |
bookmark | |
tag | |
user | David Spies <dnspies@gmail.com> |
description | Added safety checks to Array::xelem There's no reason to have a method which never checks invariants, ever. Added debugging checks to Array::xelem to help catch and debug out-of-bounds errors and reference overlap * configure.ac: Added configuration option for uniqueness-checking with xelem * jit-typeinfo.cc (octave_jit_paren_scalar): Call const Array::xelem rather than Array::xelem * Array-util.h, Array-util.cc (check_out_of_range): Extract common pattern to method (check_index): Methods to check index is in-bounds (compute_index): Added bool parameter check. does not check bounds when check is false and BOUNDS_CHECKING is off * Array.h, Array.cc (xelem): Use methods from Array-util.h to compute indices (is_unique): Check if this is the only reference to data * CmplxQR.cc, dbleQR.cc, fCmplxQR.cc, floatQR.cc (form): Move second assignment to after the call to xelem * lo-array-gripes.h, lo-array-gripes.cc (gripe_modifying_nonunique): Added error message for when non-const xelem is called on non-unique array |
files | configure.ac libinterp/corefcn/jit-typeinfo.cc liboctave/array/Array-util.cc liboctave/array/Array-util.h liboctave/array/Array.cc liboctave/array/Array.h liboctave/numeric/CmplxQR.cc liboctave/numeric/dbleQR.cc liboctave/numeric/fCmplxQR.cc liboctave/numeric/floatQR.cc |
changeset | 80ca3b05d77c |
---|---|
branch | |
bookmark | |
tag | |
user | David Spies <dnspies@gmail.com> |
description | New "dispatch" selects template argument from octave-value (Bug #42424, 42425) * find.cc (Ffind): This method now calls dispatch() rather than attempting to handle all matrix types on its own (findTemplated): Changed to a functor to be passed as a template template argument to dispatch() (findInfo): A struct that holds the other arguments to find (n_to_find, direction, nargout) Added unit tests for bugs 42424 and 42425 * (new file) dispatch.h (dispatch): A method for dispatching function calls to the right templated value based on an octave_value argument. |
files | libinterp/corefcn/dispatch.h libinterp/corefcn/find.cc libinterp/corefcn/module.mk |
changeset | 4f0d0b212fd6 |
---|---|
branch | |
bookmark | |
tag | |
user | David Spies <dnspies@gmail.com> |
description | WIP |
files | liboctave/util/accumulate.cc |
changeset | 2e0613dadfee |
---|---|
branch | |
bookmark | |
tag | |
user | David Spies <dnspies@gmail.com> |
description | 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) |
files | libinterp/corefcn/find.cc liboctave/array/Array.cc liboctave/array/Array.h liboctave/array/DiagArray2.h liboctave/array/PermMatrix.h liboctave/array/Sparse.h liboctave/array/dim-vector.h liboctave/array/idx-vector.cc liboctave/util/direction.h liboctave/util/find.h |
changeset | bf7c5d96d1ff |
---|---|
branch | gui-release |
bookmark | |
tag | |
user | Torsten <ttl@justmail.de> |
description | improved regexp for file name suggestion when saving a new editor file * file-editor-tab.cc (get_function_name): improved regexp used for finding the function name when saving a new function file in the editor |
files | libgui/src/m-editor/file-editor-tab.cc |
changeset | e87e65bc71ae |
---|---|
branch | gui-release |
bookmark | |
tag | |
user | Torsten <ttl@justmail.de> |
description | improved finding a function file for editing in gui (bug #41509) * octave-qscintilla.h: new signal context_menu_edit_signal * octave-qscintilla.cc (contextmenu_edit): only emit a new signal, handling of this menu action has been moved to file_editor_tab * file-editor-tab.h: new slot handle_context_menu_edit * file-editor-tab.cc (constructor): connect new signal from octave-qscintilla to the related new slot for handling the edit function event; (handle_context_menu_edit): new slot searching for a matching subfunction, a private function or one within the same directory when __which__ returns an empty type; old contents from contextmenu_edit has moved here as well |
files | libgui/src/m-editor/file-editor-tab.cc libgui/src/m-editor/file-editor-tab.h libgui/src/m-editor/octave-qscintilla.cc libgui/src/m-editor/octave-qscintilla.h |
changeset | d00f6b09258f |
---|---|
branch | |
bookmark | @ |
tag | |
user | Rik <rik@octave.org> |
description | Overhaul functions in scripts/set directory. * set.txi: Rewrite documentation for set functions. * intersect.m: Rewrite docstring. Use by_rows variable for code clarity. Return output orientation which is compatible with Matlab. Add %!tests for output orientation and N-dimensional inputs. * setdiff.m: Rewrite docstring. Use by_rows variable for code clarity. Rename output i to ia to clarify it is an index into the set a. Return output orientation which is compatible with Matlab. Add %!tests for N-dimensional inputs. * setxor.m: Rewrite docstring. Use by_rows variable for code clarity. Return output orientation which is compatible with Matlab. Add %!tests for output orientation and N-dimensional inputs. * union.m: Rewrite docstring. Use by_rows variable for code clarity. Return output orientation which is compatible with Matlab. Add %!tests for output orientation and N-dimensional inputs. Add %!tests for validsetargs which are common to all set functions. * unique.m: Rewrite docstring. Verify that input is numeric or cell array of strings. Avoid computing idx for optional i,j outputs unless required. Add %!error tests for input validation. * ismember.m: Rewrite docstring. Use input variable 'a' instead of 'A' for conformance with rest of set functions. Rename output index variable to s_idx for clarity that it is an index into the set s. * powerset.m: Rewrite doctring. Add input validation on nargin. Add %!error input validation tests. * module.mk: Include validsetargs.m in build system. * validsetargs.m: Function renamed from validargs which was too general. * validargs.m: Function renamed to validsetargs. |
files | doc/interpreter/set.txi scripts/set/intersect.m scripts/set/ismember.m scripts/set/module.mk scripts/set/powerset.m scripts/set/private/validargs.m scripts/set/private/validsetargs.m scripts/set/setdiff.m scripts/set/setxor.m scripts/set/union.m |
changeset | 00b1d60500bd |
---|---|
branch | gui-release |
bookmark | |
tag | |
user | Torsten <ttl@justmail.de> |
description | improved finding a function file for editing in gui (case 1 in bug #41509) * octave-qscintilla.cc (contextmenu_edit): call F__which__ to get the correct path of a function file even it is a class function |
files | libgui/src/m-editor/octave-qscintilla.cc |
changeset | 391e080ae810 |
---|---|
branch | |
bookmark | |
tag | |
user | Rik <rik@octave.org> |
description | __go_draw_axes__.m: Fix regression using legend with log axes introduced in f84361735a40. * __go_draw_axes__.m: Use line continuation when creating fontspacespec so that wrapping line to < 80 characters doesn't produce a 2 row matrix. |
files | scripts/plot/util/private/__go_draw_axes__.m |