N Dimensional Array with copy-on-write semantics. More...
#include "Array.h"
Classes | |
class | ArrayRep |
The real representation of all arrays. More... | |
Public Types | |
typedef bool(* | compare_fcn_type) (typename ref_param< T >::type, typename ref_param< T >::type) |
typedef ref_param< T >::type | crefT |
typedef T | element_type |
typedef octave_idx_type | size_type |
Used for operator(), and returned by numel() and size() (beware: signed integer) More... | |
typedef T | value_type |
Public Member Functions | |
Array () | |
Empty ctor (0 by 0). More... | |
Array (Array< T, Alloc > &&a) | |
Array (const Array< T, Alloc > &a) | |
No type conversion case. More... | |
Array (const Array< T, Alloc > &a, const dim_vector &dv) | |
Reshape constructor. More... | |
template<typename U , typename A = Alloc> | |
Array (const Array< U, A > &a) | |
Type conversion case. More... | |
template<template< typename... > class Container> | |
Array (const Container< T > &a, const dim_vector &dv) | |
Constructor from standard library sequence containers. More... | |
Array (const dim_vector &dv) | |
nD uninitialized ctor. More... | |
Array (const dim_vector &dv, const T &val) | |
nD initialized ctor. More... | |
Array (T *ptr, const dim_vector &dv, const Alloc &xallocator=Alloc()) | |
virtual | ~Array () |
Array< T, Alloc > | as_column () const |
Return the array as a column vector. More... | |
Array< T, Alloc > | as_matrix () const |
Return the array as a matrix. More... | |
Array< T, Alloc > | as_row () const |
Return the array as a row vector. More... | |
void | clear () |
void | clear (const dim_vector &dv) |
void | clear (octave_idx_type r, octave_idx_type c) |
void | fill (const T &val) |
Array< octave_idx_type > | find (octave_idx_type, bool) const |
Array< octave_idx_type > | find (octave_idx_type, bool) const |
sortmode | is_sorted_rows (sortmode) const |
sortmode | is_sorted_rows (sortmode) const |
sortmode | issorted (sortmode mode) const |
sortmode | issorted (sortmode) const |
sortmode | issorted (sortmode) const |
Array< octave_idx_type > | lookup (const Array< octave::cdef_object > &, sortmode) const |
Array< octave_idx_type > | lookup (const Array< octave::idx_vector > &, sortmode) const |
octave_idx_type | lookup (octave::cdef_object const &, sortmode) const |
octave_idx_type | lookup (octave::idx_vector const &, sortmode) const |
void | make_unique () |
octave_idx_type | nnz () const |
octave_idx_type | nnz () const |
Array< octave::cdef_object > | nth_element (const octave::idx_vector &, int) const |
Array< octave::idx_vector > | nth_element (const octave::idx_vector &, int) const |
octave_idx_type | numel () const |
Number of elements in the array. More... | |
Array< T, Alloc > & | operator= (Array< T, Alloc > &&a) |
Array< T, Alloc > & | operator= (const Array< T, Alloc > &a) |
Array< octave::cdef_object > | sort (Array< octave_idx_type > &sidx, int, sortmode) const |
Array< octave::idx_vector > | sort (Array< octave_idx_type > &sidx, int, sortmode) const |
Array< octave::cdef_object > | sort (int, sortmode) const |
Array< octave::idx_vector > | sort (int, sortmode) const |
Array< octave_idx_type > | sort_rows_idx (sortmode) const |
Array< octave_idx_type > | sort_rows_idx (sortmode) const |
First dimension | |
Get the first dimension of the array (number of rows) | |
octave_idx_type | dim1 () const |
octave_idx_type | rows () const |
Second dimension | |
Get the second dimension of the array (number of columns) | |
octave_idx_type | dim2 () const |
octave_idx_type | cols () const |
octave_idx_type | columns () const |
Protected Member Functions | |
Array (const Array< T, Alloc > &a, const dim_vector &dv, octave_idx_type l, octave_idx_type u) | |
slice constructor More... | |
Protected Attributes | |
dim_vector | m_dimensions |
Array< T, Alloc >::ArrayRep * | m_rep |
T * | m_slice_data |
octave_idx_type | m_slice_len |
Third dimension | |
template<typename U , typename A > | |
class | Array |
Size of the specified dimension. More... | |
octave_idx_type | dim3 () const |
Size of the specified dimension. More... | |
octave_idx_type | pages () const |
Size of the specified dimension. More... | |
size_type | size (const size_type d) const |
Size of the specified dimension. More... | |
std::size_t | byte_size () const |
Size of the specified dimension. More... | |
const dim_vector & | dims () const |
Return a const-reference so that dims ()(i) works efficiently. More... | |
Array< T, Alloc > | squeeze () const |
Chop off leading singleton dimensions. More... | |
octave_idx_type | compute_index (octave_idx_type i, octave_idx_type j) const |
Size of the specified dimension. More... | |
octave_idx_type | compute_index (octave_idx_type i, octave_idx_type j, octave_idx_type k) const |
Size of the specified dimension. More... | |
octave_idx_type | compute_index (const Array< octave_idx_type > &ra_idx) const |
Size of the specified dimension. More... | |
octave_idx_type | compute_index_unchecked (const Array< octave_idx_type > &ra_idx) const |
Size of the specified dimension. More... | |
T & | xelem (octave_idx_type n) |
Size of the specified dimension. More... | |
crefT | xelem (octave_idx_type n) const |
Size of the specified dimension. More... | |
T & | xelem (octave_idx_type i, octave_idx_type j) |
Size of the specified dimension. More... | |
crefT | xelem (octave_idx_type i, octave_idx_type j) const |
Size of the specified dimension. More... | |
T & | xelem (octave_idx_type i, octave_idx_type j, octave_idx_type k) |
Size of the specified dimension. More... | |
crefT | xelem (octave_idx_type i, octave_idx_type j, octave_idx_type k) const |
Size of the specified dimension. More... | |
T & | xelem (const Array< octave_idx_type > &ra_idx) |
Size of the specified dimension. More... | |
crefT | xelem (const Array< octave_idx_type > &ra_idx) const |
Size of the specified dimension. More... | |
T & | checkelem (octave_idx_type n) |
Size of the specified dimension. More... | |
T & | checkelem (octave_idx_type i, octave_idx_type j) |
Size of the specified dimension. More... | |
T & | checkelem (octave_idx_type i, octave_idx_type j, octave_idx_type k) |
Size of the specified dimension. More... | |
T & | checkelem (const Array< octave_idx_type > &ra_idx) |
Size of the specified dimension. More... | |
T & | elem (octave_idx_type n) |
Size of the specified dimension. More... | |
T & | elem (octave_idx_type i, octave_idx_type j) |
Size of the specified dimension. More... | |
T & | elem (octave_idx_type i, octave_idx_type j, octave_idx_type k) |
Size of the specified dimension. More... | |
T & | elem (const Array< octave_idx_type > &ra_idx) |
Size of the specified dimension. More... | |
T & | operator() (octave_idx_type n) |
Size of the specified dimension. More... | |
T & | operator() (octave_idx_type i, octave_idx_type j) |
Size of the specified dimension. More... | |
T & | operator() (octave_idx_type i, octave_idx_type j, octave_idx_type k) |
Size of the specified dimension. More... | |
T & | operator() (const Array< octave_idx_type > &ra_idx) |
Size of the specified dimension. More... | |
crefT | checkelem (octave_idx_type n) const |
Size of the specified dimension. More... | |
crefT | checkelem (octave_idx_type i, octave_idx_type j) const |
Size of the specified dimension. More... | |
crefT | checkelem (octave_idx_type i, octave_idx_type j, octave_idx_type k) const |
Size of the specified dimension. More... | |
crefT | checkelem (const Array< octave_idx_type > &ra_idx) const |
Size of the specified dimension. More... | |
crefT | elem (octave_idx_type n) const |
Size of the specified dimension. More... | |
crefT | elem (octave_idx_type i, octave_idx_type j) const |
Size of the specified dimension. More... | |
crefT | elem (octave_idx_type i, octave_idx_type j, octave_idx_type k) const |
Size of the specified dimension. More... | |
crefT | elem (const Array< octave_idx_type > &ra_idx) const |
Size of the specified dimension. More... | |
crefT | operator() (octave_idx_type n) const |
Size of the specified dimension. More... | |
crefT | operator() (octave_idx_type i, octave_idx_type j) const |
Size of the specified dimension. More... | |
crefT | operator() (octave_idx_type i, octave_idx_type j, octave_idx_type k) const |
Size of the specified dimension. More... | |
crefT | operator() (const Array< octave_idx_type > &ra_idx) const |
Size of the specified dimension. More... | |
Array< T, Alloc > | column (octave_idx_type k) const |
Extract column: A(:,k+1). More... | |
Array< T, Alloc > | page (octave_idx_type k) const |
Extract page: A(:,:,k+1). More... | |
Array< T, Alloc > | linear_slice (octave_idx_type lo, octave_idx_type up) const |
Extract a slice from this array as a column vector: A(:)(lo+1:up). More... | |
Array< T, Alloc > | reshape (octave_idx_type nr, octave_idx_type nc) const |
Size of the specified dimension. More... | |
Array< T, Alloc > | reshape (const dim_vector &new_dims) const |
Size of the specified dimension. More... | |
Array< T, Alloc > | permute (const Array< octave_idx_type > &vec, bool inv=false) const |
Size of the specified dimension. More... | |
Array< T, Alloc > | ipermute (const Array< octave_idx_type > &vec) const |
Size of the specified dimension. More... | |
bool | issquare () const |
Size of the specified dimension. More... | |
bool | isempty () const |
Size of the specified dimension. More... | |
bool | isvector () const |
Size of the specified dimension. More... | |
bool | is_nd_vector () const |
Size of the specified dimension. More... | |
Array< T, Alloc > | transpose () const |
Size of the specified dimension. More... | |
Array< T, Alloc > | hermitian (T(*fcn)(const T &)=nullptr) const |
Size of the specified dimension. More... | |
const T * | data () const |
Size of the specified dimension. More... | |
T * | fortran_vec () |
Size of the specified dimension. More... | |
bool | is_shared () const |
Size of the specified dimension. More... | |
int | ndims () const |
Size of the specified dimension. More... | |
Array< T, Alloc > | index (const octave::idx_vector &i) const |
Indexing without resizing. More... | |
Array< T, Alloc > | index (const octave::idx_vector &i, const octave::idx_vector &j) const |
Size of the specified dimension. More... | |
Array< T, Alloc > | index (const Array< octave::idx_vector > &ia) const |
Size of the specified dimension. More... | |
virtual T | resize_fill_value () const |
Size of the specified dimension. More... | |
void | resize2 (octave_idx_type nr, octave_idx_type nc, const T &rfv) |
Resizing (with fill). More... | |
void | resize2 (octave_idx_type nr, octave_idx_type nc) |
Size of the specified dimension. More... | |
void | resize1 (octave_idx_type n, const T &rfv) |
Size of the specified dimension. More... | |
void | resize1 (octave_idx_type n) |
Size of the specified dimension. More... | |
void | resize (const dim_vector &dv, const T &rfv) |
Size of the specified dimension. More... | |
void | resize (const dim_vector &dv) |
Size of the specified dimension. More... | |
Array< T, Alloc > | index (const octave::idx_vector &i, bool resize_ok, const T &rfv) const |
Indexing with possible resizing and fill. More... | |
Array< T, Alloc > | index (const octave::idx_vector &i, bool resize_ok) const |
Size of the specified dimension. More... | |
Array< T, Alloc > | index (const octave::idx_vector &i, const octave::idx_vector &j, bool resize_ok, const T &rfv) const |
Size of the specified dimension. More... | |
Array< T, Alloc > | index (const octave::idx_vector &i, const octave::idx_vector &j, bool resize_ok) const |
Size of the specified dimension. More... | |
Array< T, Alloc > | index (const Array< octave::idx_vector > &ia, bool resize_ok, const T &rfv) const |
Size of the specified dimension. More... | |
Array< T, Alloc > | index (const Array< octave::idx_vector > &ia, bool resize_ok) const |
Size of the specified dimension. More... | |
void | assign (const octave::idx_vector &i, const Array< T, Alloc > &rhs, const T &rfv) |
Indexed assignment (always with resize & fill). More... | |
void | assign (const octave::idx_vector &i, const Array< T, Alloc > &rhs) |
Size of the specified dimension. More... | |
void | assign (const octave::idx_vector &i, const octave::idx_vector &j, const Array< T, Alloc > &rhs, const T &rfv) |
Size of the specified dimension. More... | |
void | assign (const octave::idx_vector &i, const octave::idx_vector &j, const Array< T, Alloc > &rhs) |
Size of the specified dimension. More... | |
void | assign (const Array< octave::idx_vector > &ia, const Array< T, Alloc > &rhs, const T &rfv) |
Size of the specified dimension. More... | |
void | assign (const Array< octave::idx_vector > &ia, const Array< T, Alloc > &rhs) |
Size of the specified dimension. More... | |
void | delete_elements (const octave::idx_vector &i) |
Deleting elements. More... | |
void | delete_elements (int dim, const octave::idx_vector &i) |
A(:,...,I,...,:) = [] (>= 2 subscripts, one of them is non-colon) More... | |
void | delete_elements (const Array< octave::idx_vector > &ia) |
Dispatcher to the above two. More... | |
Array< T, Alloc > & | insert (const Array< T, Alloc > &a, const Array< octave_idx_type > &idx) |
Insert an array into another at a specified position. More... | |
Array< T, Alloc > & | insert (const Array< T, Alloc > &a, octave_idx_type r, octave_idx_type c) |
This is just a special case for idx = [r c 0 ...]. More... | |
void | maybe_economize () |
Size of the specified dimension. More... | |
void | print_info (std::ostream &os, const std::string &prefix) const |
Size of the specified dimension. More... | |
Array< T, Alloc > | sort (int dim=0, sortmode mode=ASCENDING) const |
Size of the specified dimension. More... | |
Array< T, Alloc > | sort (Array< octave_idx_type > &sidx, int dim=0, sortmode mode=ASCENDING) const |
Size of the specified dimension. More... | |
sortmode | issorted (sortmode mode=UNSORTED) const |
Ordering is auto-detected or can be specified. More... | |
Array< octave_idx_type > | sort_rows_idx (sortmode mode=ASCENDING) const |
Sort by rows returns only indices. More... | |
sortmode | is_sorted_rows (sortmode mode=UNSORTED) const |
Ordering is auto-detected or can be specified. More... | |
octave_idx_type | lookup (const T &value, sortmode mode=UNSORTED) const |
Do a binary lookup in a sorted array. More... | |
Array< octave_idx_type > | lookup (const Array< T, Alloc > &values, sortmode mode=UNSORTED) const |
Ditto, but for an array of values, specializing on the case when values are sorted. More... | |
octave_idx_type | nnz () const |
Count nonzero elements. More... | |
Array< octave_idx_type > | find (octave_idx_type n=-1, bool backward=false) const |
Find indices of (at most n) nonzero elements. More... | |
Array< T, Alloc > | nth_element (const octave::idx_vector &n, int dim=0) const |
Returns the n-th element in increasing order, using the same ordering as used for sort. More... | |
Array< T, Alloc > | diag (octave_idx_type k=0) const |
Get the kth super or subdiagonal. More... | |
Array< T, Alloc > | diag (octave_idx_type m, octave_idx_type n) const |
Size of the specified dimension. More... | |
template<typename U , typename F , typename A = std::allocator<U>> | |
Array< U, A > | map (F fcn) const |
Apply function fcn to each element of the Array<T, Alloc>. More... | |
template<typename U , typename A = std::allocator<U>> | |
Array< U, A > | map (U(&fcn)(T)) const |
Overloads for function references. More... | |
template<typename U , typename A = std::allocator<U>> | |
Array< U, A > | map (U(&fcn)(const T &)) const |
Size of the specified dimension. More... | |
template<typename F , bool zero> | |
bool | test (F fcn) const |
Generic any/all test functionality with arbitrary predicate. More... | |
template<typename F > | |
bool | test_any (F fcn) const |
Simpler calls. More... | |
template<typename F > | |
bool | test_all (F fcn) const |
Size of the specified dimension. More... | |
bool | test_any (bool(&fcn)(T)) const |
Overloads for function references. More... | |
bool | test_any (bool(&fcn)(const T &)) const |
Size of the specified dimension. More... | |
bool | test_all (bool(&fcn)(T)) const |
Size of the specified dimension. More... | |
bool | test_all (bool(&fcn)(const T &)) const |
Size of the specified dimension. More... | |
bool | optimize_dimensions (const dim_vector &dv) |
Returns true if this->dims () == dv, and if so, replaces this->m_dimensions by a shallow copy of dv. More... | |
static Array< T, Alloc > | cat (int dim, octave_idx_type n, const Array< T, Alloc > *array_list) |
Concatenation along a specified (0-based) dimension, equivalent to cat(). More... | |
N Dimensional Array with copy-on-write semantics.
The Array class is at the root of Octave. It provides a container with an arbitrary number of dimensions. The operator () provides access to individual elements via subscript and linear indexing. Indexing starts at 0. Arrays are column-major order as in Fortran.
To access the total number of elements in an Array, use numel() which is short for number of elements and is equivalent to the Octave function with same name.
The methods size() and length() as they exist in the STL cause confusion in the context of a N dimensional array.
The size() of an array is the length of all dimensions. In Octave, the size() function returns a row vector with the length of each dimension, or the size of a specific dimension. Only the latter is present in liboctave.
Since there is more than 1 dimension, length() would not make sense without expliciting which dimension. If the function existed, which length should it return? Octave length() function returns the length of the longest dimension which is an odd definition, only useful for vectors and square matrices. The alternatives numel(), rows(), columns(), and size(d) are more explicit and recommended.
Array::size_type is 'octave_idx_type' which is a typedef for 'int' or 'long int', depending whether Octave was configured for 64-bit indexing.
This is a signed integer which may cause problems when mixed with STL containers. The reason is that Octave interacts with Fortran routines, providing an interface many Fortran numeric libraries.
The following subclasses specializations, will be of most use:
typedef T Array< T, Alloc >::element_type |
typedef octave_idx_type Array< T, Alloc >::size_type |
typedef T Array< T, Alloc >::value_type |
|
inlineprotected |
slice constructor
Definition at line 260 of file Array.h.
References dim_vector::chop_trailing_singletons(), and Array< T, Alloc >::ArrayRep::m_count.
Empty ctor (0 by 0).
Definition at line 275 of file Array.h.
References Array< T, Alloc >::ArrayRep::m_count.
|
inlineexplicit |
nD uninitialized ctor.
Definition at line 283 of file Array.h.
References dim_vector::chop_trailing_singletons().
|
inlineexplicit |
nD initialized ctor.
Definition at line 292 of file Array.h.
References dim_vector::chop_trailing_singletons().
|
inlineexplicit |
Definition at line 308 of file Array.h.
References dim_vector::chop_trailing_singletons().
Array< T, Alloc >::Array | ( | const Array< T, Alloc > & | a, |
const dim_vector & | dv | ||
) |
Reshape constructor.
Definition at line 55 of file Array-base.cc.
References dim_vector::chop_trailing_singletons(), Array< T, Alloc >::ArrayRep::m_count, Array< T, Alloc >::m_dimensions, Array< T, Alloc >::m_rep, Array< T, Alloc >::numel(), dim_vector::safe_numel(), and dim_vector::str().
Array< T, Alloc >::Array | ( | const Container< T > & | a, |
const dim_vector & | dv | ||
) |
Constructor from standard library sequence containers.
Definition at line 957 of file Array.h.
References dim_vector::chop_trailing_singletons(), Array< T, Alloc >::m_dimensions, Array< T, Alloc >::m_slice_data, dim_vector::safe_numel(), dim_vector::str(), and x.
|
inline |
No type conversion case.
Definition at line 333 of file Array.h.
References Array< T, Alloc >::ArrayRep::m_count.
Definition at line 351 of file Array.h.
References Array< T, Alloc >::ArrayRep::m_count.
|
inline |
Return the array as a column vector.
Definition at line 420 of file Array.h.
References Array< T, Alloc >::m_dimensions, dim_vector::ndims(), and numel().
|
inline |
Return the array as a matrix.
Definition at line 442 of file Array.h.
References Array< T, Alloc >::m_dimensions, dim_vector::ndims(), and dim_vector::redim().
Return the array as a row vector.
Definition at line 431 of file Array.h.
References Array< T, Alloc >::m_dimensions, dim_vector::ndims(), and numel().
void Array< T, Alloc >::assign | ( | const Array< octave::idx_vector > & | ia, |
const Array< T, Alloc > & | rhs, | ||
const T & | rfv | ||
) |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 1279 of file Array-base.cc.
References dim_vector::alloc(), dim_vector::chop_all_singletons(), dim_vector::chop_trailing_singletons(), Array< T, Alloc >::data(), Array< T, Alloc >::dims(), err_nonconformant(), dim_vector::ndims(), Array< T, Alloc >::numel(), dim_vector::redim(), Array< T, Alloc >::reshape(), dim_vector::zero_by_zero(), and zero_dims_inquire().
|
inline |
void Array< T, Alloc >::assign | ( | const octave::idx_vector & | i, |
const Array< T, Alloc > & | rhs, | ||
const T & | rfv | ||
) |
Indexed assignment (always with resize & fill).
Definition at line 1128 of file Array-base.cc.
References Array< T, Alloc >::data(), Array< T, Alloc >::dims(), err_nonconformant(), n, Array< T, Alloc >::numel(), numel(), and Array< T, Alloc >::reshape().
Referenced by Cell::assign(), and cdef_object_array::subsasgn().
|
inline |
void Array< T, Alloc >::assign | ( | const octave::idx_vector & | i, |
const octave::idx_vector & | j, | ||
const Array< T, Alloc > & | rhs, | ||
const T & | rfv | ||
) |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 1175 of file Array-base.cc.
References dim_vector::chop_all_singletons(), Array< T, Alloc >::data(), Array< T, Alloc >::dim1(), Array< T, Alloc >::dim2(), Array< T, Alloc >::dims(), err_nonconformant(), n, dim_vector::ndims(), Array< T, Alloc >::numel(), numel(), r, dim_vector::redim(), Array< T, Alloc >::reshape(), dim_vector::zero_by_zero(), and zero_dims_inquire().
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 499 of file Array.h.
References numel().
Referenced by octave_cell::byte_size(), DiagArray2< T >::byte_size(), PermMatrix::byte_size(), and octave_perm_matrix::save_binary().
|
static |
Concatenation along a specified (0-based) dimension, equivalent to cat().
dim = -1 corresponds to dim = 0 and dim = -2 corresponds to dim = 1, but apply the looser matching rules of vertcat/horzcat.
Definition at line 2643 of file Array-base.cc.
References dim_vector::concat(), Array< T, Alloc >::dims(), dim_vector::hvcat(), max(), n, dim_vector::ndims(), and dim_vector::zero_by_zero().
T & Array< T, Alloc >::checkelem | ( | const Array< octave_idx_type > & | ra_idx | ) |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 241 of file Array-base.cc.
Array< T, Alloc >::crefT Array< T, Alloc >::checkelem | ( | const Array< octave_idx_type > & | ra_idx | ) | const |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 276 of file Array-base.cc.
T & Array< T, Alloc >::checkelem | ( | octave_idx_type | i, |
octave_idx_type | j | ||
) |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 227 of file Array-base.cc.
Array< T, Alloc >::crefT Array< T, Alloc >::checkelem | ( | octave_idx_type | i, |
octave_idx_type | j | ||
) | const |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 261 of file Array-base.cc.
T & Array< T, Alloc >::checkelem | ( | octave_idx_type | i, |
octave_idx_type | j, | ||
octave_idx_type | k | ||
) |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 234 of file Array-base.cc.
Array< T, Alloc >::crefT Array< T, Alloc >::checkelem | ( | octave_idx_type | i, |
octave_idx_type | j, | ||
octave_idx_type | k | ||
) | const |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 268 of file Array-base.cc.
T & Array< T, Alloc >::checkelem | ( | octave_idx_type | n | ) |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 214 of file Array-base.cc.
References err_invalid_index(), and n.
Referenced by type_info::lookup_assign_op(), type_info::lookup_assignany_op(), type_info::lookup_binary_class_op(), type_info::lookup_binary_op(), type_info::lookup_cat_op(), type_info::lookup_non_const_unary_op(), type_info::lookup_pref_assign_conv(), type_info::lookup_unary_class_op(), type_info::lookup_unary_op(), type_info::lookup_widening_op(), type_info::register_assign_op(), type_info::register_assignany_op(), type_info::register_cat_op(), type_info::register_non_const_unary_op(), type_info::register_pref_assign_conv(), type_info::register_unary_class_op(), type_info::register_unary_op(), and type_info::register_widening_op().
Array< T, Alloc >::crefT Array< T, Alloc >::checkelem | ( | octave_idx_type | n | ) | const |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 248 of file Array-base.cc.
References err_invalid_index(), and n.
Definition at line 109 of file Array-base.cc.
Referenced by octave_char_matrix_str::cellstr_value(), ComplexColumnVector::clear(), ComplexRowVector::clear(), ColumnVector::clear(), RowVector::clear(), FloatComplexColumnVector::clear(), FloatColumnVector::clear(), FloatComplexRowVector::clear(), FloatRowVector::clear(), octave_fields::equal_up_to_order(), Array< T, Alloc >::find(), linspace(), and octave_fields::orderfields().
void Array< T, Alloc >::clear | ( | const dim_vector & | dv | ) |
Definition at line 124 of file Array-base.cc.
References dim_vector::chop_trailing_singletons(), and dim_vector::safe_numel().
|
inline |
|
inline |
Definition at line 469 of file Array.h.
Referenced by ComplexMatrix::ComplexMatrix(), FloatComplexMatrix::FloatComplexMatrix(), FloatMatrix::FloatMatrix(), Matrix::Matrix(), airy(), FloatComplexMatrix::append(), FloatMatrix::append(), ComplexMatrix::append(), Matrix::append(), biry(), ComplexMatrix::column_max(), FloatComplexMatrix::column_max(), FloatMatrix::column_max(), ComplexMatrix::column_min(), FloatComplexMatrix::column_min(), FloatMatrix::column_min(), conj(), ComplexMatrix::determinant(), FloatComplexMatrix::determinant(), FloatMatrix::determinant(), ComplexMatrix::diag(), FloatComplexMatrix::diag(), FloatMatrix::diag(), elem_xpow(), ComplexMatrix::fill(), FloatComplexMatrix::fill(), FloatMatrix::fill(), ComplexMatrix::fourier(), FloatComplexMatrix::fourier(), FloatMatrix::fourier(), ComplexMatrix::fourier2d(), FloatComplexMatrix::fourier2d(), FloatMatrix::fourier2d(), Fperms(), ComplexMatrix::ifourier(), FloatComplexMatrix::ifourier(), FloatMatrix::ifourier(), ComplexMatrix::ifourier2d(), FloatComplexMatrix::ifourier2d(), FloatMatrix::ifourier2d(), FloatComplexMatrix::insert(), FloatMatrix::insert(), ComplexMatrix::insert(), qr< T >::insert_col(), FloatComplexMatrix::ishermitian(), FloatMatrix::issymmetric(), ComplexMatrix::lssolve(), FloatComplexMatrix::lssolve(), FloatMatrix::lssolve(), Matrix::lssolve(), matrix_real_probe(), ComplexMatrix::operator+=(), FloatComplexMatrix::operator+=(), FloatMatrix::operator+=(), ComplexMatrix::operator-=(), FloatComplexMatrix::operator-=(), FloatMatrix::operator-=(), boolMatrix::operator==(), charMatrix::operator==(), ComplexMatrix::operator==(), FloatComplexMatrix::operator==(), FloatMatrix::operator==(), Matrix::operator==(), ComplexMatrix::pseudo_inverse(), FloatComplexMatrix::pseudo_inverse(), FloatMatrix::pseudo_inverse(), ComplexMatrix::rcond(), FloatComplexMatrix::rcond(), FloatMatrix::rcond(), ComplexMatrix::row_max(), FloatComplexMatrix::row_max(), FloatMatrix::row_max(), ComplexMatrix::row_min(), FloatComplexMatrix::row_min(), FloatMatrix::row_min(), rsf2csf< ComplexMatrix, Matrix >(), rsf2csf< FloatComplexMatrix, FloatMatrix >(), octave_cell::save_ascii(), octave_char_matrix_str::save_ascii(), save_mat_binary_data(), FloatComplexMatrix::stack(), FloatMatrix::stack(), ComplexMatrix::stack(), Matrix::stack(), octave_bool_matrix::try_narrowing_conversion(), qr< T >::update(), xgemm(), and xpow().
Array< T, Alloc > Array< T, Alloc >::column | ( | octave_idx_type | k | ) | const |
|
inline |
Definition at line 471 of file Array.h.
Referenced by lu< T >::lu(), type_info::assign_ops_map(), type_info::assignany_ops_map(), type_info::binary_ops_map(), type_info::compound_binary_ops_map(), octave_complex_matrix::diag(), octave_float_complex_matrix::diag(), octave_float_matrix::diag(), octave_matrix::diag(), opengl_renderer::draw_patch(), opengl_renderer::draw_surface(), elem_xdiv(), F__delaunayn__(), octave::F__event_manager_file_dialog__(), F__pchip_deriv__(), F__voronoi__(), Faudiowrite(), Fconvhulln(), Array< T, Alloc >::index(), Array< T, Alloc >::insert(), max(), min(), type_info::non_const_unary_ops_map(), operator*(), ComplexMatrix::row_is_real_only(), FloatComplexMatrix::row_is_real_only(), graphics_object::set(), tree_evaluator::switch_case_label_matches(), type_info::unary_ops_map(), lu< T >::update(), and lu< T >::update_piv().
octave_idx_type Array< T, Alloc >::compute_index | ( | const Array< octave_idx_type > & | ra_idx | ) | const |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 207 of file Array-base.cc.
References compute_index(), and ra_idx.
octave_idx_type Array< T, Alloc >::compute_index | ( | octave_idx_type | i, |
octave_idx_type | j | ||
) | const |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 192 of file Array-base.cc.
References compute_index().
octave_idx_type Array< T, Alloc >::compute_index | ( | octave_idx_type | i, |
octave_idx_type | j, | ||
octave_idx_type | k | ||
) | const |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 199 of file Array-base.cc.
References compute_index().
|
inline |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 517 of file Array.h.
References dim_vector::compute_index(), octave_base_value::numel(), and ra_idx.
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 663 of file Array.h.
Referenced by Cell::Cell(), NDArray::NDArray(), octave_bool_matrix::as_mxArray(), octave_cell::as_mxArray(), octave_char_matrix::as_mxArray(), octave_complex_matrix::as_mxArray(), octave_float_complex_matrix::as_mxArray(), octave_float_matrix::as_mxArray(), ov_range< T >::as_mxArray(), octave_matrix::as_mxArray(), octave_struct::as_mxArray(), octave_scalar_struct::as_mxArray(), Array< T, Alloc >::assign(), binmap(), blkmm_internal(), DiagArray2< T >::data(), do_bsxfun_op(), do_mm_binary_op(), do_mx_check(), do_sm_binary_op(), opengl_renderer::draw_patch(), opengl_renderer::draw_surface(), F__native2unicode__(), F__pchip_deriv__(), F__unicode2native__(), F__unicode_length__(), Fbase64_encode(), Fellipj(), filter(), Fordschur(), ComplexMatrix::fourier(), FloatComplexMatrix::fourier(), FloatMatrix::fourier(), ComplexNDArray::fourier(), FloatComplexNDArray::fourier(), FloatNDArray::fourier(), ComplexMatrix::fourier2d(), FloatComplexMatrix::fourier2d(), FloatMatrix::fourier2d(), FloatNDArray::fourier2d(), ComplexNDArray::fourierNd(), FloatComplexNDArray::fourierNd(), FloatNDArray::fourierNd(), Fperms(), Funicode_idx(), MArray< T >::idx_add(), MArray< T >::idx_add_nd(), MArray< T >::idx_max(), ComplexMatrix::ifourier(), Matrix::ifourier(), FloatComplexMatrix::ifourier(), ComplexNDArray::ifourier(), FloatComplexNDArray::ifourier(), ComplexMatrix::ifourier2d(), ComplexNDArray::ifourier2d(), FloatComplexMatrix::ifourier2d(), FloatComplexNDArray::ifourier2d(), ComplexNDArray::ifourierNd(), FloatComplexNDArray::ifourierNd(), octave_char_matrix::index_vector(), qr< T >::insert_col(), octave_cell::mex_get_data(), octinternal_do_mul_pm_sm(), octinternal_do_mul_sm_pm(), operator*(), ComplexColumnVector::operator+=(), FloatComplexColumnVector::operator+=(), FloatComplexMatrix::operator+=(), FloatComplexRowVector::operator+=(), ComplexMatrix::operator+=(), ComplexRowVector::operator+=(), ComplexColumnVector::operator-=(), FloatComplexColumnVector::operator-=(), FloatComplexMatrix::operator-=(), FloatComplexRowVector::operator-=(), ComplexMatrix::operator-=(), ComplexRowVector::operator-=(), boolMatrix::operator==(), charMatrix::operator==(), ColumnVector::operator==(), ComplexColumnVector::operator==(), ComplexMatrix::operator==(), ComplexRowVector::operator==(), FloatColumnVector::operator==(), FloatComplexColumnVector::operator==(), FloatComplexMatrix::operator==(), FloatComplexRowVector::operator==(), FloatMatrix::operator==(), FloatRowVector::operator==(), Matrix::operator==(), RowVector::operator==(), ComplexMatrix::rcond(), FloatComplexMatrix::rcond(), FloatMatrix::rcond(), octave_char_matrix_str::save_ascii(), octave_bool_matrix::save_binary(), octave_perm_matrix::save_binary(), octave_bool_matrix::save_hdf5(), opengl_renderer::set_clipbox(), opengl_renderer::set_color(), lu< T >::update_piv(), stream::write(), and xgemm().
void Array< T, Alloc >::delete_elements | ( | const Array< octave::idx_vector > & | ia | ) |
Dispatcher to the above two.
Definition at line 1510 of file Array-base.cc.
References Array< T, Alloc >::numel().
void Array< T, Alloc >::delete_elements | ( | const octave::idx_vector & | i | ) |
Deleting elements.
A(I) = [] (with a single subscript)
Definition at line 1407 of file Array-base.cc.
References err_del_index_out_of_range(), Array< T, Alloc >::fortran_vec(), m, n, and numel().
Referenced by octave_map::delete_elements(), and Cell::delete_elements().
void Array< T, Alloc >::delete_elements | ( | int | dim, |
const octave::idx_vector & | i | ||
) |
A(:,...,I,...,:) = [] (>= 2 subscripts, one of them is non-colon)
Definition at line 1447 of file Array-base.cc.
References err_del_index_out_of_range(), Array< T, Alloc >::fortran_vec(), n, and dim_vector::resize().
Array< T, Alloc > Array< T, Alloc >::diag | ( | octave_idx_type | k = 0 | ) | const |
Get the kth super or subdiagonal.
The zeroth diagonal is the ordinary diagonal.
Definition at line 2541 of file Array-base.cc.
References d, and dim_vector::ndims().
Referenced by range< T, typename std::enable_if< std::is_floating_point< T >::value >::type >::diag(), Cell::diag(), boolMatrix::diag(), boolNDArray::diag(), and charNDArray::diag().
Array< T, Alloc > Array< T, Alloc >::diag | ( | octave_idx_type | m, |
octave_idx_type | n | ||
) | const |
|
inline |
Definition at line 456 of file Array.h.
Referenced by Array< T, Alloc >::assign().
|
inline |
Definition at line 467 of file Array.h.
Referenced by Array< T, Alloc >::assign(), and base_text_renderer::rotate_pixels().
|
inline |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 479 of file Array.h.
References dim_vector::ndims().
Referenced by base_text_renderer::rotate_pixels().
|
inline |
Return a const-reference so that dims ()(i) works efficiently.
Definition at line 503 of file Array.h.
Referenced by NDArray::NDArray(), airy(), Array< T, Alloc >::assign(), octave_map::assign(), binmap(), biry(), bitopxx(), Array< T, Alloc >::cat(), FloatNDArray::concat(), charNDArray::concat(), conv_to_int_array(), octave_map::delete_elements(), do_bsxfun_op(), do_mm_binary_op(), octave::do_simple_cellfun(), do_sm_binary_op(), opengl_renderer::draw_surface(), octave_char_matrix_str::edit_display(), elem_xdiv(), elem_xpow(), F__isprimelarge__(), octave::F__make_valid_name__(), Fcomplex(), Fellipj(), filter(), find_nonzero_elem_idx(), octave::Fis_same_file(), Fisa(), Fisfield(), ComplexNDArray::fourier(), FloatComplexNDArray::fourier(), FloatNDArray::fourier(), FloatComplexNDArray::fourier2d(), FloatNDArray::fourier2d(), ComplexNDArray::fourierNd(), FloatComplexNDArray::fourierNd(), FloatNDArray::fourierNd(), Fregexprep(), Frepelems(), Fstr2double(), Funicode_idx(), MArray< T >::idx_add_nd(), ComplexNDArray::ifourier(), FloatComplexNDArray::ifourier(), FloatNDArray::ifourier(), ComplexNDArray::ifourier2d(), FloatComplexNDArray::ifourier2d(), ComplexNDArray::ifourierNd(), FloatComplexNDArray::ifourierNd(), FloatNDArray::ifourierNd(), octave_map::index(), Array< T, Alloc >::insert(), ComplexNDArray::insert(), FloatComplexNDArray::insert(), Array< T, Alloc >::lookup(), octave_float_matrix::map(), octave_matrix::map(), map_2_xldexp(), cdef_object::map_value(), operator<<(), octave_map::permute(), octave_cell::print_raw(), octave_map::setfield(), sizes_cmp(), and cdef_object_array::subsasgn().
|
inline |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 574 of file Array.h.
References Array< T, Alloc >::elem(), and ra_idx.
|
inline |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 607 of file Array.h.
References ra_idx, and Array< T, Alloc >::xelem().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 562 of file Array.h.
References n.
Referenced by ComplexMatrix::ComplexMatrix(), FloatComplexMatrix::FloatComplexMatrix(), FloatMatrix::FloatMatrix(), Matrix::Matrix(), Sparse< T, Alloc >::Sparse(), ComplexNDArray::all_integers(), FloatComplexNDArray::all_integers(), FloatNDArray::all_integers(), aepbalance< MT >::balancing_matrix(), octave_complex_matrix::char_array_value(), octave_float_complex_matrix::char_array_value(), octave_float_matrix::char_array_value(), ov_range< T >::char_array_value(), octave_matrix::char_array_value(), ComplexMatrix::column_is_real_only(), FloatComplexMatrix::column_is_real_only(), ComplexMatrix::column_max(), Matrix::column_max(), FloatComplexMatrix::column_max(), FloatMatrix::column_max(), ComplexMatrix::column_min(), Matrix::column_min(), FloatComplexMatrix::column_min(), FloatMatrix::column_min(), NDArray::concat(), FloatNDArray::concat(), charNDArray::concat(), conj(), conv_to_int_array(), delete_graphics_objects(), ComplexMatrix::determinant(), FloatComplexMatrix::determinant(), FloatMatrix::determinant(), DiagArray2< T >::dgelem(), LSODE::do_integrate(), Array< T, Alloc >::elem(), DiagArray2< T >::elem(), elem_xdiv(), ComplexRowVector::extract(), FloatComplexRowVector::extract(), FloatRowVector::extract(), ComplexDiagMatrix::extract(), charMatrix::extract(), DiagMatrix::extract(), FloatComplexDiagMatrix::extract(), FloatDiagMatrix::extract(), ComplexColumnVector::extract(), FloatComplexColumnVector::extract(), FloatColumnVector::extract(), ComplexRowVector::extract_n(), FloatComplexRowVector::extract_n(), FloatRowVector::extract_n(), ComplexColumnVector::extract_n(), FloatComplexColumnVector::extract_n(), FloatColumnVector::extract_n(), DiagMatrix::fill(), ComplexDiagMatrix::fill(), FloatComplexDiagMatrix::fill(), FloatDiagMatrix::fill(), text::properties::get___fontsize_points__(), Givens(), ComplexColumnVector::insert(), ColumnVector::insert(), FloatComplexColumnVector::insert(), FloatColumnVector::insert(), FloatComplexMatrix::insert(), FloatComplexRowVector::insert(), FloatRowVector::insert(), FloatMatrix::insert(), ComplexMatrix::insert(), ComplexNDArray::insert(), FloatComplexNDArray::insert(), ComplexRowVector::insert(), RowVector::insert(), Matrix::insert(), DASPK::integrate(), DASSL::integrate(), FloatMatrix::issymmetric(), octave_bool_matrix::load_ascii(), octave_cell::load_ascii(), octave_cell::load_binary(), octave_bool_matrix::load_hdf5(), ComplexMatrix::lssolve(), FloatComplexMatrix::lssolve(), FloatMatrix::lssolve(), Matrix::lssolve(), matrix_real_probe(), SparseBoolMatrix::matrix_value(), ComplexColumnVector::max(), ComplexRowVector::max(), FloatComplexColumnVector::max(), FloatColumnVector::max(), FloatComplexRowVector::max(), FloatRowVector::max(), SparseMatrix::max(), ComplexColumnVector::min(), ComplexRowVector::min(), FloatComplexColumnVector::min(), FloatColumnVector::min(), FloatComplexRowVector::min(), FloatRowVector::min(), SparseMatrix::min(), boolMatrix::operator!(), intNDArray< T >::operator!(), operator*(), ComplexMatrix::operator+=(), FloatComplexMatrix::operator+=(), FloatMatrix::operator+=(), ComplexMatrix::operator-=(), FloatComplexMatrix::operator-=(), FloatMatrix::operator-=(), operator<<(), operator>>(), bp_table::parse_dbfunction_params(), Array< T, Alloc >::permute(), ComplexMatrix::pseudo_inverse(), Matrix::pseudo_inverse(), FloatComplexMatrix::pseudo_inverse(), FloatMatrix::pseudo_inverse(), ComplexMatrix::row_is_real_only(), FloatComplexMatrix::row_is_real_only(), ComplexMatrix::row_max(), Matrix::row_max(), FloatComplexMatrix::row_max(), FloatMatrix::row_max(), ComplexMatrix::row_min(), Matrix::row_min(), FloatComplexMatrix::row_min(), FloatMatrix::row_min(), octave_cell::save_ascii(), octave_cell::save_binary(), and octave_cell::save_hdf5().
|
inline |
Definition at line 95 of file Array-base.cc.
References numel().
Array< octave_idx_type > Array< T, Alloc >::find | ( | octave_idx_type | n = -1 , |
bool | backward = false |
||
) | const |
Find indices of (at most n) nonzero elements.
If n is specified, backward specifies search from backward.
Definition at line 2238 of file Array-base.cc.
References Array< T, Alloc >::clear(), Array< T, Alloc >::fortran_vec(), Array< T, Alloc >::isempty(), Array< T, Alloc >::m_dimensions, n, Array< T, Alloc >::numel(), numel(), and Array< T, Alloc >::resize2().
Referenced by find_nonzero_elem_idx().
Array< octave_idx_type > Array< octave::cdef_object >::find | ( | octave_idx_type | , |
bool | |||
) | const |
Definition at line 52 of file Array-tc.cc.
Array< octave_idx_type > Array< octave::idx_vector >::find | ( | octave_idx_type | , |
bool | |||
) | const |
Definition at line 43 of file Array-idx-vec.cc.
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 1764 of file Array-base.cc.
Referenced by lu< T >::lu(), sparse_lu< lu_type >::sparse_lu(), SparseBoolMatrix::any(), octave_uint64_matrix::array_value(), aepbalance< MT >::balancing_matrix(), base64_decode(), base64_decode_bytes(), binmap(), blkmm_internal(), octave_uint64_matrix::bool_array_value(), cam2xform(), octave_uint64_matrix::char_array_value(), idx_vector::complement(), octave_uint64_matrix::complex_array_value(), octave_uint64_matrix::complex_matrix_value(), Array< T, Alloc >::delete_elements(), ComplexMatrix::determinant(), Matrix::determinant(), FloatComplexMatrix::determinant(), FloatMatrix::determinant(), SparseComplexMatrix::determinant(), SparseMatrix::determinant(), do_bsxfun_op(), DefQuad::do_integrate(), IndefQuad::do_integrate(), FloatDefQuad::do_integrate(), FloatIndefQuad::do_integrate(), EigsComplexNonSymmetricMatrixShift(), EigsRealNonSymmetricMatrixShift(), EigsRealSymmetricMatrixShift(), octave_fields::equal_up_to_order(), F__glpk__(), F__icholt__(), F__iluc__(), F__ilutp__(), F__pchip_deriv__(), Famd(), Faudioread(), Fellipj(), filter(), Array< T, Alloc >::find(), octave_uint64_matrix::float_array_value(), octave_uint64_matrix::float_complex_array_value(), octave_uint64_matrix::float_complex_matrix_value(), octave_uint64_matrix::float_matrix_value(), DiagArray2< T >::fortran_vec(), ComplexMatrix::fourier(), Matrix::fourier(), FloatComplexMatrix::fourier(), FloatMatrix::fourier(), ComplexNDArray::fourier(), NDArray::fourier(), FloatComplexNDArray::fourier(), FloatNDArray::fourier(), ComplexMatrix::fourier2d(), Matrix::fourier2d(), NDArray::fourier2d(), FloatComplexMatrix::fourier2d(), FloatMatrix::fourier2d(), FloatNDArray::fourier2d(), ComplexNDArray::fourierNd(), NDArray::fourierNd(), FloatComplexNDArray::fourierNd(), FloatNDArray::fourierNd(), Frandperm(), opengl_renderer::get_pixels(), ichol_t(), MArray< T >::idx_add_nd(), ComplexMatrix::ifourier(), Matrix::ifourier(), FloatComplexMatrix::ifourier(), FloatMatrix::ifourier(), ComplexNDArray::ifourier(), FloatComplexNDArray::ifourier(), FloatNDArray::ifourier(), ComplexMatrix::ifourier2d(), ComplexNDArray::ifourier2d(), Matrix::ifourier2d(), NDArray::ifourier2d(), FloatComplexMatrix::ifourier2d(), FloatComplexNDArray::ifourier2d(), FloatMatrix::ifourier2d(), ComplexNDArray::ifourierNd(), NDArray::ifourierNd(), FloatComplexNDArray::ifourierNd(), FloatNDArray::ifourierNd(), ilu_crout(), ilu_tp(), CollocWt::init(), qr< T >::insert_col(), qr< T >::insert_row(), octave_char_matrix_str::load_ascii(), octave_char_matrix_str::load_binary(), ComplexMatrix::lssolve(), FloatComplexMatrix::lssolve(), FloatMatrix::lssolve(), Matrix::lssolve(), Array< T, Alloc >::map(), octave_uint64_matrix::matrix_value(), operator*(), ComplexColumnVector::operator+=(), FloatComplexColumnVector::operator+=(), FloatComplexMatrix::operator+=(), FloatComplexRowVector::operator+=(), ComplexMatrix::operator+=(), ComplexRowVector::operator+=(), ComplexColumnVector::operator-=(), FloatComplexColumnVector::operator-=(), FloatComplexMatrix::operator-=(), FloatComplexRowVector::operator-=(), ComplexMatrix::operator-=(), ComplexRowVector::operator-=(), ComplexMatrix::rcond(), Matrix::rcond(), FloatComplexMatrix::rcond(), FloatMatrix::rcond(), read_mat_binary_data(), Array< T, Alloc >::resize(), Array< T, Alloc >::resize2(), log_scaler::scale(), neg_log_scaler::scale(), Array< T, Alloc >::sort(), string_vector::sort(), Array< T, Alloc >::sort_rows_idx(), SparseBoolMatrix::sum(), Sylvester(), Array< T, Alloc >::transpose(), lu< T >::update(), qr< T >::update(), lu< T >::update_piv(), and xgemm().
Array< T, Alloc > Array< T, Alloc >::hermitian | ( | T(*)(const T &) | fcn = nullptr | ) | const |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 1666 of file Array-base.cc.
References Array< T, Alloc >::xelem().
Referenced by MArray< T >::hermitian().
Array< T, Alloc > Array< T, Alloc >::index | ( | const Array< octave::idx_vector > & | ia | ) | const |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 835 of file Array-base.cc.
References Array< T, Alloc >::numel().
Array< T, Alloc > Array< T, Alloc >::index | ( | const Array< octave::idx_vector > & | ia, |
bool | resize_ok, | ||
const T & | rfv | ||
) | const |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 1097 of file Array-base.cc.
References dim_vector::alloc(), Array< T, Alloc >::index(), Array< T, Alloc >::m_dimensions, Array< T, Alloc >::numel(), dim_vector::redim(), and Array< T, Alloc >::resize().
Array< T, Alloc > Array< T, Alloc >::index | ( | const octave::idx_vector & | i | ) | const |
Indexing without resizing.
Definition at line 710 of file Array-base.cc.
Referenced by ComplexMatrix::column(), FloatComplexMatrix::column(), FloatMatrix::column(), octave_char_matrix_str::do_index_op_internal(), ComplexMatrix::extract(), FloatComplexMatrix::extract(), FloatMatrix::extract(), ComplexMatrix::extract_n(), FloatComplexMatrix::extract_n(), FloatMatrix::extract_n(), find_nonzero_elem_idx(), Array< T, Alloc >::index(), octave_map::index(), Cell::index(), operator*(), base_text_renderer::rotate_pixels(), ComplexMatrix::row(), FloatComplexMatrix::row(), FloatMatrix::row(), cdef_object_array::subsasgn(), and cdef_object_array::subsref().
|
inline |
Array< T, Alloc > Array< T, Alloc >::index | ( | const octave::idx_vector & | i, |
bool | resize_ok, | ||
const T & | rfv | ||
) | const |
Indexing with possible resizing and fill.
Definition at line 1045 of file Array-base.cc.
References Array< T, Alloc >::index(), n, Array< T, Alloc >::numel(), numel(), and Array< T, Alloc >::resize1().
Array< T, Alloc > Array< T, Alloc >::index | ( | const octave::idx_vector & | i, |
const octave::idx_vector & | j | ||
) | const |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 777 of file Array-base.cc.
References r, and dim_vector::redim().
|
inline |
Array< T, Alloc > Array< T, Alloc >::index | ( | const octave::idx_vector & | i, |
const octave::idx_vector & | j, | ||
bool | resize_ok, | ||
const T & | rfv | ||
) | const |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 1069 of file Array-base.cc.
References Array< T, Alloc >::columns(), Array< T, Alloc >::index(), r, dim_vector::redim(), Array< T, Alloc >::resize2(), and Array< T, Alloc >::rows().
Array< T, Alloc > & Array< T, Alloc >::insert | ( | const Array< T, Alloc > & | a, |
const Array< octave_idx_type > & | idx | ||
) |
Insert an array into another at a specified position.
If size (a) is [d1 d2 ... dN] and idx is [i1 i2 ... iN], this method is equivalent to x(i1:i1+d1-1, i2:i2+d2-1, ... , iN:iN+dN-1) = a.
Definition at line 1608 of file Array-base.cc.
References Array< T, Alloc >::dims(), n, octave_base_value::numel(), ra_idx, and dim_vector::redim().
Referenced by intNDArray< octave_uint8 >::increment_index(), boolMatrix::insert(), boolNDArray::insert(), Cell::insert(), charMatrix::insert(), charNDArray::insert(), ComplexNDArray::insert(), FloatComplexMatrix::insert(), FloatComplexNDArray::insert(), FloatNDArray::insert(), intNDArray< T >::insert(), Matrix::insert(), NDArray::insert(), and bp_table::parse_dbfunction_params().
Array< T, Alloc > & Array< T, Alloc >::insert | ( | const Array< T, Alloc > & | a, |
octave_idx_type | r, | ||
octave_idx_type | c | ||
) |
This is just a special case for idx = [r c 0 ...].
Definition at line 1587 of file Array-base.cc.
References Array< T, Alloc >::columns(), Array< T, Alloc >::m_dimensions, Array< T, Alloc >::ndims(), r, and Array< T, Alloc >::rows().
|
inline |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 645 of file Array.h.
Referenced by MArray< T >::ipermute().
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 657 of file Array.h.
References dim_vector::is_nd_vector().
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 668 of file Array.h.
References Array< T, Alloc >::ArrayRep::m_count.
Referenced by mx_el_or_assign(), operator*=(), operator+=(), operator-=(), operator/=(), product_eq(), and quotient_eq().
sortmode Array< T, Alloc >::is_sorted_rows | ( | sortmode | mode = UNSORTED | ) | const |
Ordering is auto-detected or can be specified.
Definition at line 2097 of file Array-base.cc.
References ASCENDING, r, safe_comparator(), and UNSORTED.
Referenced by octave_cell::is_sorted_rows().
Definition at line 52 of file Array-tc.cc.
sortmode Array< octave::idx_vector >::is_sorted_rows | ( | sortmode | ) | const |
Definition at line 43 of file Array-idx-vec.cc.
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 651 of file Array.h.
References numel().
Referenced by NDArray::concat(), FloatNDArray::concat(), charNDArray::concat(), bp_table::dbstop_process_map_args(), do_bsxfun_op(), do_minmax_red_op< boolNDArray >(), opengl_renderer::draw_patch(), opengl_renderer::draw_scatter(), opengl_renderer::draw_surface(), opengl_renderer::draw_text_background(), EigsComplexNonSymmetricMatrix(), EigsComplexNonSymmetricMatrixShift(), EigsRealNonSymmetricFunc(), EigsRealNonSymmetricMatrix(), EigsRealNonSymmetricMatrixShift(), EigsRealSymmetricFunc(), EigsRealSymmetricMatrix(), EigsRealSymmetricMatrixShift(), Array< T, Alloc >::find(), find_nonzero_elem_idx(), axes::properties::get_boundingbox(), uicontrol::properties::get_boundingbox(), uibuttongroup::properties::get_boundingbox(), uipanel::properties::get_boundingbox(), uitable::properties::get_boundingbox(), scatter::initialize(), octave_bool_matrix::load_ascii(), octave_char_matrix_str::load_ascii(), octave_print_internal(), opengl_renderer::set_color(), and octave_cell::short_disp().
Definition at line 101 of file Array-f.cc.
References ASCENDING, DESCENDING, isnan(), n, numel(), r, and UNSORTED.
sortmode Array< T, Alloc >::issorted | ( | sortmode | mode = UNSORTED | ) | const |
Ordering is auto-detected or can be specified.
Definition at line 2047 of file Array-base.cc.
References ASCENDING, n, numel(), safe_comparator(), and UNSORTED.
Referenced by F__ode15__(), and octave_cell::issorted().
Definition at line 52 of file Array-tc.cc.
sortmode Array< octave::idx_vector >::issorted | ( | sortmode | ) | const |
Definition at line 43 of file Array-idx-vec.cc.
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 648 of file Array.h.
Referenced by conj(), FloatComplexMatrix::ishermitian(), and FloatMatrix::issymmetric().
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 654 of file Array.h.
References dim_vector::isvector().
Referenced by Ffilter(), and sizes_cmp().
Array< T, Alloc > Array< T, Alloc >::linear_slice | ( | octave_idx_type | lo, |
octave_idx_type | up | ||
) | const |
Extract a slice from this array as a column vector: A(:)(lo+1:up).
Must be 0 <= lo && up <= numel. May be up < lo.
Definition at line 303 of file Array-base.cc.
Array< octave_idx_type > Array< octave::cdef_object >::lookup | ( | const Array< octave::cdef_object > & | , |
sortmode | |||
) | const |
Definition at line 52 of file Array-tc.cc.
Array< octave_idx_type > Array< octave::idx_vector >::lookup | ( | const Array< octave::idx_vector > & | , |
sortmode | |||
) | const |
Definition at line 43 of file Array-idx-vec.cc.
Array< octave_idx_type > Array< T, Alloc >::lookup | ( | const Array< T, Alloc > & | values, |
sortmode | mode = UNSORTED |
||
) | const |
Ditto, but for an array of values, specializing on the case when values are sorted.
NaNs get the value N.
Definition at line 2179 of file Array-base.cc.
References octave_sort< T >::descending_compare(), Array< T, Alloc >::dims(), n, Array< T, Alloc >::numel(), numel(), and UNSORTED.
octave_idx_type Array< T, Alloc >::lookup | ( | const T & | value, |
sortmode | mode = UNSORTED |
||
) | const |
Do a binary lookup in a sorted array.
Must not contain NaNs. Mode can be specified or is auto-detected by comparing 1st and last element.
Definition at line 2158 of file Array-base.cc.
References octave_sort< T >::descending_compare(), n, numel(), and UNSORTED.
octave_idx_type Array< octave::cdef_object >::lookup | ( | octave::cdef_object const & | , |
sortmode | |||
) | const |
Definition at line 52 of file Array-tc.cc.
octave_idx_type Array< octave::idx_vector >::lookup | ( | octave::idx_vector const & | , |
sortmode | |||
) | const |
Definition at line 43 of file Array-idx-vec.cc.
Definition at line 216 of file Array.h.
References r.
Referenced by ComplexColumnVector::fill(), ComplexMatrix::fill(), ComplexRowVector::fill(), FloatComplexColumnVector::fill(), FloatComplexMatrix::fill(), FloatComplexRowVector::fill(), FloatMatrix::fill(), FloatRowVector::fill(), FloatColumnVector::fill(), ComplexColumnVector::insert(), FloatComplexColumnVector::insert(), FloatColumnVector::insert(), FloatComplexMatrix::insert(), FloatComplexRowVector::insert(), FloatRowVector::insert(), FloatMatrix::insert(), ComplexMatrix::insert(), ComplexRowVector::insert(), and octave_cell::subsasgn().
|
inline |
Apply function fcn to each element of the Array<T, Alloc>.
This function is optimized with a manually unrolled loop.
Definition at line 859 of file Array.h.
References Array< T, Alloc >::fortran_vec(), len, m, and numel().
Referenced by octave_complex_diag_matrix::map(), octave_float_complex_diag_matrix::map(), octave_float_diag_matrix::map(), octave_diag_matrix::map(), ComplexDiagMatrix::rcond(), DiagMatrix::rcond(), FloatComplexDiagMatrix::rcond(), and FloatDiagMatrix::rcond().
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 789 of file Array.h.
References Array< T, Alloc >::ArrayRep::m_count, Array< T, Alloc >::ArrayRep::m_data, and Array< T, Alloc >::ArrayRep::m_len.
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 671 of file Array.h.
References dim_vector::ndims().
Referenced by octave_char_matrix_str::cellstr_value(), octave_complex_matrix::diag(), octave_float_complex_matrix::diag(), octave_float_matrix::diag(), octave_matrix::diag(), do_bsxfun_op(), F__unicode_length__(), Frepelems(), Funicode_idx(), MArray< T >::idx_add_nd(), Array< T, Alloc >::insert(), octave_print_internal(), octave_cell::print_raw(), octave_char_matrix_str::short_disp(), octave_char_matrix_str::string_value(), octave_char_matrix_str::string_vector_value(), and octave_bool_matrix::try_narrowing_conversion().
octave_idx_type Array< octave::cdef_object >::nnz | ( | ) | const |
Definition at line 52 of file Array-tc.cc.
octave_idx_type Array< octave::idx_vector >::nnz | ( | ) | const |
Definition at line 43 of file Array-idx-vec.cc.
octave_idx_type Array< T, Alloc >::nnz |
Count nonzero elements.
Definition at line 2223 of file Array-base.cc.
References numel().
Referenced by idx_vector::idx_vector().
Array< octave::cdef_object > Array< octave::cdef_object >::nth_element | ( | const octave::idx_vector & | , |
int | |||
) | const |
Definition at line 52 of file Array-tc.cc.
Array< octave::idx_vector > Array< octave::idx_vector >::nth_element | ( | const octave::idx_vector & | , |
int | |||
) | const |
Definition at line 43 of file Array-idx-vec.cc.
Array< T, Alloc > Array< T, Alloc >::nth_element | ( | const octave::idx_vector & | n, |
int | dim = 0 |
||
) | const |
Returns the n-th element in increasing order, using the same ordering as used for sort.
n can either be a scalar index or a contiguous range.
Definition at line 2319 of file Array-base.cc.
Referenced by Fnth_element().
|
inline |
Number of elements in the array.
Definition at line 414 of file Array.h.
Referenced by Array< octave_value * >::Array(), Array< T, Alloc >::Array(), Cell::Cell(), ComplexMatrix::ComplexMatrix(), ComplexNDArray::ComplexNDArray(), DiagArray2< T >::DiagArray2(), FloatComplexMatrix::FloatComplexMatrix(), FloatComplexNDArray::FloatComplexNDArray(), FloatNDArray::FloatNDArray(), idx_vector::idx_vector(), NDArray::NDArray(), octave_value_list::octave_value_list(), Sparse< T, Alloc >::Sparse(), sparse_lu< lu_type >::sparse_lu(), string_array_property::string_array_property(), text_label_property::text_label_property(), ComplexNDArray::all_integers(), FloatComplexNDArray::all_integers(), FloatNDArray::all_integers(), all_ones(), any_ones(), FloatComplexMatrix::append(), FloatComplexRowVector::append(), FloatMatrix::append(), FloatRowVector::append(), ComplexMatrix::append(), ComplexRowVector::append(), Matrix::append(), RowVector::append(), octave_value_list::array_value(), Array< T, Alloc >::assign(), binmap(), bitopxx(), octave_cell::break_closure_cycles(), octave_class::break_closure_cycles(), octave_struct::break_closure_cycles(), calc_dimensions(), PermMatrix::checkelem(), gh_manager::close_all_figures(), boolNDArray::concat(), charNDArray::concat(), ComplexNDArray::concat(), FloatComplexNDArray::concat(), FloatNDArray::concat(), intNDArray< T >::concat(), NDArray::concat(), concat(), conv_to_int_array(), tree_evaluator::convert_return_list_to_const_vector(), bp_table::dbstop_process_map_args(), qr< T >::delete_col(), Array< T, Alloc >::delete_elements(), delete_graphics_objects(), DiagArray2< T >::diag_length(), PermMatrix::dim1(), PermMatrix::dim2(), do_bitpack(), do_bsxfun_op(), LSODE::do_integrate(), DefQuad::do_integrate(), FloatDefQuad::do_integrate(), do_minmax_bin_op< charNDArray >(), do_mx_check(), text_label_property::do_set(), children_property::do_set(), octave::do_simple_cellfun(), chol< T >::downdate(), opengl_renderer::draw(), opengl_renderer::draw_line(), opengl_renderer::draw_marker(), opengl_renderer::draw_patch(), opengl_renderer::draw_scatter(), opengl_renderer::draw_text(), EigsComplexNonSymmetricMatrix(), EigsComplexNonSymmetricMatrixShift(), EigsRealNonSymmetricFunc(), EigsRealNonSymmetricMatrix(), EigsRealNonSymmetricMatrixShift(), EigsRealSymmetricFunc(), EigsRealSymmetricMatrix(), EigsRealSymmetricMatrixShift(), elem_xdiv(), elem_xpow(), octave_fields::equal_up_to_order(), F__base64_decode_bytes__(), octave::F__event_manager_input_dialog__(), octave::F__event_manager_list_dialog__(), F__get__(), F__glpk__(), F__go_delete__(), F__go_execute_callback__(), F__go_post_callback__(), F__isprimelarge__(), octave::F__make_valid_name__(), F__native2unicode__(), F__ode15__(), F__pchip_deriv__(), F__unicode2native__(), F__unicode_length__(), Fbase64_decode(), Fbase64_encode(), Fccolamd(), Fcellslices(), Fcolamd(), Fcomplex(), Fcsymamd(), Fdrawnow(), Fellipj(), Ffilter(), Fget(), ComplexDiagMatrix::fill(), DiagMatrix::fill(), FloatComplexDiagMatrix::fill(), FloatDiagMatrix::fill(), ComplexColumnVector::fill(), ComplexRowVector::fill(), FloatComplexColumnVector::fill(), FloatColumnVector::fill(), FloatComplexRowVector::fill(), FloatRowVector::fill(), filter(), Array< T, Alloc >::find(), find_nonzero_elem_idx(), octave::Fis_same_file(), Fisa(), Fiscolumn(), Fisfield(), Fismatrix(), Fisrow(), Fisscalar(), Fissquare(), Fisvector(), Flu(), Fmatrix_type(), Fndims(), Fordschur(), ComplexNDArray::fourier(), FloatComplexNDArray::fourier(), FloatNDArray::fourier(), FloatNDArray::fourier2d(), Fpow2(), Fquadcc(), Fregexprep(), Frepelems(), Freset(), Freshape(), Fresize(), Frmfield(), Fset(), Fsize(), Fspparms(), Fstr2double(), Fsymamd(), Funicode_idx(), octave::Furlread(), octave::Furlwrite(), cdef_object_scalar::get(), get_children_limits(), base_properties::get_children_of_type(), octave::get_dimensions(), get_scalar_idx(), get_sort_mode(), MArray< T >::idx_add(), MArray< T >::idx_max(), ComplexNDArray::ifourier(), FloatComplexNDArray::ifourier(), FloatNDArray::ifourier(), ComplexNDArray::ifourier2d(), FloatComplexNDArray::ifourier2d(), Array< T, Alloc >::index(), opengl_renderer::init_gl_context(), ODES::initialize(), base_diff_alg_eqn::initialize(), ComplexColumnVector::insert(), ColumnVector::insert(), FloatComplexColumnVector::insert(), FloatColumnVector::insert(), FloatComplexRowVector::insert(), FloatRowVector::insert(), FloatComplexMatrix::insert(), FloatMatrix::insert(), ComplexNDArray::insert(), FloatComplexNDArray::insert(), ComplexRowVector::insert(), RowVector::insert(), ComplexMatrix::insert(), Matrix::insert(), qr< T >::insert_col(), qr< T >::insert_row(), chol< T >::insert_sym(), DASRT::integrate(), DASPK::integrate(), DASSL::integrate(), sparse_chol< chol_type >::inverse(), is_superclass(), DiagArray2< T >::length(), linspace(), octave_bool_matrix::load_ascii(), Array< T, Alloc >::lookup(), lookup_classes(), Matrix::lssolve(), ComplexMatrix::lssolve(), FloatMatrix::lssolve(), FloatComplexMatrix::lssolve(), error_system::make_stack_frame_list(), map_2_xldexp(), cdef_object::map_value(), ComplexColumnVector::max(), ComplexRowVector::max(), FloatComplexColumnVector::max(), FloatColumnVector::max(), FloatComplexRowVector::max(), FloatRowVector::max(), ComplexColumnVector::min(), ComplexRowVector::min(), FloatComplexColumnVector::min(), FloatColumnVector::min(), FloatComplexRowVector::min(), FloatRowVector::min(), numel(), octave_class::numeric_conv(), operator*(), ComplexColumnVector::operator+=(), FloatComplexColumnVector::operator+=(), FloatComplexMatrix::operator+=(), FloatComplexRowVector::operator+=(), ComplexMatrix::operator+=(), ComplexRowVector::operator+=(), ComplexColumnVector::operator-=(), FloatComplexColumnVector::operator-=(), FloatComplexMatrix::operator-=(), FloatComplexRowVector::operator-=(), ComplexMatrix::operator-=(), ComplexRowVector::operator-=(), operator<<(), ColumnVector::operator==(), ComplexColumnVector::operator==(), ComplexMatrix::operator==(), ComplexRowVector::operator==(), FloatColumnVector::operator==(), FloatComplexColumnVector::operator==(), FloatComplexMatrix::operator==(), FloatComplexRowVector::operator==(), FloatMatrix::operator==(), FloatRowVector::operator==(), RowVector::operator==(), operator>>(), bp_table::parse_dbfunction_params(), PermMatrix::perm_length(), octave_base_diag< DMT, MT >::permute(), Array< T, Alloc >::permute(), Sparse< T, Alloc >::permute(), ComplexMatrix::pseudo_inverse(), Matrix::pseudo_inverse(), FloatComplexMatrix::pseudo_inverse(), FloatMatrix::pseudo_inverse(), octave::read_images(), read_mat5_binary_file_header(), type_info::register_type(), figure::properties::remove_child(), opengl_renderer::render_grid(), opengl_renderer::render_tickmarks(), opengl_renderer::render_ticktexts(), safe_comparator(), octave_perm_matrix::save_ascii(), octave_bool_matrix::save_binary(), graphics_object::set(), uitable::properties::set_columnformat(), uitable::properties::set_columnwidth(), figure::properties::set_integerhandle(), uicontrol::properties::set_style(), octave_cell::simple_subsref(), sizes_cmp(), ComplexColumnVector::stack(), ColumnVector::stack(), FloatComplexColumnVector::stack(), FloatColumnVector::stack(), FloatComplexMatrix::stack(), FloatMatrix::stack(), ComplexMatrix::stack(), Matrix::stack(), sub2ind(), cdef_object_array::subsasgn(), octave_cell::subsasgn(), octave_struct::subsref(), octave_cell::subsref(), octave_class::subsref(), cdef_object_array::subsref(), PermMatrix::transpose(), octave_complex_matrix::try_narrowing_conversion(), octave_float_complex_matrix::try_narrowing_conversion(), octave_float_matrix::try_narrowing_conversion(), octave_matrix::try_narrowing_conversion(), chol< T >::update(), lu< T >::update(), qr< T >::update(), base_properties::update_boundingbox(), lu< T >::update_piv(), vector_norm(), tree_evaluator::visit_complex_for_command(), stream::write(), and zero_dims_inquire().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 379 of file Array.h.
References Array< T, Alloc >::ArrayRep::m_count.
|
inline |
Definition at line 361 of file Array.h.
References Array< T, Alloc >::ArrayRep::m_count, Array< T, Alloc >::m_dimensions, Array< T, Alloc >::m_rep, Array< T, Alloc >::m_slice_data, and Array< T, Alloc >::m_slice_len.
Referenced by boolNDArray::operator=(), charNDArray::operator=(), DiagArray2< T >::operator=(), and MArray< T >::operator=().
bool Array< T, Alloc >::optimize_dimensions | ( | const dim_vector & | dv | ) |
Returns true if this->dims () == dv, and if so, replaces this->m_dimensions by a shallow copy of dv.
This is useful for maintaining several arrays with supposedly equal dimensions (e.g. structs in the interpreter).
Definition at line 2764 of file Array-base.cc.
Array< T, Alloc > Array< T, Alloc >::page | ( | octave_idx_type | k | ) | const |
|
inline |
Array< T, Alloc > Array< T, Alloc >::permute | ( | const Array< octave_idx_type > & | vec, |
bool | inv = false |
||
) | const |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 450 of file Array-base.cc.
References dim_vector::alloc(), Array< T, Alloc >::elem(), dim_vector::ndims(), Array< T, Alloc >::numel(), OCTAVE_LOCAL_BUFFER_INIT, and dim_vector::resize().
Referenced by F__unicode_length__(), Funicode_idx(), octave_map::permute(), and MArray< T >::permute().
void Array< T, Alloc >::print_info | ( | std::ostream & | os, |
const std::string & | prefix | ||
) | const |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 2747 of file Array-base.cc.
Referenced by DiagArray2< T >::print_info(), and PermMatrix::print_info().
|
inline |
|
inline |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 635 of file Array.h.
Referenced by Array< T, Alloc >::assign(), Fbase64_decode(), range< T, typename std::enable_if< std::is_floating_point< T >::value >::type >::index(), octave_map::reshape(), Cell::reshape(), and MArray< T >::reshape().
|
inline |
void Array< T, Alloc >::resize | ( | const dim_vector & | dv, |
const T & | rfv | ||
) |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 1023 of file Array-base.cc.
References dim_vector::any_neg(), err_invalid_resize(), Array< T, Alloc >::fortran_vec(), dim_vector::ndims(), and dim_vector::redim().
Referenced by DiagArray2< T >::DiagArray2(), sparse_lu< lu_type >::sparse_lu(), octave_value_list::array_value(), base64_decode(), base64_decode_bytes(), bitopxx(), Cell::column(), ComplexMatrix::column_max(), Matrix::column_max(), FloatComplexMatrix::column_max(), FloatMatrix::column_max(), ComplexMatrix::column_min(), Matrix::column_min(), FloatComplexMatrix::column_min(), FloatMatrix::column_min(), DASPK::do_integrate(), DASSL::do_integrate(), tree_cell::evaluate(), F__glpk__(), Ffilter(), filter(), find_nonzero_elem_idx(), Frandperm(), Fsize(), get_ra_idx(), ichol_t(), MArray< T >::idx_add_nd(), ilu_crout(), Array< T, Alloc >::index(), octave_bool_matrix::load_hdf5(), octave_cell::load_hdf5(), octave_complex_matrix::load_hdf5(), octave_float_complex_matrix::load_hdf5(), octave_float_matrix::load_hdf5(), octave_matrix::load_hdf5(), octave_char_matrix_str::load_hdf5(), ComplexMatrix::lssolve(), FloatComplexMatrix::lssolve(), FloatMatrix::lssolve(), Matrix::lssolve(), SparseComplexMatrix::max(), SparseMatrix::max(), SparseComplexMatrix::min(), SparseMatrix::min(), type_info::register_type(), octave_map::resize(), ov_range< T >::resize(), octave_char_matrix_str::resize(), octave_char_matrix_sq_str::resize(), ComplexColumnVector::resize(), ComplexRowVector::resize(), ColumnVector::resize(), RowVector::resize(), FloatColumnVector::resize(), FloatRowVector::resize(), FloatComplexColumnVector::resize(), FloatComplexRowVector::resize(), DiagArray2< T >::resize(), boolMatrix::resize(), charMatrix::resize(), ComplexMatrix::row_max(), Matrix::row_max(), FloatComplexMatrix::row_max(), FloatMatrix::row_max(), ComplexMatrix::row_min(), Matrix::row_min(), FloatComplexMatrix::row_min(), FloatMatrix::row_min(), and octave_base_scalar< ST >::sort().
|
inline |
void Array< T, Alloc >::resize1 | ( | octave_idx_type | n, |
const T & | rfv | ||
) |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 910 of file Array-base.cc.
References err_invalid_resize(), n, and numel().
Referenced by Array< T, Alloc >::index().
|
inline |
void Array< T, Alloc >::resize2 | ( | octave_idx_type | nr, |
octave_idx_type | nc, | ||
const T & | rfv | ||
) |
Resizing (with fill).
Definition at line 981 of file Array-base.cc.
References err_invalid_resize(), Array< T, Alloc >::fortran_vec(), min(), and r.
Referenced by Array< T, Alloc >::find(), and Array< T, Alloc >::index().
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Reimplemented in Cell.
Definition at line 899 of file Array-base.cc.
|
inline |
Definition at line 459 of file Array.h.
Referenced by ComplexMatrix::ComplexMatrix(), FloatComplexMatrix::FloatComplexMatrix(), FloatMatrix::FloatMatrix(), lu< T >::lu(), Matrix::Matrix(), airy(), FloatComplexMatrix::append(), FloatMatrix::append(), ComplexMatrix::append(), Matrix::append(), biry(), octave_char_matrix_str::cellstr_value(), ComplexMatrix::column_is_real_only(), FloatComplexMatrix::column_is_real_only(), ComplexMatrix::column_max(), FloatComplexMatrix::column_max(), FloatMatrix::column_max(), ComplexMatrix::column_min(), FloatComplexMatrix::column_min(), FloatMatrix::column_min(), conj(), ComplexMatrix::determinant(), FloatComplexMatrix::determinant(), FloatMatrix::determinant(), octave_complex_matrix::diag(), octave_float_complex_matrix::diag(), octave_float_matrix::diag(), octave_matrix::diag(), ComplexMatrix::diag(), FloatComplexMatrix::diag(), FloatMatrix::diag(), string_array_property::do_set(), opengl_renderer::draw_patch(), opengl_renderer::draw_scatter(), opengl_renderer::draw_surface(), sparse_qr< SPARSE_T >::E_MAT(), elem_xdiv(), elem_xpow(), F__delaunayn__(), octave::F__event_manager_file_dialog__(), octave::F__event_manager_input_dialog__(), F__pchip_deriv__(), F__voronoi__(), Faudiowrite(), Fconvhulln(), ComplexMatrix::fill(), FloatComplexMatrix::fill(), FloatMatrix::fill(), find_nonzero_elem_idx(), ComplexMatrix::fourier(), FloatComplexMatrix::fourier(), FloatMatrix::fourier(), ComplexMatrix::fourier2d(), FloatComplexMatrix::fourier2d(), FloatMatrix::fourier2d(), Frepelems(), uitable::properties::get_alternatebackgroundcolor_rgb(), ComplexMatrix::ifourier(), FloatComplexMatrix::ifourier(), FloatMatrix::ifourier(), ComplexMatrix::ifourier2d(), FloatComplexMatrix::ifourier2d(), FloatMatrix::ifourier2d(), Array< T, Alloc >::index(), Array< T, Alloc >::insert(), FloatComplexMatrix::insert(), FloatMatrix::insert(), ComplexMatrix::insert(), FloatComplexMatrix::ishermitian(), FloatMatrix::issymmetric(), ComplexMatrix::lssolve(), FloatComplexMatrix::lssolve(), FloatMatrix::lssolve(), Matrix::lssolve(), matrix_real_probe(), max(), min(), octave_print_internal(), operator*(), ComplexMatrix::operator+=(), FloatComplexMatrix::operator+=(), FloatMatrix::operator+=(), ComplexMatrix::operator-=(), FloatComplexMatrix::operator-=(), FloatMatrix::operator-=(), boolMatrix::operator==(), charMatrix::operator==(), ComplexMatrix::operator==(), FloatComplexMatrix::operator==(), FloatMatrix::operator==(), Matrix::operator==(), ComplexMatrix::pseudo_inverse(), FloatComplexMatrix::pseudo_inverse(), FloatMatrix::pseudo_inverse(), ComplexMatrix::rcond(), FloatComplexMatrix::rcond(), FloatMatrix::rcond(), regexp::replace(), ComplexMatrix::row_max(), FloatComplexMatrix::row_max(), FloatMatrix::row_max(), ComplexMatrix::row_min(), FloatComplexMatrix::row_min(), FloatMatrix::row_min(), rsf2csf< ComplexMatrix, Matrix >(), rsf2csf< FloatComplexMatrix, FloatMatrix >(), octave_cell::save_ascii(), octave_char_matrix_str::save_ascii(), save_mat_binary_data(), save_three_d(), sizes_cmp(), FloatComplexMatrix::stack(), FloatMatrix::stack(), ComplexMatrix::stack(), Matrix::stack(), octave_char_matrix_str::string_value(), octave_char_matrix_str::string_vector_value(), tree_evaluator::switch_case_label_matches(), Sylvester(), octave_bool_matrix::try_narrowing_conversion(), lu< T >::update(), qr< T >::update(), lu< T >::update_piv(), xgemm(), and xpow().
|
inline |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 492 of file Array.h.
References d.
Referenced by octave_value::size().
Array< T, Alloc > Array< T, Alloc >::sort | ( | Array< octave_idx_type > & | sidx, |
int | dim = 0 , |
||
sortmode | mode = ASCENDING |
||
) | const |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 1893 of file Array-base.cc.
References DESCENDING, Array< T, Alloc >::fortran_vec(), m, dim_vector::numel(), OCTAVE_LOCAL_BUFFER, octave_sort< T >::set_compare(), octave_sort< T >::sort(), and UNSORTED.
Array< octave::cdef_object > Array< octave::cdef_object >::sort | ( | Array< octave_idx_type > & | sidx, |
int | , | ||
sortmode | |||
) | const |
Definition at line 52 of file Array-tc.cc.
Array< octave::idx_vector > Array< octave::idx_vector >::sort | ( | Array< octave_idx_type > & | sidx, |
int | , | ||
sortmode | |||
) | const |
Definition at line 43 of file Array-idx-vec.cc.
Array< T, Alloc > Array< T, Alloc >::sort | ( | int | dim = 0 , |
sortmode | mode = ASCENDING |
||
) | const |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 1781 of file Array-base.cc.
References DESCENDING, m, dim_vector::ndims(), dim_vector::numel(), OCTAVE_LOCAL_BUFFER, dim_vector::resize(), octave_sort< T >::set_compare(), octave_sort< T >::sort(), and UNSORTED.
Referenced by qr< T >::delete_col(), children_property::do_set(), qr< T >::insert_col(), octave_cell::sort(), and ov_range< T >::sort().
Definition at line 52 of file Array-tc.cc.
Array< octave::idx_vector > Array< octave::idx_vector >::sort | ( | int | , |
sortmode | |||
) | const |
Definition at line 43 of file Array-idx-vec.cc.
Array< octave_idx_type > Array< T, Alloc >::sort_rows_idx | ( | sortmode | mode = ASCENDING | ) | const |
Sort by rows returns only indices.
Definition at line 2079 of file Array-base.cc.
References Array< T, Alloc >::fortran_vec(), r, safe_comparator(), and octave_sort< T >::sort_rows().
Referenced by octave_base_diag< DMT, MT >::sort_rows_idx(), octave_base_matrix< MT >::sort_rows_idx(), octave_cell::sort_rows_idx(), octave_perm_matrix::sort_rows_idx(), and octave_value::sort_rows_idx().
Array< octave_idx_type > Array< octave::cdef_object >::sort_rows_idx | ( | sortmode | ) | const |
Definition at line 52 of file Array-tc.cc.
Array< octave_idx_type > Array< octave::idx_vector >::sort_rows_idx | ( | sortmode | ) | const |
Definition at line 43 of file Array-idx-vec.cc.
Chop off leading singleton dimensions.
Definition at line 139 of file Array-base.cc.
References dim_vector::resize().
Referenced by boolNDArray::squeeze(), charNDArray::squeeze(), and MArray< T >::squeeze().
|
inline |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 922 of file Array.h.
Referenced by FloatNDArray::all_elements_are_int_or_inf_or_nan(), FloatNDArray::all_elements_are_zero(), FloatNDArray::all_integers(), FloatNDArray::any_element_is_negative(), FloatNDArray::any_element_is_positive(), FloatNDArray::any_element_not_one_or_zero(), and ov_range< T >::bool_array_value().
|
inline |
Simpler calls.
Definition at line 918 of file Array.h.
Referenced by ComplexNDArray::too_large_for_float().
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 1623 of file Array-base.cc.
References Array< T, Alloc >::fortran_vec(), and Array< T, Alloc >::xelem().
Referenced by Sparse< T, Alloc >::sort(), boolMatrix::transpose(), charMatrix::transpose(), and MArray< T >::transpose().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Size of the specified dimension.
Dimensions beyond the Array number of dimensions return 1 as those are implicit singleton dimensions.
Equivalent to Octave's 'size (A, DIM)'
Definition at line 524 of file Array.h.
References n.
Referenced by ComplexMatrix::ComplexMatrix(), ComplexNDArray::ComplexNDArray(), FloatComplexMatrix::FloatComplexMatrix(), FloatComplexNDArray::FloatComplexNDArray(), FloatNDArray::FloatNDArray(), SparseBoolMatrix::any(), octave_value_list::array_value(), DiagArray2< T >::array_value(), range< T, typename std::enable_if< std::is_floating_point< T >::value >::type >::array_value(), Sparse< T, Alloc >::array_value(), type_info::assign_ops_map(), type_info::assignany_ops_map(), type_info::binary_ops_map(), Cell::cellstr_value(), octave_char_matrix_str::cellstr_value(), Cell::column(), column_norms(), type_info::compound_binary_ops_map(), DiagArray2< T >::dgxelem(), children_property::do_set(), Array< T, Alloc >::elem(), RowVector::extract(), FloatRowVector::extract(), ColumnVector::extract(), FloatColumnVector::extract(), RowVector::extract_n(), FloatRowVector::extract_n(), ColumnVector::extract_n(), FloatColumnVector::extract_n(), octave::F__event_manager_file_dialog__(), octave::F__event_manager_input_dialog__(), octave::F__event_manager_list_dialog__(), F__native2unicode__(), F__unicode2native__(), Famd(), Fcellindexmat(), Fcomplex(), ComplexColumnVector::fill(), ComplexMatrix::fill(), ComplexRowVector::fill(), FloatComplexColumnVector::fill(), FloatComplexMatrix::fill(), FloatComplexRowVector::fill(), FloatMatrix::fill(), FloatRowVector::fill(), FloatColumnVector::fill(), find_nonzero_elem_idx(), Fordschur(), Fpow2(), Fsize(), Fstruct2cell(), lu< T >::getp(), Array< T, Alloc >::hermitian(), ComplexColumnVector::insert(), FloatComplexColumnVector::insert(), FloatColumnVector::insert(), FloatComplexMatrix::insert(), FloatComplexRowVector::insert(), FloatRowVector::insert(), FloatMatrix::insert(), ComplexMatrix::insert(), ComplexRowVector::insert(), idx_vector::inverse_permutation(), linspace(), map_2_xldexp(), map_2_xlog2(), type_info::non_const_unary_ops_map(), octave_scalar_map::orderfields(), octave_map::orderfields(), lu< T >::P_vec(), sparse_lu< lu_type >::Pc_vec(), octave_base_diag< DMT, MT >::permute(), sparse_lu< lu_type >::Pr_vec(), read_mat_binary_data(), row_norms(), SparseBoolMatrix::sum(), Array< T, Alloc >::transpose(), PermMatrix::transpose(), type_info::unary_ops_map(), and DiagArray2< T >::xelem().
|
inline |
|
protected |
Definition at line 245 of file Array.h.
Referenced by Array< T, Alloc >::Array(), Array< T, Alloc >::as_column(), Array< T, Alloc >::as_matrix(), Array< T, Alloc >::as_row(), Array< T, Alloc >::find(), Array< T, Alloc >::index(), Array< T, Alloc >::insert(), and Array< T, Alloc >::operator=().
|
protected |
Definition at line 247 of file Array.h.
Referenced by Array< T, Alloc >::Array(), and Array< T, Alloc >::operator=().
Definition at line 256 of file Array.h.
Referenced by Array< T, Alloc >::Array(), and Array< T, Alloc >::operator=().
|
protected |
Definition at line 257 of file Array.h.
Referenced by Array< T, Alloc >::operator=().