GNU Octave 7.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
Array< T, Alloc > Class Template Reference

N Dimensional Array with copy-on-write semantics. More...

#include "Array.h"

Collaboration diagram for Array< T, Alloc >:

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 (Array< T, Alloc > &&a)
 
 Array (const Array< T, Alloc > &a)
 No type conversion case. More...
 
OCTARRAY_API 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())
 
 Array (void)
 Empty ctor (0 by 0). More...
 
virtual ~Array (void)
 
Array< T, Allocas_column (void) const
 Return the array as a column vector. More...
 
Array< T, Allocas_matrix (void) const
 Return the array as a matrix. More...
 
Array< T, Allocas_row (void) const
 Return the array as a row vector. More...
 
OCTARRAY_API void clear (const dim_vector &dv)
 
void clear (octave_idx_type r, octave_idx_type c)
 
OCTARRAY_API void clear (void)
 
OCTARRAY_API void fill (const T &val)
 
OCTAVE_API Array< octave_idx_typefind (octave_idx_type, bool) const
 
OCTAVE_API sortmode is_sorted_rows (sortmode) const
 
OCTAVE_API sortmode issorted (sortmode) const
 
OCTAVE_API Array< octave_idx_typelookup (const Array< octave::idx_vector > &, sortmode) const
 
OCTAVE_API octave_idx_type lookup (octave::idx_vector const &, sortmode) const
 
void make_unique (void)
 
OCTAVE_API octave_idx_type nnz (void) const
 
OCTAVE_API Array< octave::idx_vectornth_element (const octave::idx_vector &, int) const
 
octave_idx_type numel (void) 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)
 
OCTAVE_API Array< octave::idx_vectorsort (Array< octave_idx_type > &sidx, int, sortmode) const
 
OCTAVE_API Array< octave::idx_vectorsort (int, sortmode) const
 
OCTAVE_API Array< octave_idx_typesort_rows_idx (sortmode) const
 
First dimension

Get the first dimension of the array (number of rows)

octave_idx_type dim1 (void) const
 
octave_idx_type rows (void) const
 
Second dimension

Get the second dimension of the array (number of columns)

octave_idx_type dim2 (void) const
 
octave_idx_type cols (void) const
 
octave_idx_type columns (void) 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
 

Private Member Functions

OCTAVE_API void instantiation_guard ()
 
OCTAVE_API void instantiation_guard ()
 
OCTAVE_API void instantiation_guard ()
 
OCTAVE_API void instantiation_guard ()
 
OCTAVE_API void instantiation_guard ()
 
OCTAVE_API void instantiation_guard ()
 
OCTAVE_API void instantiation_guard ()
 
OCTAVE_API void instantiation_guard ()
 
OCTAVE_API void instantiation_guard ()
 
OCTAVE_API void instantiation_guard ()
 
OCTAVE_API void instantiation_guard ()
 
OCTAVE_API void instantiation_guard ()
 
OCTAVE_API void instantiation_guard ()
 

Static Private Member Functions

static OCTARRAY_API Array< T, Alloc >::ArrayRep * nil_rep (void)
 

Third dimension

Get the third dimension of the array (number of pages)

template<typename U , typename A >
class Array
 Size of the specified dimension. More...
 
octave_idx_type dim3 (void) const
 Size of the specified dimension. More...
 
octave_idx_type pages (void) 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 (void) const
 Size of the specified dimension. More...
 
const dim_vectordims (void) const
 Return a const-reference so that dims ()(i) works efficiently. More...
 
OCTARRAY_API Array< T, Allocsqueeze (void) const
 Chop off leading singleton dimensions. More...
 
OCTARRAY_API octave_idx_type compute_index (octave_idx_type i, octave_idx_type j) const
 Size of the specified dimension. More...
 
OCTARRAY_API octave_idx_type compute_index (octave_idx_type i, octave_idx_type j, octave_idx_type k) const
 Size of the specified dimension. More...
 
OCTARRAY_API 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...
 
OCTARRAY_API T & checkelem (octave_idx_type n)
 Size of the specified dimension. More...
 
OCTARRAY_API T & checkelem (octave_idx_type i, octave_idx_type j)
 Size of the specified dimension. More...
 
OCTARRAY_API T & checkelem (octave_idx_type i, octave_idx_type j, octave_idx_type k)
 Size of the specified dimension. More...
 
OCTARRAY_API 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...
 
OCTARRAY_API crefT checkelem (octave_idx_type n) const
 Size of the specified dimension. More...
 
OCTARRAY_API crefT checkelem (octave_idx_type i, octave_idx_type j) const
 Size of the specified dimension. More...
 
OCTARRAY_API crefT checkelem (octave_idx_type i, octave_idx_type j, octave_idx_type k) const
 Size of the specified dimension. More...
 
OCTARRAY_API 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...
 
OCTARRAY_API Array< T, Alloccolumn (octave_idx_type k) const
 Extract column: A(:,k+1). More...
 
OCTARRAY_API Array< T, Allocpage (octave_idx_type k) const
 Extract page: A(:,:,k+1). More...
 
OCTARRAY_API Array< T, Alloclinear_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, Allocreshape (octave_idx_type nr, octave_idx_type nc) const
 Size of the specified dimension. More...
 
Array< T, Allocreshape (const dim_vector &new_dims) const
 Size of the specified dimension. More...
 
OCTARRAY_API Array< T, Allocpermute (const Array< octave_idx_type > &vec, bool inv=false) const
 Size of the specified dimension. More...
 
Array< T, Allocipermute (const Array< octave_idx_type > &vec) const
 Size of the specified dimension. More...
 
bool issquare (void) const
 Size of the specified dimension. More...
 
bool isempty (void) const
 Size of the specified dimension. More...
 
bool isvector (void) const
 Size of the specified dimension. More...
 
bool is_nd_vector (void) const
 Size of the specified dimension. More...
 
OCTARRAY_API Array< T, Alloctranspose (void) const
 Size of the specified dimension. More...
 
OCTARRAY_API Array< T, Allochermitian (T(*fcn)(const T &)=nullptr) const
 Size of the specified dimension. More...
 
const T * data (void) const
 Size of the specified dimension. More...
 
OCTARRAY_API T * fortran_vec (void)
 Size of the specified dimension. More...
 
bool is_shared (void)
 Size of the specified dimension. More...
 
int ndims (void) const
 Size of the specified dimension. More...
 
OCTARRAY_API Array< T, Allocindex (const octave::idx_vector &i) const
 Indexing without resizing. More...
 
OCTARRAY_API Array< T, Allocindex (const octave::idx_vector &i, const octave::idx_vector &j) const
 Size of the specified dimension. More...
 
OCTARRAY_API Array< T, Allocindex (const Array< octave::idx_vector > &ia) const
 Size of the specified dimension. More...
 
virtual OCTARRAY_API T resize_fill_value (void) const
 Size of the specified dimension. More...
 
OCTARRAY_API 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...
 
OCTARRAY_API 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...
 
OCTARRAY_API 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...
 
OCTARRAY_API Array< T, Allocindex (const octave::idx_vector &i, bool resize_ok, const T &rfv) const
 Indexing with possible resizing and fill. More...
 
Array< T, Allocindex (const octave::idx_vector &i, bool resize_ok) const
 Size of the specified dimension. More...
 
OCTARRAY_API Array< T, Allocindex (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, Allocindex (const octave::idx_vector &i, const octave::idx_vector &j, bool resize_ok) const
 Size of the specified dimension. More...
 
OCTARRAY_API Array< T, Allocindex (const Array< octave::idx_vector > &ia, bool resize_ok, const T &rfv) const
 Size of the specified dimension. More...
 
Array< T, Allocindex (const Array< octave::idx_vector > &ia, bool resize_ok) const
 Size of the specified dimension. More...
 
OCTARRAY_API 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...
 
OCTARRAY_API 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...
 
OCTARRAY_API 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...
 
OCTARRAY_API void delete_elements (const octave::idx_vector &i)
 Deleting elements. More...
 
OCTARRAY_API void delete_elements (int dim, const octave::idx_vector &i)
 A(:,...,I,...,:) = [] (>= 2 subscripts, one of them is non-colon) More...
 
OCTARRAY_API void delete_elements (const Array< octave::idx_vector > &ia)
 Dispatcher to the above two. More...
 
OCTARRAY_API 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...
 
OCTARRAY_API 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 (void)
 Size of the specified dimension. More...
 
OCTARRAY_API void print_info (std::ostream &os, const std::string &prefix) const
 Size of the specified dimension. More...
 
OCTARRAY_API Array< T, Allocsort (int dim=0, sortmode mode=ASCENDING) const
 Size of the specified dimension. More...
 
OCTARRAY_API Array< T, Allocsort (Array< octave_idx_type > &sidx, int dim=0, sortmode mode=ASCENDING) const
 Size of the specified dimension. More...
 
OCTARRAY_API sortmode issorted (sortmode mode=UNSORTED) const
 Ordering is auto-detected or can be specified. More...
 
OCTARRAY_API Array< octave_idx_typesort_rows_idx (sortmode mode=ASCENDING) const
 Sort by rows returns only indices. More...
 
OCTARRAY_API sortmode is_sorted_rows (sortmode mode=UNSORTED) const
 Ordering is auto-detected or can be specified. More...
 
OCTARRAY_API octave_idx_type lookup (const T &value, sortmode mode=UNSORTED) const
 Do a binary lookup in a sorted array. More...
 
OCTARRAY_API Array< octave_idx_typelookup (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...
 
OCTARRAY_API octave_idx_type nnz (void) const
 Count nonzero elements. More...
 
OCTARRAY_API Array< octave_idx_typefind (octave_idx_type n=-1, bool backward=false) const
 Find indices of (at most n) nonzero elements. More...
 
OCTARRAY_API Array< T, Allocnth_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...
 
OCTARRAY_API Array< T, Allocdiag (octave_idx_type k=0) const
 Get the kth super or subdiagonal. More...
 
OCTARRAY_API Array< T, Allocdiag (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, Amap (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, Amap (U(&fcn)(T)) const
 Overloads for function references. More...
 
template<typename U , typename A = std::allocator<U>>
Array< U, Amap (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...
 
OCTARRAY_API 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 OCTARRAY_API void instantiation_guard ()
 Size of the specified dimension. More...
 
static OCTARRAY_API Array< T, Alloccat (int dim, octave_idx_type n, const Array< T, Alloc > *array_list)
 Concatenation along a specified (0-based) dimension, equivalent to cat(). More...
 

Detailed Description

template<typename T, typename Alloc>
class Array< T, Alloc >

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.

// 3 D Array with 10 rows, 20 columns, and 5 pages, filled with 7.0
Array<double> A Array<double (dim_vector (10, 20, 5), 7.0);
// set value for row 0, column 10, and page 3
A(0, 10, 3) = 2.5;
// get value for row 1, column 2, and page 0
double v = A(1, 2, 0);
// get value for 25th element (row 4, column 3, page 1)
double v = A(24);
Vector representing the dimensions (size) of an Array.
Definition: dim-vector.h:94
F77_RET_T const F77_INT F77_CMPLX * A

Notes on STL compatibility

size() and length()

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.

Array<int> A (dim_vector (10, 20, 4), 1);
octave_idx_type n = A.numel (); // returns 800 (10x20x4)
octave_idx_type nr = A.size (0); // returns 10 (number of rows/dimension 0)
octave_idx_type nc = A.size (1); // returns 20 (number of columns)
octave_idx_type nc = A.size (2); // returns 4 (size of dimension 3)
octave_idx_type l6 = A.size (6); // returns 1 (implicit singleton dimension)
// Alternatively, get a dim_vector which represents the dimensions.
dim_vector dims = A.dims ();
const dim_vector & dims(void) const
Return a const-reference so that dims ()(i) works efficiently.
Definition: Array.h:487

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.

size_type

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.

Subclasses

The following subclasses specializations, will be of most use:

Definition at line 127 of file Array.h.

Member Typedef Documentation

◆ compare_fcn_type

template<typename T , typename Alloc >
typedef bool(* Array< T, Alloc >::compare_fcn_type) (typename ref_param< T >::type, typename ref_param< T >::type)

Definition at line 239 of file Array.h.

◆ crefT

template<typename T , typename Alloc >
typedef ref_param<T>::type Array< T, Alloc >::crefT

Definition at line 237 of file Array.h.

◆ element_type

template<typename T , typename Alloc >
typedef T Array< T, Alloc >::element_type

Definition at line 229 of file Array.h.

◆ size_type

template<typename T , typename Alloc >
typedef octave_idx_type Array< T, Alloc >::size_type

Used for operator(), and returned by numel() and size() (beware: signed integer)

Definition at line 235 of file Array.h.

◆ value_type

template<typename T , typename Alloc >
typedef T Array< T, Alloc >::value_type

Definition at line 231 of file Array.h.

Constructor & Destructor Documentation

◆ Array() [1/10]

template<typename T , typename Alloc >
Array< T, Alloc >::Array ( const Array< T, Alloc > &  a,
const dim_vector dv,
octave_idx_type  l,
octave_idx_type  u 
)
inlineprotected

slice constructor

Definition at line 259 of file Array.h.

References dim_vector::chop_trailing_singletons(), and Array< T, Alloc >::ArrayRep::m_count.

◆ Array() [2/10]

template<typename T , typename Alloc >
Array< T, Alloc >::Array ( void  )
inline

Empty ctor (0 by 0).

Definition at line 274 of file Array.h.

References Array< T, Alloc >::ArrayRep::m_count.

◆ Array() [3/10]

template<typename T , typename Alloc >
Array< T, Alloc >::Array ( const dim_vector dv)
inlineexplicit

nD uninitialized ctor.

Definition at line 282 of file Array.h.

References dim_vector::chop_trailing_singletons().

◆ Array() [4/10]

template<typename T , typename Alloc >
Array< T, Alloc >::Array ( const dim_vector dv,
const T &  val 
)
inlineexplicit

nD initialized ctor.

Definition at line 291 of file Array.h.

References dim_vector::chop_trailing_singletons().

◆ Array() [5/10]

template<typename T , typename Alloc >
Array< T, Alloc >::Array ( T *  ptr,
const dim_vector dv,
const Alloc xallocator = Alloc () 
)
inlineexplicit

Definition at line 306 of file Array.h.

References dim_vector::chop_trailing_singletons().

◆ Array() [6/10]

◆ Array() [7/10]

template<typename T , typename Alloc >
template<template< typename... > class Container>
Array< T, Alloc >::Array ( const Container< T > &  a,
const dim_vector dv 
)

Constructor from standard library sequence containers.

Definition at line 897 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.

◆ Array() [8/10]

template<typename T , typename Alloc >
template<typename U , typename A = Alloc>
Array< T, Alloc >::Array ( const Array< U, A > &  a)
inline

Type conversion case.

Definition at line 324 of file Array.h.

◆ Array() [9/10]

template<typename T , typename Alloc >
Array< T, Alloc >::Array ( const Array< T, Alloc > &  a)
inline

No type conversion case.

Definition at line 331 of file Array.h.

References Array< T, Alloc >::ArrayRep::m_count.

◆ Array() [10/10]

template<typename T , typename Alloc >
Array< T, Alloc >::Array ( Array< T, Alloc > &&  a)
inline

Definition at line 338 of file Array.h.

◆ ~Array()

template<typename T , typename Alloc >
virtual Array< T, Alloc >::~Array ( void  )
inlinevirtual

Definition at line 349 of file Array.h.

References Array< T, Alloc >::ArrayRep::m_count.

Member Function Documentation

◆ as_column()

template<typename T , typename Alloc >
Array< T, Alloc > Array< T, Alloc >::as_column ( void  ) const
inline

Return the array as a column vector.

Definition at line 415 of file Array.h.

References Array< T, Alloc >::m_dimensions, dim_vector::ndims(), and numel().

◆ as_matrix()

template<typename T , typename Alloc >
Array< T, Alloc > Array< T, Alloc >::as_matrix ( void  ) const
inline

Return the array as a matrix.

Definition at line 435 of file Array.h.

References Array< T, Alloc >::m_dimensions, dim_vector::ndims(), and dim_vector::redim().

Referenced by Sparse< T, Alloc >::index().

◆ as_row()

template<typename T , typename Alloc >
Array< T, Alloc > Array< T, Alloc >::as_row ( void  ) const
inline

Return the array as a row vector.

Definition at line 425 of file Array.h.

References Array< T, Alloc >::m_dimensions, dim_vector::ndims(), and numel().

◆ assign() [1/6]

template<typename T , typename Alloc >
void Array< T, Alloc >::assign ( const Array< octave::idx_vector > &  ia,
const Array< T, Alloc > &  rhs 
)
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 701 of file Array.h.

◆ assign() [2/6]

template<typename T , typename Alloc >
void Array< T, Alloc >::assign ( const Array< octave::idx_vector > &  ia,
const Array< T, Alloc > &  rhs,
const T &  rfv 
)

◆ assign() [3/6]

template<typename T , typename Alloc >
void Array< T, Alloc >::assign ( const octave::idx_vector i,
const Array< T, Alloc > &  rhs 
)
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 687 of file Array.h.

◆ assign() [4/6]

◆ assign() [5/6]

template<typename T , typename Alloc >
void Array< T, Alloc >::assign ( const octave::idx_vector i,
const octave::idx_vector j,
const Array< T, Alloc > &  rhs 
)
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 695 of file Array.h.

◆ assign() [6/6]

◆ byte_size()

template<typename T , typename Alloc >
std::size_t Array< T, Alloc >::byte_size ( void  ) const
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 483 of file Array.h.

References numel().

Referenced by octave_cell::byte_size(), DiagArray2< T >::byte_size(), PermMatrix::byte_size(), octave_perm_matrix::load_binary(), and octave_perm_matrix::save_binary().

◆ cat()

template<typename T , typename Alloc >
Array< T, Alloc > Array< T, Alloc >::cat ( int  dim,
octave_idx_type  n,
const Array< T, Alloc > *  array_list 
)
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 2623 of file Array.cc.

References octave::idx_vector::colon, dim_vector::concat(), Array< T, Alloc >::dims(), dim_vector::hvcat(), max(), dim_vector::ndims(), and dim_vector::zero_by_zero().

Referenced by single_type_concat().

◆ checkelem() [1/8]

template<typename T , typename Alloc >
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 219 of file Array.cc.

References compute_index(), elem, and ra_idx.

◆ checkelem() [2/8]

template<typename T , typename Alloc >
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 254 of file Array.cc.

References compute_index(), elem, and ra_idx.

◆ checkelem() [3/8]

template<typename T , typename Alloc >
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 205 of file Array.cc.

References compute_index(), and elem.

◆ checkelem() [4/8]

template<typename T , typename Alloc >
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 239 of file Array.cc.

References compute_index(), and elem.

◆ checkelem() [5/8]

template<typename T , typename Alloc >
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 212 of file Array.cc.

References compute_index(), and elem.

◆ checkelem() [6/8]

template<typename T , typename Alloc >
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 246 of file Array.cc.

References compute_index(), and elem.

◆ checkelem() [7/8]

◆ checkelem() [8/8]

template<typename T , typename Alloc >
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 226 of file Array.cc.

References elem, octave::err_index_out_of_range(), and octave::err_invalid_index().

◆ clear() [1/3]

template<typename T , typename Alloc >
void Array< T, Alloc >::clear ( const dim_vector dv)

Definition at line 102 of file Array.cc.

References dim_vector::chop_trailing_singletons(), and dim_vector::safe_numel().

◆ clear() [2/3]

template<typename T , typename Alloc >
void Array< T, Alloc >::clear ( octave_idx_type  r,
octave_idx_type  c 
)
inline

Definition at line 407 of file Array.h.

◆ clear() [3/3]

◆ cols()

template<typename T , typename Alloc >
octave_idx_type Array< T, Alloc >::cols ( void  ) const
inline

Definition at line 457 of file Array.h.

Referenced by aepbalance< T >::aepbalance(), ComplexMatrix::ComplexMatrix(), FloatComplexMatrix::FloatComplexMatrix(), FloatMatrix::FloatMatrix(), Matrix::Matrix(), octave::math::airy(), FloatComplexMatrix::append(), FloatMatrix::append(), ComplexMatrix::append(), Matrix::append(), octave::math::biry(), SparseComplexMatrix::bsolve(), SparseMatrix::bsolve(), octave::math::sparse_qr< SPARSE_T >::sparse_qr_rep< SPARSE_T >::C(), octave::chol2inv_internal(), dmsolve_insert(), dmsolve_permute(), octave::math::do_bessel(), drawcn(), SparseComplexMatrix::dsolve(), SparseMatrix::dsolve(), elem_xpow(), ComplexMatrix::fsolve(), FloatComplexMatrix::fsolve(), FloatMatrix::fsolve(), Matrix::fsolve(), SparseComplexMatrix::fsolve(), SparseMatrix::fsolve(), EIG::hermitian_init(), FloatEIG::hermitian_init(), Sparse< T, Alloc >::index(), FloatEIG::init(), hess< T >::init(), EIG::init(), chol< T >::init(), gepbalance< T >::init(), schur< T >::init(), qr< T >::init(), qrp< T >::init(), FloatComplexMatrix::insert(), ComplexMatrix::insert(), qr< T >::insert_col(), kron(), ComplexMatrix::lssolve(), FloatComplexMatrix::lssolve(), FloatMatrix::lssolve(), Matrix::lssolve(), ComplexMatrix::ltsolve(), FloatComplexMatrix::ltsolve(), FloatMatrix::ltsolve(), Matrix::ltsolve(), SparseComplexMatrix::ltsolve(), SparseMatrix::ltsolve(), LuAminusSigmaB(), make_cholb(), mark_facets(), matrix_real_probe(), octave_print_internal(), octave_print_internal_template(), FloatComplexMatrix::operator+=(), ComplexMatrix::operator+=(), FloatComplexMatrix::operator-=(), ComplexMatrix::operator-=(), boolMatrix::operator==(), charMatrix::operator==(), ComplexMatrix::operator==(), FloatComplexMatrix::operator==(), FloatMatrix::operator==(), Matrix::operator==(), octave_cell::save_ascii(), octave_char_matrix_str::save_ascii(), save_mat_ascii_data(), save_mat_binary_data(), FloatComplexMatrix::stack(), FloatMatrix::stack(), ComplexMatrix::stack(), Matrix::stack(), stack_complex_matrix(), FloatEIG::symmetric_init(), EIG::symmetric_init(), SparseComplexMatrix::trisolve(), SparseMatrix::trisolve(), octave_bool_matrix::try_narrowing_conversion(), unstack_complex_matrix(), qr< T >::update(), octave::Table::updateColumnname(), octave::Table::updateRowname(), ComplexMatrix::utsolve(), FloatComplexMatrix::utsolve(), FloatMatrix::utsolve(), Matrix::utsolve(), SparseComplexMatrix::utsolve(), SparseMatrix::utsolve(), vector_product(), xgemm(), and xpow().

◆ column()

template<typename T , typename Alloc >
Array< T, Alloc > Array< T, Alloc >::column ( octave_idx_type  k) const

Extract column: A(:,k+1).

Definition at line 261 of file Array.cc.

◆ columns()

◆ compute_index() [1/3]

template<typename T , typename Alloc >
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 185 of file Array.cc.

References compute_index(), and ra_idx.

◆ compute_index() [2/3]

template<typename T , typename Alloc >
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 170 of file Array.cc.

References compute_index().

◆ compute_index() [3/3]

template<typename T , typename Alloc >
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 177 of file Array.cc.

References compute_index().

◆ compute_index_unchecked()

template<typename T , typename Alloc >
octave_idx_type Array< T, Alloc >::compute_index_unchecked ( const Array< octave_idx_type > &  ra_idx) const
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 497 of file Array.h.

References dim_vector::compute_index(), octave_base_value::numel(), and ra_idx.

◆ data()

template<typename T , typename Alloc >
const T * Array< T, Alloc >::data ( void  ) const
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 616 of file Array.h.

Referenced by Cell::Cell(), octave::idx_vector::idx_mask_rep::idx_mask_rep(), NDArray::NDArray(), mxArray_octave_value::array_to_string(), 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(), octave::math::sparse_qr< SPARSE_T >::sparse_qr_rep< SPARSE_T >::C(), cam2xform(), convert_cdata(), DiagArray2< T >::data(), dmsolve_insert(), dmsolve_permute(), do_bitpack(), do_bsxfun_op(), do_merge(), do_mm_binary_op(), do_mx_check(), do_mx_cumminmax_op(), do_mx_diff_op(), do_mx_minmax_op(), do_sm_binary_op(), do_tril(), do_triu(), octave::opengl_selector::draw_image(), octave::opengl_renderer::draw_patch(), octave::opengl_renderer::draw_surface(), encode_bool_image(), encode_indexed_images(), F__native2unicode__(), F__pchip_deriv__(), F__unicode2native__(), F__unicode_length__(), octave::opengl_selector::fake_text(), Fbase64_encode(), Fdot(), Fellipj(), filter(), Fordschur(), SparseComplexMatrix::fsolve(), SparseMatrix::fsolve(), Funicode_idx(), get_array_limits(), mxArray_octave_value::get_string(), MArray< T >::idx_add(), MArray< T >::idx_add_nd(), MArray< T >::idx_max(), Matrix::ifourier(), octave_char_matrix::index_vector(), qr< T >::insert_col(), kron(), Array< T, Alloc >::lookup(), LuAminusSigmaB(), maybe_convert_to_u16(), octave_cell::mex_get_data(), num2hex(), 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==(), qs_preprocess(), qs_replace(), qs_search(), read_indexed_images(), read_mat5_binary_element(), octave_complex_diag_matrix::save_binary(), octave_complex_matrix::save_binary(), octave_float_complex_diag_matrix::save_binary(), octave_float_complex_matrix::save_binary(), octave_float_diag_matrix::save_binary(), octave_float_matrix::save_binary(), octave_perm_matrix::save_binary(), octave_diag_matrix::save_binary(), octave_matrix::save_binary(), save_mat5_binary_element(), save_mat5_element_length(), save_mat_binary_data(), octave::opengl_renderer::set_clipbox(), octave::opengl_renderer::set_color(), octave::rand::set_internal_state(), octave::opengl_renderer::setup_opengl_transformation(), stack_complex_matrix(), unstack_complex_matrix(), lu< T >::update_piv(), vector_product(), octave::opengl_renderer::patch_tessellator::vertex(), octave::stream::write(), write_mat5_array(), and xgemm().

◆ delete_elements() [1/3]

template<typename T , typename Alloc >
void Array< T, Alloc >::delete_elements ( const Array< octave::idx_vector > &  ia)

Dispatcher to the above two.

Definition at line 1490 of file Array.cc.

References Array< T, Alloc >::numel().

◆ delete_elements() [2/3]

◆ delete_elements() [3/3]

template<typename T , typename Alloc >
void Array< T, Alloc >::delete_elements ( int  dim,
const octave::idx_vector i 
)

◆ diag() [1/2]

template<typename T , typename Alloc >
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 2521 of file Array.cc.

References abs(), d, elem, and dim_vector::ndims().

Referenced by octave::range< T, typename std::enable_if< std::is_floating_point< T >::value >::type >::diag(), Cell::diag(), octave_base_scalar< ST >::diag(), boolMatrix::diag(), boolNDArray::diag(), and charNDArray::diag().

◆ diag() [2/2]

template<typename T , typename Alloc >
Array< T, Alloc > Array< T, Alloc >::diag ( octave_idx_type  m,
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 2607 of file Array.cc.

References min(), and numel().

◆ dim1()

template<typename T , typename Alloc >
octave_idx_type Array< T, Alloc >::dim1 ( void  ) const
inline

Definition at line 448 of file Array.h.

Referenced by Array< T, Alloc >::assign().

◆ dim2()

template<typename T , typename Alloc >
octave_idx_type Array< T, Alloc >::dim2 ( void  ) const
inline

◆ dim3()

template<typename T , typename Alloc >
octave_idx_type Array< T, Alloc >::dim3 ( void  ) const
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 465 of file Array.h.

Referenced by octave::ft_text_renderer::process_character(), octave::base_text_renderer::rotate_pixels(), and octave::latex_renderer::text_to_pixels().

◆ dims()

template<typename T , typename Alloc >
const dim_vector & Array< T, Alloc >::dims ( void  ) const
inline

Return a const-reference so that dims ()(i) works efficiently.

Definition at line 487 of file Array.h.

Referenced by octave::idx_vector::idx_mask_rep::idx_mask_rep(), octave::idx_vector::idx_vector_rep::idx_vector_rep(), NDArray::NDArray(), octave::math::airy(), Array< T, Alloc >::assign(), octave_map::assign(), binmap(), octave::math::biry(), bitopxx(), Array< T, Alloc >::cat(), charNDArray::concat(), conv_to_int_array(), octave_map::delete_elements(), octave::math::do_bessel(), do_bitpack(), do_bsxfun_op(), do_inplace_bsxfun_op(), do_merge(), do_mm_binary_op(), do_mm_inplace_op(), do_mx_cumminmax_op(), do_mx_diff_op(), do_mx_minmax_op(), do_numeric_lookup(), do_rand(), do_rc_map(), do_simple_cellfun(), do_sm_binary_op(), do_strcmp_fun(), do_tril(), do_triu(), octave::opengl_renderer::draw_surface(), octave_char_matrix_str::edit_display(), elem_xdiv(), elem_xpow(), encode_bool_image(), F__isprimelarge__(), F__make_valid_name__(), Fcell2struct(), Fcomplex(), Fellipj(), filter(), find_nonzero_elem_idx(), Fis_same_file(), Fisa(), Fisargout(), Fisfield(), Flookup(), Fregexprep(), Frepelems(), Fstr2double(), Fstrfind(), Fstrrep(), Fstruct(), Funicode_idx(), get_cell2struct_fields(), hex2num(), MArray< T >::idx_add_nd(), octave_map::index(), gepbalance< T >::init(), Array< T, Alloc >::insert(), ComplexNDArray::insert(), FloatComplexNDArray::insert(), is_handle_visible(), ishghandle(), Array< T, Alloc >::lookup(), octave_float_matrix::map(), octave_matrix::map(), octave::cdef_object::map_value(), maybe_convert_to_u16(), num2hex(), oct_catop_matrix_struct(), oct_catop_struct_matrix(), octave_print_internal(), octcellregexp(), operator<<(), octave_map::permute(), octave_cell::print_raw(), octave_map::setfield(), sizes_cmp(), and try_cellfun_internal_ops().

◆ elem() [1/8]

template<typename T , typename Alloc >
T & Array< T, Alloc >::elem ( const Array< octave_idx_type > &  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 545 of file Array.h.

References Array< T, Alloc >::elem(), and ra_idx.

◆ elem() [2/8]

template<typename T , typename Alloc >
crefT Array< T, Alloc >::elem ( const Array< octave_idx_type > &  ra_idx) const
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 572 of file Array.h.

References ra_idx, and Array< T, Alloc >::xelem().

◆ elem() [3/8]

template<typename T , typename Alloc >
T & Array< T, Alloc >::elem ( octave_idx_type  i,
octave_idx_type  j 
)
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 540 of file Array.h.

References Array< T, Alloc >::elem().

Referenced by Array< T, Alloc >::elem().

◆ elem() [4/8]

template<typename T , typename Alloc >
crefT Array< T, Alloc >::elem ( octave_idx_type  i,
octave_idx_type  j 
) const
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 566 of file Array.h.

◆ elem() [5/8]

template<typename T , typename Alloc >
T & Array< T, Alloc >::elem ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
)
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 542 of file Array.h.

References elem.

◆ elem() [6/8]

template<typename T , typename Alloc >
crefT Array< T, Alloc >::elem ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
) const
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 569 of file Array.h.

◆ elem() [7/8]

template<typename T , typename Alloc >
T & Array< T, Alloc >::elem ( octave_idx_type  n)
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 534 of file Array.h.

Referenced by ComplexMatrix::ComplexMatrix(), FloatComplexMatrix::FloatComplexMatrix(), FloatMatrix::FloatMatrix(), Matrix::Matrix(), Sparse< T, Alloc >::Sparse(), aepbalance< T >::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_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(), conv_to_int_array(), ddaspk_f(), ddaspk_j(), ddasrt_j(), ddassl_f(), ddassl_j(), delete_graphics_objects(), DiagArray2< T >::dgelem(), dmsolve_extract(), LSODE::do_integrate(), Array< T, Alloc >::elem(), DiagArray2< T >::elem(), elem_xdiv(), ComplexRowVector::extract(), FloatComplexRowVector::extract(), ComplexDiagMatrix::extract(), charMatrix::extract(), DiagMatrix::extract(), FloatComplexDiagMatrix::extract(), FloatDiagMatrix::extract(), ComplexColumnVector::extract(), FloatComplexColumnVector::extract(), ComplexRowVector::extract_n(), FloatComplexRowVector::extract_n(), ComplexColumnVector::extract_n(), FloatComplexColumnVector::extract_n(), DiagMatrix::fill(), ComplexDiagMatrix::fill(), FloatComplexDiagMatrix::fill(), FloatDiagMatrix::fill(), qr< T >::form(), SparseComplexMatrix::fsolve(), Fsymrcm(), Givens(), FloatEIG::init(), EIG::init(), 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(), DASRT::integrate(), octave_bool_matrix::load_ascii(), octave_cell::load_ascii(), octave_cell::load_binary(), octave_bool_matrix::load_hdf5(), octave_cell::load_hdf5(), lsode_f(), ComplexMatrix::lssolve(), FloatComplexMatrix::lssolve(), FloatMatrix::lssolve(), Matrix::lssolve(), matrix_real_probe(), SparseBoolMatrix::matrix_value(), SparseComplexMatrix::max(), SparseMatrix::max(), SparseComplexMatrix::min(), SparseMatrix::min(), boolMatrix::operator!(), intNDArray< T >::operator!(), operator*(), operator<<(), operator>>(), octave::bp_table::parse_dbfunction_params(), Array< T, Alloc >::permute(), plus_or_minus(), ComplexMatrix::pseudo_inverse(), Matrix::pseudo_inverse(), FloatComplexMatrix::pseudo_inverse(), FloatMatrix::pseudo_inverse(), read_mat_ascii_data(), 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(), octave_cell::save_hdf5(), and try_cellfun_internal_ops().

◆ elem() [8/8]

template<typename T , typename Alloc >
crefT Array< T, Alloc >::elem ( octave_idx_type  n) const
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 564 of file Array.h.

◆ fill()

template<typename T , typename Alloc >
void Array< T, Alloc >::fill ( const T &  val)

Definition at line 73 of file Array.cc.

References numel().

Referenced by octave::idx_vector::idx_scalar_rep::sort_idx().

◆ find() [1/2]

template<typename T , typename Alloc >
Array< octave_idx_type > Array< T, Alloc >::find ( octave_idx_type  n = -1,
bool  backward = false 
) const

◆ find() [2/2]

Definition at line 42 of file Array-idx-vec.cc.

◆ fortran_vec()

template<typename T , typename Alloc >
T * Array< T, Alloc >::fortran_vec ( void  )

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 1744 of file Array.cc.

Referenced by lu< T >::lu(), octave::math::sparse_lu< lu_type >::sparse_lu(), SparseBoolMatrix::any(), octave_uint64_matrix::array_value(), octave::idx_vector::idx_vector_rep::as_array(), mxArray_struct::as_octave_value(), mxArray_cell::as_octave_value(), Sparse< T, Alloc >::assign(), aepbalance< T >::balancing_matrix(), octave::base64_decode(), octave::base64_decode_bytes(), binmap(), blkmm_internal(), octave_uint64_matrix::bool_array_value(), box(), box_more(), SparseComplexMatrix::bsolve(), SparseMatrix::bsolve(), octave::math::sparse_qr< SPARSE_T >::sparse_qr_rep< SPARSE_T >::C(), cam2xform(), octave_uint64_matrix::char_array_value(), octave::chol2inv_internal(), octave::idx_vector::complement(), octave_uint64_matrix::complex_array_value(), octave_uint64_matrix::complex_matrix_value(), convert_cdata(), Array< T, Alloc >::delete_elements(), ComplexMatrix::determinant(), Matrix::determinant(), FloatComplexMatrix::determinant(), FloatMatrix::determinant(), SparseComplexMatrix::determinant(), SparseMatrix::determinant(), dmsolve_insert(), dmsolve_permute(), do_bitunpack(), do_bsxfun_op(), octave::rand::do_float_nd_array(), do_inplace_bsxfun_op(), DASPK::do_integrate(), DASSL::do_integrate(), LSODE::do_integrate(), DefQuad::do_integrate(), IndefQuad::do_integrate(), FloatDefQuad::do_integrate(), FloatIndefQuad::do_integrate(), do_mm_binary_op(), do_mm_inplace_op(), do_ms_binary_op(), do_ms_inplace_op(), do_mx_cumminmax_op(), do_mx_diff_op(), do_mx_inplace_op(), do_mx_minmax_op(), do_mx_unary_op(), octave::rand::do_nd_array(), do_rand(), do_repelems(), octave::base_stream::do_scanf(), octave::do_scanf_conv(), do_sm_binary_op(), do_tril(), do_triu(), octave::rand::do_vector(), octave::opengl_renderer::draw_patch(), EigsComplexNonSymmetricFunc(), EigsComplexNonSymmetricMatrix(), EigsComplexNonSymmetricMatrixShift(), EigsRealNonSymmetricFunc(), EigsRealNonSymmetricMatrix(), EigsRealNonSymmetricMatrixShift(), EigsRealSymmetricFunc(), EigsRealSymmetricMatrix(), EigsRealSymmetricMatrixShift(), octave_fields::equal_up_to_order(), F__delaunayn__(), F__dsearchn__(), F__glpk__(), F__icholt__(), F__iluc__(), F__ilutp__(), F__magick_finfo__(), F__pchip_deriv__(), F__voronoi__(), SparseComplexMatrix::factorize(), SparseMatrix::factorize(), Famd(), Faudioread(), Fconvhulln(), Fdot(), Fellipj(), filter(), Array< T, Alloc >::find(), find_starting_node(), ComplexMatrix::finverse(), Matrix::finverse(), FloatComplexMatrix::finverse(), FloatMatrix::finverse(), 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(), Fordqz(), Fordschur(), DiagArray2< T >::fortran_vec(), ComplexNDArray::fourier(), NDArray::fourier(), FloatComplexNDArray::fourier(), FloatNDArray::fourier(), ComplexMatrix::fourier(), Matrix::fourier(), FloatComplexMatrix::fourier(), FloatMatrix::fourier(), ComplexMatrix::fourier2d(), ComplexNDArray::fourier2d(), Matrix::fourier2d(), NDArray::fourier2d(), FloatComplexMatrix::fourier2d(), FloatMatrix::fourier2d(), FloatNDArray::fourier2d(), ComplexNDArray::fourierNd(), NDArray::fourierNd(), FloatComplexNDArray::fourierNd(), FloatNDArray::fourierNd(), mxArray_base_full::fp_to_ov(), Fqz(), Frandperm(), ComplexMatrix::fsolve(), FloatComplexMatrix::fsolve(), FloatMatrix::fsolve(), Matrix::fsolve(), SparseComplexMatrix::fsolve(), SparseMatrix::fsolve(), Fsymrcm(), octave::rand::get_internal_state(), octave::opengl_renderer::get_pixels(), gsvd< T >::ggsvd(), EIG::hermitian_init(), FloatEIG::hermitian_init(), ichol_t(), MArray< T >::idx_add_nd(), ComplexNDArray::ifourier(), FloatComplexNDArray::ifourier(), FloatNDArray::ifourier(), ComplexMatrix::ifourier(), Matrix::ifourier(), FloatComplexMatrix::ifourier(), FloatMatrix::ifourier(), ComplexMatrix::ifourier2d(), ComplexNDArray::ifourier2d(), Matrix::ifourier2d(), NDArray::ifourier2d(), FloatComplexMatrix::ifourier2d(), FloatComplexNDArray::ifourier2d(), FloatMatrix::ifourier2d(), FloatNDArray::ifourier2d(), ComplexNDArray::ifourierNd(), NDArray::ifourierNd(), FloatComplexNDArray::ifourierNd(), FloatNDArray::ifourierNd(), ilu_crout(), ilu_tp(), img_float2uint(), Array< T, Alloc >::index(), octave::range< T, typename std::enable_if< std::is_floating_point< T >::value >::type >::index(), Range::index(), FloatEIG::init(), hess< T >::init(), EIG::init(), chol< T >::init(), gepbalance< T >::init(), schur< T >::init(), qr< T >::init(), qrp< T >::init(), octave::CollocWt::init(), qr< T >::insert_col(), qr< T >::insert_row(), DASRT::integrate(), kron(), octave_char_matrix_str::load_ascii(), octave_bool_matrix::load_binary(), octave_complex_matrix::load_binary(), octave_float_complex_matrix::load_binary(), octave_float_matrix::load_binary(), octave_perm_matrix::load_binary(), octave_matrix::load_binary(), octave_char_matrix_str::load_binary(), 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(), Array< T, Alloc >::lookup(), ComplexMatrix::lssolve(), FloatComplexMatrix::lssolve(), FloatMatrix::lssolve(), Matrix::lssolve(), ComplexMatrix::ltsolve(), FloatComplexMatrix::ltsolve(), FloatMatrix::ltsolve(), Matrix::ltsolve(), LuAminusSigmaB(), Cell::map(), Array< T, Alloc >::map(), octave_uint64_matrix::matrix_value(), Array< T, Alloc >::nth_element(), operator*(), PermMatrix::pos_power(), octave::math::sparse_qr< SPARSE_T >::sparse_qr_rep< SPARSE_T >::Q(), qs_replace(), ComplexMatrix::rcond(), Matrix::rcond(), FloatComplexMatrix::rcond(), FloatMatrix::rcond(), read_indexed_images(), read_mat5_binary_element(), read_mat_binary_data(), Array< T, Alloc >::resize(), Array< T, Alloc >::resize1(), Array< T, Alloc >::resize2(), octave::math::rsf2csf< ComplexMatrix, Matrix >(), octave::math::rsf2csf< FloatComplexMatrix, FloatMatrix >(), octave_char_matrix_str::save_ascii(), octave_bool_matrix::save_binary(), octave_char_matrix_str::save_binary(), octave_bool_matrix::save_hdf5(), octave_complex_matrix::save_hdf5(), octave_float_complex_matrix::save_hdf5(), octave_float_matrix::save_hdf5(), octave_matrix::save_hdf5(), Array< T, Alloc >::sort(), string_vector::sort(), octave::idx_vector::idx_vector_rep::sort_idx(), Range::sort_internal(), Array< T, Alloc >::sort_rows_idx(), sqrtm_utri_inplace(), stack_complex_matrix(), sub2ind(), SparseBoolMatrix::sum(), Sylvester(), FloatEIG::symmetric_init(), EIG::symmetric_init(), ComplexMatrix::tinverse(), Matrix::tinverse(), FloatComplexMatrix::tinverse(), FloatMatrix::tinverse(), mxArray_separate_full::to_ov(), octave::Utils::toRgb(), Array< T, Alloc >::transpose(), SparseComplexMatrix::trisolve(), SparseMatrix::trisolve(), unbox(), unit_cube(), unstack_complex_matrix(), lu< T >::update(), qr< T >::update(), lu< T >::update_piv(), ComplexMatrix::utsolve(), FloatComplexMatrix::utsolve(), FloatMatrix::utsolve(), Matrix::utsolve(), viridis_colormap(), and xgemm().

◆ hermitian()

template<typename T , typename Alloc >
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 1646 of file Array.cc.

References Array< T, Alloc >::xelem().

Referenced by MArray< T >::hermitian().

◆ index() [1/9]

template<typename T , typename Alloc >
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 822 of file Array.cc.

References dim_vector::alloc(), dim_vector::chop_trailing_singletons(), octave::err_index_out_of_range(), Array< T, Alloc >::fortran_vec(), rec_index_helper::index(), rec_index_helper::is_cont_range(), Array< T, Alloc >::numel(), and dim_vector::redim().

◆ index() [2/9]

template<typename T , typename Alloc >
Array< T, Alloc > Array< T, Alloc >::index ( const Array< octave::idx_vector > &  ia,
bool  resize_ok 
) const
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 678 of file Array.h.

◆ index() [3/9]

template<typename T , typename Alloc >
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 1084 of file Array.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().

◆ index() [4/9]

◆ index() [5/9]

template<typename T , typename Alloc >
Array< T, Alloc > Array< T, Alloc >::index ( const octave::idx_vector i,
bool  resize_ok 
) const
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 662 of file Array.h.

◆ index() [6/9]

template<typename T , typename Alloc >
Array< T, Alloc > Array< T, Alloc >::index ( const octave::idx_vector i,
bool  resize_ok,
const T &  rfv 
) const

◆ index() [7/9]

template<typename T , typename Alloc >
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 764 of file Array.cc.

◆ index() [8/9]

template<typename T , typename Alloc >
Array< T, Alloc > Array< T, Alloc >::index ( const octave::idx_vector i,
const octave::idx_vector j,
bool  resize_ok 
) const
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 670 of file Array.h.

◆ index() [9/9]

template<typename T , typename Alloc >
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 1056 of file Array.cc.

References Array< T, Alloc >::columns(), octave::idx_vector::extent(), Array< T, Alloc >::index(), octave::idx_vector::is_scalar(), dim_vector::redim(), Array< T, Alloc >::resize2(), and Array< T, Alloc >::rows().

◆ insert() [1/2]

template<typename T , typename Alloc >
Array< T, Alloc > & Array< T, Alloc >::insert ( const Array< T, Alloc > &  a,
const Array< octave_idx_type > &  idx 
)

◆ insert() [2/2]

template<typename T , typename Alloc >
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 1567 of file Array.cc.

References Array< T, Alloc >::columns(), Array< T, Alloc >::m_dimensions, Array< T, Alloc >::ndims(), and Array< T, Alloc >::rows().

◆ instantiation_guard() [1/14]

OCTAVE_API void Array< signedchar >::instantiation_guard ( )
private

Definition at line 54 of file Array-i.cc.

◆ instantiation_guard() [2/14]

OCTAVE_API void Array< long >::instantiation_guard ( )
private

Definition at line 57 of file Array-i.cc.

◆ instantiation_guard() [3/14]

OCTAVE_API void Array< unsignedchar >::instantiation_guard ( )
private

Definition at line 70 of file Array-i.cc.

◆ instantiation_guard() [4/14]

OCTAVE_API void Array< unsignedshort >::instantiation_guard ( )
private

Definition at line 71 of file Array-i.cc.

◆ instantiation_guard() [5/14]

OCTAVE_API void Array< unsignedint >::instantiation_guard ( )
private

Definition at line 72 of file Array-i.cc.

◆ instantiation_guard() [6/14]

OCTAVE_API void Array< octave_int8 >::instantiation_guard ( )
private

Definition at line 82 of file Array-i.cc.

◆ instantiation_guard() [7/14]

OCTAVE_API void Array< octave_int16 >::instantiation_guard ( )
private

Definition at line 83 of file Array-i.cc.

◆ instantiation_guard() [8/14]

OCTAVE_API void Array< octave_int32 >::instantiation_guard ( )
private

Definition at line 84 of file Array-i.cc.

◆ instantiation_guard() [9/14]

OCTAVE_API void Array< octave_int64 >::instantiation_guard ( )
private

Definition at line 85 of file Array-i.cc.

◆ instantiation_guard() [10/14]

OCTAVE_API void Array< octave_uint16 >::instantiation_guard ( )
private

Definition at line 93 of file Array-i.cc.

◆ instantiation_guard() [11/14]

OCTAVE_API void Array< octave_uint32 >::instantiation_guard ( )
private

Definition at line 94 of file Array-i.cc.

◆ instantiation_guard() [12/14]

OCTAVE_API void Array< octave::idx_vector >::instantiation_guard ( )
private

Definition at line 44 of file Array-idx-vec.cc.

◆ instantiation_guard() [13/14]

OCTAVE_API void Array< short >::instantiation_guard ( )
private

Definition at line 47 of file Array-s.cc.

◆ instantiation_guard() [14/14]

template<typename T , typename Alloc >
void Array< T, Alloc >::instantiation_guard
staticprivate

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 2753 of file Array.cc.

◆ ipermute()

template<typename T , typename Alloc >
Array< T, Alloc > Array< T, Alloc >::ipermute ( const Array< octave_idx_type > &  vec) const
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 602 of file Array.h.

Referenced by MArray< T >::ipermute().

◆ is_nd_vector()

template<typename T , typename Alloc >
bool Array< T, Alloc >::is_nd_vector ( void  ) const
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 611 of file Array.h.

References dim_vector::is_nd_vector().

◆ is_shared()

template<typename T , typename Alloc >
bool Array< T, Alloc >::is_shared ( void  )
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 625 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().

◆ is_sorted_rows() [1/2]

template<typename T , typename Alloc >
sortmode Array< T, Alloc >::is_sorted_rows ( sortmode  mode = UNSORTED) const

◆ is_sorted_rows() [2/2]

OCTAVE_API sortmode Array< octave::idx_vector >::is_sorted_rows ( sortmode  ) const

Definition at line 42 of file Array-idx-vec.cc.

◆ isempty()

template<typename T , typename Alloc >
bool Array< T, Alloc >::isempty ( void  ) const
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 numel().

Referenced by box_more(), octave::ft_text_renderer::compute_bbox(), octave::ft_text_renderer::compute_line_xoffset(), NDArray::concat(), FloatNDArray::concat(), charNDArray::concat(), daspk_user_function(), daspk_user_jacobian(), dasrt_user_cf(), dasrt_user_f(), dasrt_user_j(), dassl_user_function(), dassl_user_jacobian(), octave::bp_table::dbstop_process_map_args(), ddaspk_f(), ddasrt_f(), ddassl_f(), do_bsxfun_op(), do_inplace_bsxfun_op(), do_minmax_red_op< boolNDArray >(), do_num2cell(), do_object2cell(), octave::opengl_renderer::draw_axes_boxes(), octave::opengl_renderer::draw_axes_planes(), octave::opengl_renderer::draw_axes_x_grid(), octave::opengl_renderer::draw_axes_y_grid(), octave::opengl_renderer::draw_axes_z_grid(), octave::opengl_renderer::draw_patch(), octave::opengl_renderer::draw_scatter(), octave::opengl_renderer::draw_surface(), octave::opengl_renderer::draw_text_background(), EigsComplexNonSymmetricFunc(), EigsComplexNonSymmetricMatrix(), EigsComplexNonSymmetricMatrixShift(), EigsRealNonSymmetricFunc(), EigsRealNonSymmetricMatrix(), EigsRealNonSymmetricMatrixShift(), EigsRealSymmetricFunc(), EigsRealSymmetricMatrix(), EigsRealSymmetricMatrixShift(), F__magick_write__(), Array< T, Alloc >::find(), find_config_info(), find_nonzero_elem_idx(), octave_bool_matrix::load_ascii(), octave_char_matrix_str::load_ascii(), lsode_f(), lsode_user_function(), lsode_user_jacobian(), LuAminusSigmaB(), Array< T, Alloc >::nth_element(), octave_print_internal(), octave::latex_renderer::ok(), octave::textscan::read_format_once(), octave::textscan::scan_string(), octave::opengl_renderer::set_color(), octave_cell::short_disp(), octave::ft_text_renderer::text_to_pixels(), octave::latex_renderer::text_to_pixels(), and val_in_table().

◆ issorted() [1/2]

template<typename T , typename Alloc >
sortmode Array< T, Alloc >::issorted ( sortmode  mode = UNSORTED) const

◆ issorted() [2/2]

Definition at line 42 of file Array-idx-vec.cc.

◆ issquare()

template<typename T , typename Alloc >
bool Array< T, Alloc >::issquare ( void  ) const
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 605 of file Array.h.

◆ isvector()

template<typename T , typename Alloc >
bool Array< T, Alloc >::isvector ( void  ) const
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 609 of file Array.h.

References dim_vector::isvector().

Referenced by Ffilter(), read_mat5_binary_element(), and sizes_cmp().

◆ linear_slice()

template<typename T , typename Alloc >
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 281 of file Array.cc.

◆ lookup() [1/4]

Definition at line 42 of file Array-idx-vec.cc.

◆ lookup() [2/4]

template<typename T , typename Alloc >
Array< octave_idx_type > Array< T, Alloc >::lookup ( const Array< T, Alloc > &  values,
sortmode  mode = UNSORTED 
) const

◆ lookup() [3/4]

template<typename T , typename Alloc >
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 2138 of file Array.cc.

References ASCENDING, DESCENDING, octave_sort< T >::descending_compare(), elem, octave_sort< T >::lookup(), numel(), octave_sort< T >::set_compare(), and UNSORTED.

Referenced by do_numeric_lookup(), Flookup(), and val_in_table().

◆ lookup() [4/4]

Definition at line 42 of file Array-idx-vec.cc.

◆ make_unique()

template<typename T , typename Alloc >
void Array< T, Alloc >::make_unique ( void  )
inline

◆ map() [1/3]

template<typename T , typename Alloc >
template<typename U , typename F , typename A = std::allocator<U>>
Array< U, A > Array< T, Alloc >::map ( F  fcn) const
inline

Apply function fcn to each element of the Array<T, Alloc>.

This function is optimized with a manually unrolled loop.

Definition at line 799 of file Array.h.

References Array< T, Alloc >::fortran_vec(), len, 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().

◆ map() [2/3]

template<typename T , typename Alloc >
template<typename U , typename A = std::allocator<U>>
Array< U, A > Array< T, Alloc >::map ( U(&)(const T &)  fcn) const
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 844 of file Array.h.

◆ map() [3/3]

template<typename T , typename Alloc >
template<typename U , typename A = std::allocator<U>>
Array< U, A > Array< T, Alloc >::map ( U(&)(T)  fcn) const
inline

Overloads for function references.

Definition at line 835 of file Array.h.

◆ maybe_economize()

template<typename T , typename Alloc >
void Array< T, Alloc >::maybe_economize ( void  )
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 729 of file Array.h.

References Array< T, Alloc >::ArrayRep::m_count, Array< T, Alloc >::ArrayRep::m_data, and Array< T, Alloc >::ArrayRep::m_len.

◆ ndims()

◆ nil_rep()

template<typename T , typename Alloc >
Array< T, Alloc >::ArrayRep * Array< T, Alloc >::nil_rep ( void  )
staticprivate

Definition at line 42 of file Array.cc.

◆ nnz() [1/2]

Definition at line 42 of file Array-idx-vec.cc.

◆ nnz() [2/2]

template<typename T , typename Alloc >
octave_idx_type Array< T, Alloc >::nnz ( void  ) const

◆ nth_element() [1/2]

OCTAVE_API Array< octave::idx_vector > Array< octave::idx_vector >::nth_element ( const octave::idx_vector ,
int   
) const

Definition at line 42 of file Array-idx-vec.cc.

◆ nth_element() [2/2]

template<typename T , typename Alloc >
Array< T, Alloc > Array< T, Alloc >::nth_element ( const octave::idx_vector n,
int  dim = 0 
) const

◆ numel()

template<typename T , typename Alloc >
octave_idx_type Array< T, Alloc >::numel ( void  ) const
inline

Number of elements in the array.

Definition at line 411 of file Array.h.

Referenced by Array< T, Alloc >::Array(), octave::ButtonControl::ButtonControl(), Cell::Cell(), ComplexNDArray::ComplexNDArray(), DiagArray2< T >::DiagArray2(), FloatComplexNDArray::FloatComplexNDArray(), FloatNDArray::FloatNDArray(), octave::idx_vector::idx_vector(), octave::idx_vector::idx_vector_rep::idx_vector_rep(), octave::ListBoxControl::ListBoxControl(), NDArray::NDArray(), octave_value_list::octave_value_list(), rec_permute_helper::rec_permute_helper(), octave::SliderControl::SliderControl(), Sparse< T, Alloc >::Sparse(), octave::math::sparse_lu< lu_type >::sparse_lu(), 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::boundingBoxToRect(), box(), octave_cell::break_closure_cycles(), octave_class::break_closure_cycles(), octave_struct::break_closure_cycles(), calc_dimensions(), octave::Canvas::canvasWheelEvent(), check_limit_vals(), PermMatrix::checkelem(), boolNDArray::concat(), charNDArray::concat(), ComplexNDArray::concat(), FloatComplexNDArray::concat(), FloatNDArray::concat(), intNDArray< T >::concat(), NDArray::concat(), concat(), conv_to_int_array(), convert_cdata(), convert_position(), tree_evaluator::convert_return_list_to_const_vector(), convert_text_position(), daspk_user_function(), daspk_user_jacobian(), dasrt_user_f(), dasrt_user_j(), dassl_user_function(), dassl_user_jacobian(), octave::bp_table::dbstop_process_map_args(), default_numeric_conversion_function(), error_system::default_warning_state(), DEFMETHOD(), DEFMETHODX(), qr< T >::delete_col(), Array< T, Alloc >::delete_elements(), delete_graphics_objects(), octave::cdef_class::cdef_class_rep::delete_object(), DiagArray2< T >::diag_length(), PermMatrix::dim1(), PermMatrix::dim2(), error_system::display_warning_options(), octave::math::do_bessel(), do_bitpack(), do_bsxfun_op(), do_cellslices_nda(), do_cleanup_waitfor_listener(), octave::rand::do_float_nd_array(), do_inplace_bsxfun_op(), DASPK::do_integrate(), DASSL::do_integrate(), LSODE::do_integrate(), DefQuad::do_integrate(), FloatDefQuad::do_integrate(), do_mat2cell(), do_mat2cell_nd(), do_minmax_bin_op< charNDArray >(), do_mm_binary_op(), do_mm_inplace_op(), do_ms_binary_op(), do_ms_inplace_op(), do_mx_check(), do_mx_inplace_op(), do_mx_unary_op(), octave::rand::do_nd_array(), do_num2cell_helper(), do_permute(), do_rand(), do_rc_map(), octave::sparse_params::do_set_vals(), do_simple_cellfun(), do_sm_binary_op(), do_strcmp_fun(), octave::rand::do_vector(), chol< T >::downdate(), octave::opengl_renderer::draw(), octave::opengl_renderer::draw_all_lights(), octave::opengl_renderer::draw_line(), octave::opengl_renderer::draw_marker(), octave::opengl_renderer::draw_patch(), octave::opengl_renderer::draw_scatter(), octave::opengl_selector::draw_text(), octave::opengl_renderer::draw_text(), EigsComplexNonSymmetricFunc(), EigsComplexNonSymmetricMatrix(), EigsComplexNonSymmetricMatrixShift(), EigsRealNonSymmetricFunc(), EigsRealNonSymmetricMatrix(), EigsRealNonSymmetricMatrixShift(), EigsRealSymmetricFunc(), EigsRealSymmetricMatrix(), EigsRealSymmetricMatrixShift(), elem_xdiv(), elem_xpow(), octave_fields::equal_up_to_order(), F__base64_decode_bytes__(), F__contourc__(), F__delaunayn__(), F__event_manager_input_dialog__(), F__event_manager_list_dialog__(), F__get__(), F__glpk__(), F__go_delete__(), F__go_execute_callback__(), F__go_post_callback__(), F__isprimelarge__(), F__magick_read__(), F__make_valid_name__(), F__native2unicode__(), F__ode15__(), F__pchip_deriv__(), F__unicode2native__(), F__unicode_length__(), F__voronoi__(), Fbase64_decode(), Fbase64_encode(), Fccolamd(), Fcell2struct(), Fcellslices(), Fcolamd(), Fcomplex(), Fconvhulln(), Fcsymamd(), Fdbstop(), Fdrawnow(), Fellipj(), Ffilter(), Fget(), ComplexDiagMatrix::fill(), DiagMatrix::fill(), FloatComplexDiagMatrix::fill(), FloatDiagMatrix::fill(), octave::cdef_object_array::fill_empty_values(), filter(), finalize_r(), Array< T, Alloc >::find(), octave::cdef_class::cdef_class_rep::find_method(), octave::cdef_class::cdef_class_rep::find_methods(), octave::cdef_class::cdef_class_rep::find_names(), find_nonzero_elem_idx(), octave::cdef_class::cdef_class_rep::find_properties(), octave::cdef_class::cdef_class_rep::find_property(), Fis_same_file(), Fisa(), Fisargout(), Fiscolumn(), Fisfield(), Fismatrix(), Fisrow(), Fisscalar(), Fissquare(), Fisvector(), Flookup(), Flu(), Fmatrix_type(), Fndims(), Fordschur(), octave::curl_transfer::form_data_post(), octave::curl_transfer::form_query_string(), Fquadcc(), Fregexprep(), Frepelems(), Freset(), Freshape(), Fresize(), Frmfield(), octave::Utils::fromRgb(), Fset(), Fsize(), Fspparms(), Fstr2double(), Fstrfind(), Fstrrep(), Fsymamd(), Fterminal_size(), Funicode_idx(), Furlread(), Furlwrite(), Fwarning(), octave::cdef_object_scalar::get(), get_array_limits(), get_cell2struct_fields(), get_children_limits(), get_dim_vector(), get_dimensions(), get_object_dims(), get_region_range(), get_scalar_idx(), octave::get_size(), get_sort_mode(), hex2num(), MArray< T >::idx_add(), MArray< T >::idx_max(), Array< T, Alloc >::index(), octave::opengl_renderer::init_gl_context(), ODES::initialize(), base_diff_alg_eqn::initialize(), initialize_r(), 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(), DASPK::integrate(), DASSL::integrate(), DASRT::integrate(), octave::math::sparse_chol< chol_type >::inverse(), is_handle_visible(), octave::is_superclass(), ishghandle(), Java_org_octave_Octave_doInvoke(), DiagArray2< T >::length(), linspace(), octave_bool_matrix::load_ascii(), scoped_fcn_handle::load_ascii(), scoped_fcn_handle::load_binary(), octave_perm_matrix::load_binary(), octave::textscan::lookahead(), Array< T, Alloc >::lookup(), octave::lookup_classes(), Matrix::lssolve(), ComplexMatrix::lssolve(), FloatMatrix::lssolve(), FloatComplexMatrix::lssolve(), LuAminusSigmaB(), octave::cdef_object::map_value(), maybe_convert_to_u16(), norm1(), null(), num2hex(), numel(), octave_class::numeric_conv(), octave_print_internal(), octcellregexp(), operator*(), ComplexColumnVector::operator+=(), FloatComplexColumnVector::operator+=(), FloatComplexRowVector::operator+=(), ComplexRowVector::operator+=(), ComplexColumnVector::operator-=(), FloatComplexColumnVector::operator-=(), FloatComplexRowVector::operator-=(), ComplexRowVector::operator-=(), operator<<(), ColumnVector::operator==(), ComplexColumnVector::operator==(), ComplexRowVector::operator==(), FloatColumnVector::operator==(), FloatComplexColumnVector::operator==(), FloatComplexRowVector::operator==(), FloatRowVector::operator==(), RowVector::operator==(), operator>>(), octave::bp_table::parse_dbfunction_params(), octave::textscan::parse_options(), PermMatrix::perm_length(), octave_base_diag< DMT, MT >::permute(), Array< T, Alloc >::permute(), Sparse< T, Alloc >::permute(), print_DASPK_options(), print_DASRT_options(), print_DASSL_options(), print_LSODE_options(), ComplexMatrix::pseudo_inverse(), Matrix::pseudo_inverse(), FloatComplexMatrix::pseudo_inverse(), FloatMatrix::pseudo_inverse(), qp(), qs_preprocess(), qs_replace(), qs_search(), read_images(), read_indexed_images(), read_mat5_binary_element(), read_mat5_binary_file_header(), octave::textscan::read_until(), type_info::register_type(), octave::ft_text_renderer::render(), octave::opengl_renderer::render_grid(), octave::opengl_renderer::render_tickmarks(), octave::opengl_renderer::render_ticktexts(), safe_comparator(), octave_perm_matrix::save_ascii(), octave_bool_matrix::save_binary(), octave_complex_diag_matrix::save_binary(), octave_float_complex_diag_matrix::save_binary(), octave_float_diag_matrix::save_binary(), octave_diag_matrix::save_binary(), octave_bool_matrix::save_hdf5(), save_mat5_binary_element(), save_mat5_element_length(), octave::textscan::scan_complex(), octave::textscan::scan_string(), octave::Canvas::select_object(), gnuplot_graphics_toolkit::send_quit(), octave::ft_text_renderer::set_color(), octave::latex_renderer::set_color(), annotation_dialog::set_gui_props(), octave::curl_transfer::set_header_fields(), octave::rand::set_internal_state(), octave::ft_text_renderer::set_mode(), error_system::set_warning_option(), PermMatrix::setup(), show_DASPK_options(), show_DASRT_options(), show_DASSL_options(), show_LSODE_options(), sizes_cmp(), octave::textscan::skip_delim(), octave::textscan::skip_whitespace(), ComplexColumnVector::stack(), ColumnVector::stack(), FloatComplexColumnVector::stack(), FloatColumnVector::stack(), FloatComplexMatrix::stack(), FloatMatrix::stack(), ComplexMatrix::stack(), Matrix::stack(), sub2ind(), octave::cdef_object_array::subsasgn(), octave_cell::subsasgn(), octave_struct::subsasgn(), octave_class::subsasgn_common(), octave_struct::subsref(), octave_cell::subsref(), octave_class::subsref(), octave::ButtonControl::toggled(), PermMatrix::transpose(), try_cellfun_internal_ops(), octave_complex_matrix::try_narrowing_conversion(), octave_float_complex_matrix::try_narrowing_conversion(), octave_float_matrix::try_narrowing_conversion(), octave_matrix::try_narrowing_conversion(), unbox(), chol< T >::update(), lu< T >::update(), qr< T >::update(), octave::ButtonControl::update(), octave::PopupMenuControl::update(), octave::SliderControl::update(), octave::file_editor_tab::update_lexer_settings(), lu< T >::update_piv(), octave::workspace_model::update_table(), update_text_pos(), octave::Table::updateColumnname(), octave::Table::updateColumnwidth(), octave::Canvas::updateCurrentPoint(), octave::Table::updateRowname(), octave::updateSelection(), octave::SliderControl::valueChanged(), octave::vector_norm(), octave::opengl_renderer::patch_tessellator::vertex(), tree_evaluator::visit_complex_for_command(), error_system::warning_query(), anonymous_fcn_handle::workspace(), weak_anonymous_fcn_handle::workspace(), octave::stream::write(), write_mat5_array(), write_mat5_cell_array(), xzip(), and zero_dims_inquire().

◆ operator()() [1/8]

template<typename T , typename Alloc >
T & Array< T, Alloc >::operator() ( const Array< octave_idx_type > &  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 552 of file Array.h.

References elem, and ra_idx.

◆ operator()() [2/8]

template<typename T , typename Alloc >
crefT Array< T, Alloc >::operator() ( const Array< octave_idx_type > &  ra_idx) const
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 581 of file Array.h.

References elem, and ra_idx.

◆ operator()() [3/8]

template<typename T , typename Alloc >
T & Array< T, Alloc >::operator() ( octave_idx_type  i,
octave_idx_type  j 
)
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 549 of file Array.h.

References elem.

◆ operator()() [4/8]

template<typename T , typename Alloc >
crefT Array< T, Alloc >::operator() ( octave_idx_type  i,
octave_idx_type  j 
) const
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 576 of file Array.h.

References elem.

◆ operator()() [5/8]

template<typename T , typename Alloc >
T & Array< T, Alloc >::operator() ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
)
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 550 of file Array.h.

References elem.

◆ operator()() [6/8]

template<typename T , typename Alloc >
crefT Array< T, Alloc >::operator() ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
) const
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 578 of file Array.h.

References elem.

◆ operator()() [7/8]

template<typename T , typename Alloc >
T & Array< T, Alloc >::operator() ( octave_idx_type  n)
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 548 of file Array.h.

References elem.

◆ operator()() [8/8]

template<typename T , typename Alloc >
crefT Array< T, Alloc >::operator() ( octave_idx_type  n) const
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 575 of file Array.h.

References elem.

◆ operator=() [1/2]

template<typename T , typename Alloc >
Array< T, Alloc > & Array< T, Alloc >::operator= ( Array< T, Alloc > &&  a)
inline

Definition at line 377 of file Array.h.

References Array< T, Alloc >::ArrayRep::m_count.

◆ operator=() [2/2]

◆ optimize_dimensions()

template<typename T , typename Alloc >
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 2743 of file Array.cc.

◆ page()

template<typename T , typename Alloc >
Array< T, Alloc > Array< T, Alloc >::page ( octave_idx_type  k) const

Extract page: A(:,:,k+1).

Definition at line 270 of file Array.cc.

◆ pages()

template<typename T , typename Alloc >
octave_idx_type Array< T, Alloc >::pages ( void  ) const
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 466 of file Array.h.

◆ permute()

template<typename T , typename Alloc >
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 431 of file Array.cc.

References dim_vector::alloc(), Array< T, Alloc >::elem(), dim_vector::ndims(), numel(), Array< T, Alloc >::numel(), OCTAVE_LOCAL_BUFFER_INIT, and dim_vector::resize().

Referenced by F__unicode_length__(), Funicode_idx(), octave_base_scalar< ST >::permute(), octave_map::permute(), octave_lazy_index::permute(), and MArray< T >::permute().

◆ print_info()

template<typename T , typename Alloc >
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 2727 of file Array.cc.

Referenced by DiagArray2< T >::print_info(), and PermMatrix::print_info().

◆ reshape() [1/2]

template<typename T , typename Alloc >
Array< T, Alloc > Array< T, Alloc >::reshape ( const dim_vector new_dims) const
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 598 of file Array.h.

◆ reshape() [2/2]

template<typename T , typename Alloc >
Array< T, Alloc > Array< T, Alloc >::reshape ( octave_idx_type  nr,
octave_idx_type  nc 
) const
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 595 of file Array.h.

Referenced by octave::idx_vector::idx_mask_rep::as_array(), Array< T, Alloc >::assign(), Fbase64_decode(), octave::range< T, typename std::enable_if< std::is_floating_point< T >::value >::type >::index(), octave_map::reshape(), Cell::reshape(), octave_base_scalar< ST >::reshape(), octave_lazy_index::reshape(), octave_matrix::reshape(), and MArray< T >::reshape().

◆ resize() [1/2]

template<typename T , typename Alloc >
void Array< T, Alloc >::resize ( const dim_vector dv)
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 652 of file Array.h.

References Array< T, Alloc >::resize().

Referenced by Array< T, Alloc >::resize().

◆ resize() [2/2]

template<typename T , typename Alloc >
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 1010 of file Array.cc.

References dim_vector::any_neg(), octave::err_invalid_resize(), Array< T, Alloc >::fortran_vec(), dim_vector::ndims(), dim_vector::redim(), and rec_resize_helper::resize_fill().

Referenced by DiagArray2< T >::DiagArray2(), octave::math::sparse_lu< lu_type >::sparse_lu(), octave_value_list::array_value(), octave::base64_decode(), octave::base64_decode_bytes(), bitopxx(), bp_lines_to_ov(), 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(), octave::regexp::compile_internal(), dmsolve_permute(), octave::math::do_bessel(), do_fft(), do_fft2(), do_fftn(), DASPK::do_integrate(), DASSL::do_integrate(), LSODE::do_integrate(), do_object2cell(), octave::tree_cell::evaluate(), DiagArray2< Complex >::extract_diag(), F__glpk__(), F__magick_read__(), Fbsxfun(), Ffilter(), Fget(), filter(), find_nonzero_elem_idx(), ComplexMatrix::finverse(), Matrix::finverse(), FloatComplexMatrix::finverse(), FloatMatrix::finverse(), Frandperm(), Fsize(), Fwarning(), get_ra_idx(), ichol_t(), MArray< T >::idx_add_nd(), ilu_crout(), ilu_tp(), Array< T, Alloc >::index(), DASRT::integrate(), 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(), 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(), error_system::set_warning_option(), octave_base_scalar< ST >::sort(), and Range::sort_internal().

◆ resize1() [1/2]

template<typename T , typename Alloc >
void Array< T, Alloc >::resize1 ( octave_idx_type  n)
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 649 of file Array.h.

References Array< T, Alloc >::resize1().

Referenced by Array< T, Alloc >::resize1().

◆ resize1() [2/2]

template<typename T , typename Alloc >
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 897 of file Array.cc.

References octave::err_invalid_resize(), Array< T, Alloc >::fortran_vec(), min(), nn, and numel().

Referenced by Array< T, Alloc >::index().

◆ resize2() [1/2]

template<typename T , typename Alloc >
void Array< T, Alloc >::resize2 ( octave_idx_type  nr,
octave_idx_type  nc 
)
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 643 of file Array.h.

◆ resize2() [2/2]

template<typename T , typename Alloc >
void Array< T, Alloc >::resize2 ( octave_idx_type  nr,
octave_idx_type  nc,
const T &  rfv 
)

Resizing (with fill).

Definition at line 968 of file Array.cc.

References octave::err_invalid_resize(), Array< T, Alloc >::fortran_vec(), and min().

Referenced by Array< T, Alloc >::find(), and Array< T, Alloc >::index().

◆ resize_fill_value()

template<typename T , typename Alloc >
T Array< T, Alloc >::resize_fill_value ( void  ) const
virtual

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 886 of file Array.cc.

◆ rows()

template<typename T , typename Alloc >
octave_idx_type Array< T, Alloc >::rows ( void  ) const
inline

Definition at line 449 of file Array.h.

Referenced by aepbalance< T >::aepbalance(), ComplexMatrix::ComplexMatrix(), FloatComplexMatrix::FloatComplexMatrix(), FloatMatrix::FloatMatrix(), lu< T >::lu(), Matrix::Matrix(), octave::math::airy(), FloatComplexMatrix::append(), FloatMatrix::append(), ComplexMatrix::append(), Matrix::append(), octave::math::biry(), SparseComplexMatrix::bsolve(), SparseMatrix::bsolve(), octave::math::sparse_qr< SPARSE_T >::sparse_qr_rep< SPARSE_T >::C(), octave_char_matrix_str::cellstr_value(), octave::Table::checkBoxClicked(), octave::chol2inv_internal(), octave::column_norms(), convert_cdata(), octave_complex_matrix::diag(), octave_float_complex_matrix::diag(), octave_float_matrix::diag(), octave_matrix::diag(), dmsolve_insert(), dmsolve_permute(), octave::math::do_bessel(), do_fftn(), do_gsvd(), do_repelems(), do_tril(), do_triu(), octave::opengl_renderer::draw_patch(), octave::opengl_renderer::draw_scatter(), octave::opengl_renderer::draw_surface(), drawcn(), SparseComplexMatrix::dsolve(), SparseMatrix::dsolve(), octave::math::sparse_qr< SPARSE_T >::E_MAT(), elem_xdiv(), elem_xpow(), encode_bool_image(), encode_indexed_images(), F__delaunayn__(), F__event_manager_file_dialog__(), F__event_manager_input_dialog__(), F__pchip_deriv__(), F__voronoi__(), Faudiowrite(), Fconvhulln(), find_nonzero_elem_idx(), qr< T >::form(), Frepelems(), ComplexMatrix::fsolve(), FloatComplexMatrix::fsolve(), FloatMatrix::fsolve(), Matrix::fsolve(), SparseComplexMatrix::fsolve(), SparseMatrix::fsolve(), Fstrrep(), EIG::hermitian_init(), FloatEIG::hermitian_init(), Sparse< T, Alloc >::index(), Array< T, Alloc >::index(), FloatEIG::init(), hess< T >::init(), EIG::init(), chol< T >::init(), gepbalance< T >::init(), schur< T >::init(), qr< T >::init(), qrp< T >::init(), Array< T, Alloc >::insert(), FloatComplexMatrix::insert(), ComplexMatrix::insert(), kron(), ComplexMatrix::lssolve(), FloatComplexMatrix::lssolve(), FloatMatrix::lssolve(), Matrix::lssolve(), ComplexMatrix::ltsolve(), FloatComplexMatrix::ltsolve(), FloatMatrix::ltsolve(), Matrix::ltsolve(), SparseComplexMatrix::ltsolve(), SparseMatrix::ltsolve(), LuAminusSigmaB(), mark_facets(), mark_upper_triangular(), matrix_real_probe(), max(), min(), octave_print_internal(), octave_print_internal_template(), operator*(), FloatComplexMatrix::operator+=(), ComplexMatrix::operator+=(), FloatComplexMatrix::operator-=(), ComplexMatrix::operator-=(), boolMatrix::operator==(), charMatrix::operator==(), ComplexMatrix::operator==(), FloatComplexMatrix::operator==(), FloatMatrix::operator==(), Matrix::operator==(), octave::pointer_to_qimage(), pr_max_internal(), pr_min_internal(), octave::regexp::replace(), octave::row_norms(), octave::math::rsf2csf< ComplexMatrix, Matrix >(), octave::math::rsf2csf< FloatComplexMatrix, FloatMatrix >(), octave_cell::save_ascii(), octave_char_matrix_str::save_ascii(), save_mat_ascii_data(), save_mat_binary_data(), save_three_d(), sizes_cmp(), sqrtm_utri_inplace(), FloatComplexMatrix::stack(), FloatMatrix::stack(), ComplexMatrix::stack(), Matrix::stack(), stack_complex_matrix(), streameuler2d_internal(), octave_char_matrix_str::string_value(), octave_char_matrix_str::string_vector_value(), tree_evaluator::switch_case_label_matches(), Sylvester(), FloatEIG::symmetric_init(), EIG::symmetric_init(), SparseComplexMatrix::trisolve(), SparseMatrix::trisolve(), octave_bool_matrix::try_narrowing_conversion(), unstack_complex_matrix(), lu< T >::update(), qr< T >::update(), lu< T >::update_piv(), octave::Table::updateColumnname(), octave::Table::updateRowname(), ComplexMatrix::utsolve(), FloatComplexMatrix::utsolve(), FloatMatrix::utsolve(), Matrix::utsolve(), SparseComplexMatrix::utsolve(), SparseMatrix::utsolve(), vector_product(), xgemm(), and xpow().

◆ size()

template<typename T , typename Alloc >
size_type Array< T, Alloc >::size ( const size_type  d) const
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 476 of file Array.h.

References d.

Referenced by octave::textscan::parse_options(), and octave_value::size().

◆ sort() [1/4]

template<typename T , typename Alloc >
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 1873 of file Array.cc.

References DESCENDING, Array< T, Alloc >::fortran_vec(), dim_vector::numel(), OCTAVE_LOCAL_BUFFER, octave_sort< T >::set_compare(), octave_sort< T >::sort(), and UNSORTED.

◆ sort() [2/4]

Definition at line 42 of file Array-idx-vec.cc.

◆ sort() [3/4]

template<typename T , typename Alloc >
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 1761 of file Array.cc.

References DESCENDING, 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(), do_gsvd(), qr< T >::insert_col(), octave_cell::sort(), octave_lazy_index::sort(), and ov_range< T >::sort().

◆ sort() [4/4]

Definition at line 42 of file Array-idx-vec.cc.

◆ sort_rows_idx() [1/2]

◆ sort_rows_idx() [2/2]

Definition at line 42 of file Array-idx-vec.cc.

◆ squeeze()

template<typename T , typename Alloc >
Array< T, Alloc > Array< T, Alloc >::squeeze ( void  ) const

Chop off leading singleton dimensions.

Definition at line 117 of file Array.cc.

References dim_vector::resize().

Referenced by octave_lazy_index::squeeze(), octave_matrix::squeeze(), boolNDArray::squeeze(), charNDArray::squeeze(), and MArray< T >::squeeze().

◆ test()

template<typename T , typename Alloc >
template<typename F , bool zero>
bool Array< T, Alloc >::test ( F  fcn) const
inline

Generic any/all test functionality with arbitrary predicate.

Definition at line 850 of file Array.h.

References numel().

◆ test_all() [1/3]

template<typename T , typename Alloc >
bool Array< T, Alloc >::test_all ( bool(&)(const T &)  fcn) const
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 877 of file Array.h.

◆ test_all() [2/3]

template<typename T , typename Alloc >
bool Array< T, Alloc >::test_all ( bool(&)(T)  fcn) const
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 874 of file Array.h.

◆ test_all() [3/3]

template<typename T , typename Alloc >
template<typename F >
bool Array< T, Alloc >::test_all ( F  fcn) const
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 862 of file Array.h.

Referenced by ov_range< T >::bool_array_value().

◆ test_any() [1/3]

template<typename T , typename Alloc >
bool Array< T, Alloc >::test_any ( bool(&)(const T &)  fcn) const
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 871 of file Array.h.

◆ test_any() [2/3]

template<typename T , typename Alloc >
bool Array< T, Alloc >::test_any ( bool(&)(T)  fcn) const
inline

Overloads for function references.

Definition at line 868 of file Array.h.

◆ test_any() [3/3]

template<typename T , typename Alloc >
template<typename F >
bool Array< T, Alloc >::test_any ( F  fcn) const
inline

Simpler calls.

Definition at line 858 of file Array.h.

◆ transpose()

template<typename T , typename Alloc >
Array< T, Alloc > Array< T, Alloc >::transpose ( void  ) 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 1603 of file Array.cc.

References rec_permute_helper::blk_trans(), Array< T, Alloc >::fortran_vec(), and Array< T, Alloc >::xelem().

Referenced by Sparse< T, Alloc >::index(), oct_unop_transpose(), Sparse< T, Alloc >::sort(), boolMatrix::transpose(), charMatrix::transpose(), and MArray< T >::transpose().

◆ xelem() [1/8]

template<typename T , typename Alloc >
T & Array< T, Alloc >::xelem ( const Array< octave_idx_type > &  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 517 of file Array.h.

References ra_idx.

◆ xelem() [2/8]

template<typename T , typename Alloc >
crefT Array< T, Alloc >::xelem ( const Array< octave_idx_type > &  ra_idx) const
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 520 of file Array.h.

References ra_idx.

◆ xelem() [3/8]

template<typename T , typename Alloc >
T & Array< T, Alloc >::xelem ( octave_idx_type  i,
octave_idx_type  j 
)
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 507 of file Array.h.

◆ xelem() [4/8]

template<typename T , typename Alloc >
crefT Array< T, Alloc >::xelem ( octave_idx_type  i,
octave_idx_type  j 
) const
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 509 of file Array.h.

◆ xelem() [5/8]

template<typename T , typename Alloc >
T & Array< T, Alloc >::xelem ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
)
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 512 of file Array.h.

◆ xelem() [6/8]

template<typename T , typename Alloc >
crefT Array< T, Alloc >::xelem ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
) const
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 514 of file Array.h.

◆ xelem() [7/8]

template<typename T , typename Alloc >
T & Array< T, Alloc >::xelem ( octave_idx_type  n)
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 504 of file Array.h.

Referenced by octave::idx_vector::idx_vector_rep::idx_vector_rep(), intNDArray< T >::abs(), SparseBoolMatrix::any(), octave_value_list::array_value(), DiagArray2< T >::array_value(), octave::range< T, typename std::enable_if< std::is_floating_point< T >::value >::type >::array_value(), Sparse< T, Alloc >::array_value(), octave::idx_vector::idx_range_rep::as_array(), octave::idx_vector::idx_mask_rep::as_array(), as_bool_nd_array(), as_nd_array(), type_info::assign_ops_map(), type_info::assignany_ops_map(), type_info::binary_ops_map(), Cell::cellstr_value(), octave_char_matrix_str::cellstr_value(), octave::chol2inv_internal(), Cell::column(), octave::column_norms(), type_info::compound_binary_ops_map(), DiagArray2< T >::dgxelem(), dmsolve_extract(), do_cellslices_nda(), do_gsvd(), do_mat2cell(), do_mat2cell_2d(), do_mat2cell_nd(), do_num2cell(), do_numeric_lookup(), do_object2cell(), do_rand(), do_rc_map(), Array< T, Alloc >::elem(), elem_xpow(), RowVector::extract(), FloatRowVector::extract(), ColumnVector::extract(), FloatColumnVector::extract(), RowVector::extract_n(), FloatRowVector::extract_n(), ColumnVector::extract_n(), FloatColumnVector::extract_n(), F__event_manager_file_dialog__(), F__event_manager_input_dialog__(), F__event_manager_list_dialog__(), F__native2unicode__(), F__unicode2native__(), Famd(), Faudiowrite(), Fcellindexmat(), Fcellslices(), Fcomplex(), octave::cdef_object_array::fill_empty_values(), find_nonzero_elem_idx(), Flookup(), Fordschur(), qr< T >::form(), Frepelems(), Fsize(), SparseComplexMatrix::fsolve(), SparseMatrix::fsolve(), Fstruct2cell(), octave::math::lu< T >::getp(), Array< T, Alloc >::hermitian(), hex2num(), Sparse< T, Alloc >::index(), octave::idx_vector::inverse_permutation(), is_handle_visible(), ishghandle(), kron(), linspace(), SparseComplexMatrix::ltsolve(), SparseMatrix::ltsolve(), LuAminusSigmaB(), map_2_xlog2(), Range::matrix_value(), type_info::non_const_unary_ops_map(), norm1(), octave_scalar_map::orderfields(), octave_map::orderfields(), octave::math::sparse_qr< SPARSE_T >::sparse_qr_rep< SPARSE_T >::P(), octave::math::lu< T >::P_vec(), octave::math::sparse_lu< lu_type >::Pc_vec(), octave_base_diag< DMT, MT >::permute(), octave::math::sparse_qr< SPARSE_T >::sparse_qr_rep< SPARSE_T >::Pinv(), octave::math::sparse_lu< lu_type >::Pr_vec(), put_int(), qp(), qs_search(), read_mat_binary_data(), octave::row_norms(), intNDArray< T >::signum(), octave::idx_vector::idx_range_rep::sort_idx(), octave::idx_vector::idx_mask_rep::sort_idx(), SparseBoolMatrix::sum(), Array< T, Alloc >::transpose(), PermMatrix::transpose(), type_info::unary_ops_map(), octave::idx_vector::idx_vector_rep::unconvert(), octave::idx_vector::idx_mask_rep::unconvert(), octave::Table::updateData(), SparseComplexMatrix::utsolve(), SparseMatrix::utsolve(), DiagArray2< T >::xelem(), and xgemm().

◆ xelem() [8/8]

template<typename T , typename Alloc >
crefT Array< T, Alloc >::xelem ( octave_idx_type  n) const
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 505 of file Array.h.

Friends And Related Function Documentation

◆ Array

template<typename T , typename Alloc >
template<typename U , typename A >
friend class Array
friend

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 881 of file Array.h.

Member Data Documentation

◆ m_dimensions

◆ m_rep

template<typename T , typename Alloc >
Array<T,Alloc>::ArrayRep* Array< T, Alloc >::m_rep
protected

Definition at line 246 of file Array.h.

Referenced by Array< T, Alloc >::Array(), and Array< T, Alloc >::operator=().

◆ m_slice_data

template<typename T , typename Alloc >
T* Array< T, Alloc >::m_slice_data
protected

Definition at line 255 of file Array.h.

Referenced by Array< T, Alloc >::Array(), and Array< T, Alloc >::operator=().

◆ m_slice_len

template<typename T , typename Alloc >
octave_idx_type Array< T, Alloc >::m_slice_len
protected

Definition at line 256 of file Array.h.

Referenced by Array< T, Alloc >::operator=().


The documentation for this class was generated from the following files: