GNU Octave
4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
Go to the source code of this file.
Classes | |
struct | sub2ind_helper |
bool all_colon_equiv | ( | const Array< idx_vector > & | ra_idx, |
const dim_vector & | frozen_lengths | ||
) |
Definition at line 339 of file Array-util.cc.
References dim_vector::ndims(), Array< T >::numel(), ra_idx, and retval.
bool all_ok | ( | const Array< idx_vector > & | ra_idx | ) |
Definition at line 301 of file Array-util.cc.
References Array< T >::numel(), ra_idx, and retval.
bool all_ones | ( | const Array< octave_idx_type > & | arr | ) |
Definition at line 363 of file Array-util.cc.
References Array< T >::numel(), and retval.
bool any_ones | ( | const Array< octave_idx_type > & | arr | ) |
Definition at line 159 of file Array-util.cc.
References Array< T >::numel(), and retval.
bool any_orig_empty | ( | const Array< idx_vector > & | ra_idx | ) |
Definition at line 320 of file Array-util.cc.
References Array< T >::numel(), ra_idx, and retval.
octave_idx_type compute_index | ( | octave_idx_type | n, |
const dim_vector & | dims | ||
) |
Definition at line 176 of file Array-util.cc.
References dims, octave::err_index_out_of_range(), octave::err_invalid_index(), and dim_vector::numel().
Referenced by Sparse< bool >::checkelem(), octave_map::checkelem(), Array< T >::checkelem(), boolNDArray::compute_index(), charNDArray::compute_index(), intNDArray< T >::compute_index(), ComplexNDArray::compute_index(), FloatComplexNDArray::compute_index(), FloatNDArray::compute_index(), NDArray::compute_index(), Array< T >::compute_index(), dim_vector::compute_index(), Sparse< bool >::elem(), and Sparse< bool >::xelem().
octave_idx_type compute_index | ( | octave_idx_type | i, |
octave_idx_type | j, | ||
const dim_vector & | dims | ||
) |
Definition at line 187 of file Array-util.cc.
References dims, octave::err_index_out_of_range(), octave::err_invalid_index(), and dim_vector::numel().
octave_idx_type compute_index | ( | octave_idx_type | i, |
octave_idx_type | j, | ||
octave_idx_type | k, | ||
const dim_vector & | dims | ||
) |
Definition at line 202 of file Array-util.cc.
References dims, octave::err_index_out_of_range(), octave::err_invalid_index(), and dim_vector::numel().
octave_idx_type compute_index | ( | const Array< octave_idx_type > & | ra_idx, |
const dim_vector & | dims | ||
) |
Definition at line 222 of file Array-util.cc.
References dim_vector::compute_index(), d, Array< T >::data(), dv, octave::err_index_out_of_range(), octave::err_invalid_index(), Array< T >::numel(), ra_idx, and dim_vector::redim().
Array<idx_vector> conv_to_array | ( | const idx_vector * | tmp, |
const octave_idx_type | len | ||
) |
Definition at line 249 of file Array-util.cc.
References retval.
Array<octave_idx_type> conv_to_int_array | ( | const Array< idx_vector > & | a | ) |
Definition at line 238 of file Array-util.cc.
References a, Array< T >::dims(), Array< T >::numel(), and retval.
Referenced by octave_base_matrix< MT >::do_index_op().
dim_vector freeze | ( | Array< idx_vector > & | ra_idx, |
const dim_vector & | dimensions, | ||
int | resize_ok | ||
) |
Definition at line 260 of file Array-util.cc.
References dim_vector::ndims(), Array< T >::numel(), ra_idx, dim_vector::resize(), and retval.
Array<octave_idx_type> get_elt_idx | ( | const Array< idx_vector > & | ra_idx, |
const Array< octave_idx_type > & | result_idx | ||
) |
Definition at line 380 of file Array-util.cc.
References Array< T >::numel(), ra_idx, and retval.
Array<octave_idx_type> get_ra_idx | ( | octave_idx_type | idx, |
const dim_vector & | dims | ||
) |
Definition at line 394 of file Array-util.cc.
References dims, octave::math::floor(), increment_index(), dim_vector::ndims(), dim_vector::numel(), Array< T >::resize(), retval, and var.
octave_idx_type get_scalar_idx | ( | Array< octave_idx_type > & | idx, |
dim_vector & | dims | ||
) |
Definition at line 80 of file Array-util.cc.
References dims, Array< T >::numel(), and retval.
void increment_index | ( | Array< octave_idx_type > & | ra_idx, |
const dim_vector & | dimensions, | ||
int | start_dimension | ||
) |
Definition at line 59 of file Array-util.cc.
References dim_vector::ndims(), Array< T >::numel(), and ra_idx.
Referenced by get_ra_idx(), intNDArray< T >::increment_index(), octave_print_internal(), octave_print_internal_template(), operator<<(), and print_nd_array().
Array<idx_vector> ind2sub | ( | const dim_vector & | dv, |
const idx_vector & | idx | ||
) |
Definition at line 619 of file Array-util.cc.
References current_liboctave_error_handler, dv, idx_vector::extent(), idx_vector::is_scalar(), k, idx_vector::length(), dim_vector::ndims(), numel(), dim_vector::numel(), OCTAVE_LOCAL_BUFFER, idx_vector::orig_dimensions(), and retval.
Referenced by octave_base_diag< DMT, MT >::subsasgn().
bool index_in_bounds | ( | const Array< octave_idx_type > & | ra_idx, |
const dim_vector & | dimensions | ||
) |
Definition at line 34 of file Array-util.cc.
References dim_vector::ndims(), Array< T >::numel(), ra_idx, and retval.
bool is_scalar | ( | const dim_vector & | dim | ) |
Definition at line 115 of file Array-util.cc.
References dim_vector::ndims(), and retval.
Referenced by cdef_object_array::subsasgn(), and cdef_object_array::subsref().
bool is_vector | ( | const dim_vector & | dim | ) |
Definition at line 139 of file Array-util.cc.
References m, and dim_vector::ndims().
octave_idx_type num_ones | ( | const Array< octave_idx_type > & | ra_idx | ) |
Definition at line 101 of file Array-util.cc.
References Array< T >::numel(), ra_idx, and retval.
Referenced by dim_vector::all_ones().
int permute_vector_compare | ( | const void * | a, |
const void * | b | ||
) |
Definition at line 664 of file Array-util.cc.
References a, b, and permute_vector::pidx.
idx_vector sub2ind | ( | const dim_vector & | dv, |
const Array< idx_vector > & | idxa | ||
) |
Definition at line 534 of file Array-util.cc.
References current_liboctave_error_handler, e, octave::index_exception::err_id(), octave::err_index_out_of_range(), idx_vector::extent(), Array< T >::fortran_vec(), idx_vector::is_range(), idx_vector::length(), idx_vector::make_range(), octave::index_exception::message(), Array< T >::numel(), dim_vector::redim(), retval, octave::index_exception::set_pos_if_unset(), octave::index_exception::set_var(), start, and string.
bool vector_equivalent | ( | const dim_vector & | dv | ) |
Definition at line 280 of file Array-util.cc.
References dv, and dim_vector::ndims().
dim_vector zero_dims_inquire | ( | const Array< idx_vector > & | ia, |
const dim_vector & | rhdv | ||
) |
Definition at line 428 of file Array-util.cc.
References dim_vector::alloc(), dim_vector::chop_all_singletons(), dim_vector::ndims(), Array< T >::numel(), dim_vector::resize(), and scalar.
Referenced by Array< T >::assign().
dim_vector zero_dims_inquire | ( | const idx_vector & | i, |
const idx_vector & | j, | ||
const dim_vector & | rhdv | ||
) |
Definition at line 485 of file Array-util.cc.
References dim_vector::chop_all_singletons(), idx_vector::extent(), idx_vector::is_colon(), idx_vector::is_scalar(), k, and dim_vector::ndims().