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

Template for two dimensional diagonal array with math operators. More...

#include "MDiagArray2.h"

Inheritance diagram for MDiagArray2< T >:
Collaboration diagram for MDiagArray2< T >:

Public Member Functions

 MDiagArray2 (void)
 
 MDiagArray2 (octave_idx_type r, octave_idx_type c)
 
 MDiagArray2 (octave_idx_type r, octave_idx_type c, const T &val)
 
 MDiagArray2 (const MDiagArray2< T > &a)
 
 MDiagArray2 (const DiagArray2< T > &a)
 
template<typename U >
 MDiagArray2 (const DiagArray2< U > &a)
 
 MDiagArray2 (const Array< T > &a)
 
 MDiagArray2 (const Array< T > &a, octave_idx_type r, octave_idx_type c)
 
 ~MDiagArray2 (void)=default
 
MArray< T > array_value () const
 
DiagArray2< T > build_diag_matrix () const
 
size_t byte_size (void) const
 
checkelem (octave_idx_type r, octave_idx_type c) const
 
T & checkelem (octave_idx_type r, octave_idx_type c)
 
octave_idx_type cols (void) const
 
octave_idx_type columns (void) const
 
const T * data (void) const
 
dgelem (octave_idx_type i) const
 
T & dgelem (octave_idx_type i)
 
T & dgxelem (octave_idx_type i)
 
dgxelem (octave_idx_type i) const
 
MArray< T > diag (octave_idx_type k=0) const
 
Array< T > diag (octave_idx_type m, octave_idx_type n) const
 
octave_idx_type diag_length (void) const
 
octave_idx_type dim1 (void) const
 
octave_idx_type dim2 (void) const
 
dim_vector dims (void) const
 
elem (octave_idx_type r, octave_idx_type c) const
 
T & elem (octave_idx_type r, octave_idx_type c)
 
Array< T > extract_diag (octave_idx_type k=0) const
 
const T * fortran_vec (void) const
 
T * fortran_vec (void)
 
MDiagArray2< T > hermitian (T(*fcn)(const T &)=nullptr) const
 
bool is_multiple_of_identity (T val) const
 
bool isempty (void) const
 
octave_idx_type length (void) const
 
int ndims (void) const
 
octave_idx_type nelem (void) const
 
octave_idx_type nnz (void) const
 
octave_idx_type numel (void) const
 
operator() (octave_idx_type r, octave_idx_type c) const
 
T & operator() (octave_idx_type r, octave_idx_type c)
 
MDiagArray2< T > & operator= (const MDiagArray2< T > &a)
 
void print_info (std::ostream &os, const std::string &prefix) const
 
void resize (octave_idx_type n, octave_idx_type m, const T &rfv)
 
void resize (octave_idx_type n, octave_idx_type m)
 
octave_idx_type rows (void) const
 
MDiagArray2< T > transpose (void) const
 
xelem (octave_idx_type r, octave_idx_type c) const
 

Protected 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
 

Protected Member Functions

Array< T > as_column (void) const
 Return the array as a column vector. More...
 
Array< T > as_matrix (void) const
 Return the array as a matrix. More...
 
Array< T > as_row (void) const
 Return the array as a row vector. More...
 
T & checkelem (octave_idx_type n)
 
T & checkelem (octave_idx_type i, octave_idx_type j, octave_idx_type k)
 
T & checkelem (const Array< octave_idx_type > &ra_idx)
 
crefT checkelem (octave_idx_type n) const
 
crefT checkelem (octave_idx_type i, octave_idx_type j, octave_idx_type k) const
 
crefT checkelem (const Array< octave_idx_type > &ra_idx) const
 
void clear (void)
 
void clear (const dim_vector &dv)
 
void clear (octave_idx_type r, octave_idx_type c)
 
Array< T > column (octave_idx_type k) const
 Extract column: A(:,k+1). More...
 
octave_idx_type compute_index (octave_idx_type i, octave_idx_type j) const
 
octave_idx_type compute_index (octave_idx_type i, octave_idx_type j, octave_idx_type k) const
 
octave_idx_type compute_index (const Array< octave_idx_type > &ra_idx) const
 
octave_idx_type compute_index_unchecked (const Array< octave_idx_type > &ra_idx) const
 
T & elem (octave_idx_type n)
 
T & elem (octave_idx_type i, octave_idx_type j, octave_idx_type k)
 
T & elem (const Array< octave_idx_type > &ra_idx)
 
crefT elem (octave_idx_type n) const
 
crefT elem (octave_idx_type i, octave_idx_type j, octave_idx_type k) const
 
crefT elem (const Array< octave_idx_type > &ra_idx) const
 
void fill (const T &val)
 
template<>
Array< octave_idx_typefind (octave_idx_type, bool) const
 
Array< octave_idx_typefind (octave_idx_type n=-1, bool backward=false) const
 Find indices of (at most n) nonzero elements. More...
 
Array< T > & insert (const Array< T > &a, const Array< octave_idx_type > &idx)
 Insert an array into another at a specified position. More...
 
Array< T > & insert (const Array< T > &a, octave_idx_type r, octave_idx_type c)
 This is just a special case for idx = [r c 0 ...]. More...
 
Array< T > ipermute (const Array< octave_idx_type > &vec) const
 
bool is_empty (void) const
 
bool is_nd_vector (void) const
 
bool is_shared (void)
 
sortmode is_sorted (sortmode mode=UNSORTED) const
 
template<>
sortmode is_sorted_rows (sortmode) const
 
sortmode is_sorted_rows (sortmode mode=UNSORTED) const
 Ordering is auto-detected or can be specified. More...
 
bool is_square (void) const
 
bool is_vector (void) const
 
template<>
sortmode issorted (sortmode) const
 
sortmode issorted (sortmode mode=UNSORTED) const
 Ordering is auto-detected or can be specified. More...
 
bool issquare (void) const
 
bool isvector (void) const
 
Array< T > linear_slice (octave_idx_type lo, octave_idx_type up) const
 Extract a slice from this array as a column vector: A(:)(lo+1:up). More...
 
template<>
octave_idx_type lookup (idx_vector const &, sortmode) const
 
template<>
Array< octave_idx_typelookup (const Array< idx_vector > &, sortmode) const
 
octave_idx_type lookup (const T &value, sortmode mode=UNSORTED) const
 Do a binary lookup in a sorted array. More...
 
Array< octave_idx_typelookup (const Array< T > &values, sortmode mode=UNSORTED) const
 Ditto, but for an array of values, specializing on the case when values are sorted. More...
 
void make_unique (void)
 
template<typename U , typename F >
Array< U > map (F fcn) const
 Apply function fcn to each element of the Array<T>. More...
 
void maybe_economize (void)
 
void * mex_get_data (void) const
 Give a pointer to the data in mex format. More...
 
template<>
Array< idx_vectornth_element (const idx_vector &, int) const
 
Array< T > nth_element (const idx_vector &n, int dim=0) const
 Returns the n-th element in increasing order, using the same ordering as used for sort. More...
 
T & operator() (octave_idx_type n)
 
T & operator() (octave_idx_type i, octave_idx_type j, octave_idx_type k)
 
T & operator() (const Array< octave_idx_type > &ra_idx)
 
crefT operator() (octave_idx_type n) const
 
crefT operator() (octave_idx_type i, octave_idx_type j, octave_idx_type k) const
 
crefT operator() (const Array< octave_idx_type > &ra_idx) const
 
bool optimize_dimensions (const dim_vector &dv)
 Returns true if this->dims () == dv, and if so, replaces this->dimensions by a shallow copy of dv. More...
 
Array< T > page (octave_idx_type k) const
 Extract page: A(:,:,k+1). More...
 
Array< T > permute (const Array< octave_idx_type > &vec, bool inv=false) const
 
Array< T > reshape (octave_idx_type nr, octave_idx_type nc) const
 
Array< T > reshape (const dim_vector &new_dims) const
 
virtual T resize_fill_value (void) const
 
size_type size (const size_type d) const
 Size of the specified dimension. More...
 
template<>
Array< idx_vectorsort (int, sortmode) const
 
template<>
Array< idx_vectorsort (Array< octave_idx_type > &sidx, int, sortmode) const
 
Array< T > sort (int dim=0, sortmode mode=ASCENDING) const
 
Array< T > sort (Array< octave_idx_type > &sidx, int dim=0, sortmode mode=ASCENDING) const
 
template<>
Array< octave_idx_typesort_rows_idx (sortmode) const
 
Array< octave_idx_typesort_rows_idx (sortmode mode=ASCENDING) const
 Sort by rows returns only indices. More...
 
Array< T > squeeze (void) const
 Chop off leading singleton dimensions. More...
 
template<typename F , bool zero>
bool test (F fcn) const
 Generic any/all test functionality with arbitrary predicate. More...
 
T & xelem (octave_idx_type n)
 
crefT xelem (octave_idx_type n) const
 
T & xelem (octave_idx_type i, octave_idx_type j)
 
T & xelem (octave_idx_type i, octave_idx_type j, octave_idx_type k)
 
crefT xelem (octave_idx_type i, octave_idx_type j, octave_idx_type k) const
 
T & xelem (const Array< octave_idx_type > &ra_idx)
 
crefT xelem (const Array< octave_idx_type > &ra_idx) const
 
void resize (const dim_vector &dv, const T &rfv)
 Resizing (with fill). More...
 
void resize (const dim_vector &dv)
 Resizing (with fill). More...
 
void resize2 (octave_idx_type nr, octave_idx_type nc, const T &rfv)
 Resizing (with fill). More...
 
void resize2 (octave_idx_type nr, octave_idx_type nc)
 Resizing (with fill). More...
 
void resize1 (octave_idx_type n, const T &rfv)
 Resizing (with fill). More...
 
void resize1 (octave_idx_type n)
 Resizing (with fill). More...
 
octave_idx_type capacity (void) const
 Number of elements in the array. More...
 
Third dimension

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

octave_idx_type dim3 (void) const
 
octave_idx_type pages (void) const
 
Array< T > index (const idx_vector &i) const
 Indexing without resizing. More...
 
Array< T > index (const idx_vector &i, const idx_vector &j) const
 Indexing without resizing. More...
 
Array< T > index (const Array< idx_vector > &ia) const
 Indexing without resizing. More...
 
Array< T > index (const idx_vector &i, bool resize_ok, const T &rfv) const
 Indexing with possible resizing and fill. More...
 
Array< T > index (const idx_vector &i, bool resize_ok) const
 Indexing with possible resizing and fill. More...
 
Array< T > index (const idx_vector &i, const idx_vector &j, bool resize_ok, const T &rfv) const
 Indexing with possible resizing and fill. More...
 
Array< T > index (const idx_vector &i, const idx_vector &j, bool resize_ok) const
 Indexing with possible resizing and fill. More...
 
Array< T > index (const Array< idx_vector > &ia, bool resize_ok, const T &rfv) const
 Indexing with possible resizing and fill. More...
 
Array< T > index (const Array< idx_vector > &ia, bool resize_ok) const
 Indexing with possible resizing and fill. More...
 
void assign (const idx_vector &i, const Array< T > &rhs, const T &rfv)
 Indexed assignment (always with resize & fill). More...
 
void assign (const idx_vector &i, const Array< T > &rhs)
 Indexed assignment (always with resize & fill). More...
 
void assign (const idx_vector &i, const idx_vector &j, const Array< T > &rhs, const T &rfv)
 Indexed assignment (always with resize & fill). More...
 
void assign (const idx_vector &i, const idx_vector &j, const Array< T > &rhs)
 Indexed assignment (always with resize & fill). More...
 
void assign (const Array< idx_vector > &ia, const Array< T > &rhs, const T &rfv)
 Indexed assignment (always with resize & fill). More...
 
void assign (const Array< idx_vector > &ia, const Array< T > &rhs)
 Indexed assignment (always with resize & fill). More...
 
void delete_elements (const idx_vector &i)
 Deleting elements. More...
 
void delete_elements (int dim, const idx_vector &i)
 A(:,...,I,...,:) = [] (>= 2 subscripts, one of them is non-colon) More...
 
void delete_elements (const Array< idx_vector > &ia)
 Dispatcher to the above two. More...
 
template<typename U >
Array< U > map (U(&fcn)(T)) const
 Overloads for function references. More...
 
template<typename U >
Array< U > map (U(&fcn)(const T &)) const
 Overloads for function references. More...
 
template<typename F >
bool test_any (F fcn) const
 Simpler calls. More...
 
template<typename F >
bool test_all (F fcn) const
 Simpler calls. More...
 
bool test_any (bool(&fcn)(T)) const
 Overloads for function references. More...
 
bool test_any (bool(&fcn)(const T &)) const
 Overloads for function references. More...
 
bool test_all (bool(&fcn)(T)) const
 Overloads for function references. More...
 
bool test_all (bool(&fcn)(const T &)) const
 Overloads for function references. More...
 
int * jit_ref_count (void)
 WARNING: Only call these functions from jit. More...
 
T * jit_slice_data (void) const
 WARNING: Only call these functions from jit. More...
 
octave_idx_typejit_dimensions (void) const
 WARNING: Only call these functions from jit. More...
 
void * jit_array_rep (void) const
 WARNING: Only call these functions from jit. More...
 

Static Protected Member Functions

static Array< T > cat (int dim, octave_idx_type n, const Array< T > *array_list)
 Concatenation along a specified (0-based) dimension, equivalent to cat(). More...
 

Protected Attributes

octave_idx_type d1
 
octave_idx_type d2
 
dim_vector dimensions
 
Array< T >::ArrayReprep
 
T * slice_data
 
octave_idx_type slice_len
 

Friends

MDiagArray2< T > operator* (const MDiagArray2< T > &, const T &)
 
MDiagArray2< T > operator* (const T &, const MDiagArray2< T > &)
 
MDiagArray2< T > operator+ (const MDiagArray2< T > &)
 
MDiagArray2< T > operator+ (const MDiagArray2< T > &, const MDiagArray2< T > &)
 
MDiagArray2< T > operator- (const MDiagArray2< T > &)
 
MDiagArray2< T > operator- (const MDiagArray2< T > &, const MDiagArray2< T > &)
 
MDiagArray2< T > operator/ (const MDiagArray2< T > &, const T &)
 
MDiagArray2< T > product (const MDiagArray2< T > &, const MDiagArray2< T > &)
 

Detailed Description

template<typename T>
class MDiagArray2< T >

Template for two dimensional diagonal array with math operators.

Definition at line 32 of file MDiagArray2.h.

Member Typedef Documentation

◆ compare_fcn_type

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

Definition at line 211 of file Array.h.

◆ crefT

template<typename T>
typedef ref_param<T>::type Array< T >::crefT
inherited

Definition at line 209 of file Array.h.

◆ element_type

template<typename T>
typedef T Array< T >::element_type
inherited

Definition at line 201 of file Array.h.

◆ size_type

template<typename T>
typedef octave_idx_type Array< T >::size_type
inherited

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

Definition at line 207 of file Array.h.

◆ value_type

template<typename T>
typedef T Array< T >::value_type
inherited

Definition at line 203 of file Array.h.

Constructor & Destructor Documentation

◆ MDiagArray2() [1/8]

template<typename T>
MDiagArray2< T >::MDiagArray2 ( void  )
inline

Definition at line 56 of file MDiagArray2.h.

◆ MDiagArray2() [2/8]

template<typename T>
MDiagArray2< T >::MDiagArray2 ( octave_idx_type  r,
octave_idx_type  c 
)
inline

Definition at line 58 of file MDiagArray2.h.

◆ MDiagArray2() [3/8]

template<typename T>
MDiagArray2< T >::MDiagArray2 ( octave_idx_type  r,
octave_idx_type  c,
const T &  val 
)
inline

Definition at line 60 of file MDiagArray2.h.

◆ MDiagArray2() [4/8]

template<typename T>
MDiagArray2< T >::MDiagArray2 ( const MDiagArray2< T > &  a)
inline

Definition at line 63 of file MDiagArray2.h.

◆ MDiagArray2() [5/8]

template<typename T>
MDiagArray2< T >::MDiagArray2 ( const DiagArray2< T > &  a)
inline

Definition at line 65 of file MDiagArray2.h.

◆ MDiagArray2() [6/8]

template<typename T>
template<typename U >
MDiagArray2< T >::MDiagArray2 ( const DiagArray2< U > &  a)
inline

Definition at line 68 of file MDiagArray2.h.

◆ MDiagArray2() [7/8]

template<typename T>
MDiagArray2< T >::MDiagArray2 ( const Array< T > &  a)
inlineexplicit

Definition at line 70 of file MDiagArray2.h.

◆ MDiagArray2() [8/8]

template<typename T>
MDiagArray2< T >::MDiagArray2 ( const Array< T > &  a,
octave_idx_type  r,
octave_idx_type  c 
)
inline

Definition at line 72 of file MDiagArray2.h.

◆ ~MDiagArray2()

template<typename T>
MDiagArray2< T >::~MDiagArray2 ( void  )
default

Member Function Documentation

◆ array_value()

template<typename T>
MArray<T> MDiagArray2< T >::array_value ( void  ) const
inline

Definition at line 83 of file MDiagArray2.h.

◆ as_column()

template<typename T>
Array<T> Array< T >::as_column ( void  ) const
inlineinherited

Return the array as a column vector.

Definition at line 370 of file Array.h.

◆ as_matrix()

template<typename T>
Array<T> Array< T >::as_matrix ( void  ) const
inlineinherited

Return the array as a matrix.

Definition at line 390 of file Array.h.

Referenced by Sparse< bool >::index().

◆ as_row()

template<typename T>
Array<T> Array< T >::as_row ( void  ) const
inlineinherited

Return the array as a row vector.

Definition at line 380 of file Array.h.

◆ assign() [1/6]

template<typename T>
void Array< T >::assign ( const idx_vector i,
const Array< T > &  rhs,
const T &  rfv 
)
inherited

◆ assign() [2/6]

template<typename T>
void Array< T >::assign ( const idx_vector i,
const Array< T > &  rhs 
)
inlineinherited

Indexed assignment (always with resize & fill).

Definition at line 649 of file Array.h.

◆ assign() [3/6]

template<typename T>
void Array< T >::assign ( const idx_vector i,
const idx_vector j,
const Array< T > &  rhs,
const T &  rfv 
)
inherited

Indexed assignment (always with resize & fill).

Definition at line 1162 of file Array.cc.

◆ assign() [4/6]

template<typename T>
void Array< T >::assign ( const idx_vector i,
const idx_vector j,
const Array< T > &  rhs 
)
inlineinherited

Indexed assignment (always with resize & fill).

Definition at line 656 of file Array.h.

◆ assign() [5/6]

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

Indexed assignment (always with resize & fill).

Definition at line 1266 of file Array.cc.

◆ assign() [6/6]

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

Indexed assignment (always with resize & fill).

Definition at line 662 of file Array.h.

◆ build_diag_matrix()

template<typename T>
DiagArray2<T> DiagArray2< T >::build_diag_matrix ( ) const
inlineinherited

Definition at line 107 of file DiagArray2.h.

◆ byte_size()

template<typename T>
size_t DiagArray2< T >::byte_size ( void  ) const
inlineinherited

Definition at line 97 of file DiagArray2.h.

◆ capacity()

template<typename T>
octave_idx_type Array< T >::capacity ( void  ) const
inlineinherited

Number of elements in the array.

Synonymous with numel().

Note
This method is deprecated in favour of numel().

Definition at line 343 of file Array.h.

◆ cat()

template<typename T>
Array< T > Array< T >::cat ( int  dim,
octave_idx_type  n,
const Array< T > *  array_list 
)
staticinherited

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

Referenced by octave::single_type_concat().

◆ checkelem() [1/8]

template<typename T>
T DiagArray2< T >::checkelem ( octave_idx_type  r,
octave_idx_type  c 
) const
inlineinherited

Definition at line 128 of file DiagArray2.h.

◆ checkelem() [2/8]

template<typename T >
T & DiagArray2< T >::checkelem ( octave_idx_type  r,
octave_idx_type  c 
)
inherited

Definition at line 93 of file DiagArray2.cc.

◆ checkelem() [3/8]

◆ checkelem() [4/8]

template<typename T >
T & Array< T >::checkelem ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
)
inherited

Definition at line 211 of file Array.cc.

◆ checkelem() [5/8]

template<typename T >
T & Array< T >::checkelem ( const Array< octave_idx_type > &  ra_idx)
inherited

Definition at line 218 of file Array.cc.

◆ checkelem() [6/8]

template<typename T >
Array< T >::crefT Array< T >::checkelem ( octave_idx_type  n) const
inherited

Definition at line 225 of file Array.cc.

◆ checkelem() [7/8]

template<typename T >
Array< T >::crefT Array< T >::checkelem ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
) const
inherited

Definition at line 245 of file Array.cc.

◆ checkelem() [8/8]

template<typename T >
Array< T >::crefT Array< T >::checkelem ( const Array< octave_idx_type > &  ra_idx) const
inherited

Definition at line 253 of file Array.cc.

◆ clear() [1/3]

◆ clear() [2/3]

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

Definition at line 101 of file Array.cc.

◆ clear() [3/3]

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

Definition at line 334 of file Array.h.

◆ cols()

◆ column()

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

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

Definition at line 260 of file Array.cc.

Referenced by qp().

◆ columns()

template<typename T>
octave_idx_type DiagArray2< T >::columns ( void  ) const
inlineinherited

◆ compute_index() [1/3]

template<typename T >
octave_idx_type Array< T >::compute_index ( octave_idx_type  i,
octave_idx_type  j 
) const
inherited

Definition at line 169 of file Array.cc.

◆ compute_index() [2/3]

template<typename T >
octave_idx_type Array< T >::compute_index ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
) const
inherited

Definition at line 176 of file Array.cc.

◆ compute_index() [3/3]

template<typename T >
octave_idx_type Array< T >::compute_index ( const Array< octave_idx_type > &  ra_idx) const
inherited

Definition at line 184 of file Array.cc.

◆ compute_index_unchecked()

template<typename T>
octave_idx_type Array< T >::compute_index_unchecked ( const Array< octave_idx_type > &  ra_idx) const
inlineinherited

Definition at line 452 of file Array.h.

◆ data()

template<typename T>
const T* DiagArray2< T >::data ( void  ) const
inlineinherited

Definition at line 167 of file DiagArray2.h.

Referenced by MDiagArray2< Complex >::nnz().

◆ delete_elements() [1/3]

template<typename T >
void Array< T >::delete_elements ( const idx_vector i)
inherited

Deleting elements.

A(I) = [] (with a single subscript)

Definition at line 1389 of file Array.cc.

Referenced by Cell::delete_elements(), and octave_map::delete_elements().

◆ delete_elements() [2/3]

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

A(:,...,I,...,:) = [] (>= 2 subscripts, one of them is non-colon)

Definition at line 1429 of file Array.cc.

◆ delete_elements() [3/3]

template<typename T >
void Array< T >::delete_elements ( const Array< idx_vector > &  ia)
inherited

Dispatcher to the above two.

Definition at line 1485 of file Array.cc.

◆ dgelem() [1/2]

template<typename T>
T DiagArray2< T >::dgelem ( octave_idx_type  i) const
inlineinherited

Definition at line 122 of file DiagArray2.h.

Referenced by xpow().

◆ dgelem() [2/2]

template<typename T>
T& DiagArray2< T >::dgelem ( octave_idx_type  i)
inlineinherited

Definition at line 125 of file DiagArray2.h.

◆ dgxelem() [1/2]

template<typename T>
T& DiagArray2< T >::dgxelem ( octave_idx_type  i)
inlineinherited

Definition at line 150 of file DiagArray2.h.

Referenced by do_gsvd().

◆ dgxelem() [2/2]

template<typename T>
T DiagArray2< T >::dgxelem ( octave_idx_type  i) const
inlineinherited

Definition at line 153 of file DiagArray2.h.

◆ diag() [1/2]

template<typename T>
MArray<T> MDiagArray2< T >::diag ( octave_idx_type  k = 0) const
inline

Definition at line 100 of file MDiagArray2.h.

Referenced by do_gsvd().

◆ diag() [2/2]

template<typename T >
Array< T > Array< T >::diag ( octave_idx_type  m,
octave_idx_type  n 
) const
inherited

Definition at line 2616 of file Array.cc.

◆ diag_length()

template<typename T>
octave_idx_type DiagArray2< T >::diag_length ( void  ) const
inlineinherited

Definition at line 91 of file DiagArray2.h.

◆ dim1()

template<typename T>
octave_idx_type DiagArray2< T >::dim1 ( void  ) const
inlineinherited

Definition at line 84 of file DiagArray2.h.

◆ dim2()

template<typename T>
octave_idx_type DiagArray2< T >::dim2 ( void  ) const
inlineinherited

Definition at line 85 of file DiagArray2.h.

◆ dim3()

template<typename T>
octave_idx_type Array< T >::dim3 ( void  ) const
inlineinherited

◆ dims()

template<typename T>
dim_vector DiagArray2< T >::dims ( void  ) const
inlineinherited

Definition at line 99 of file DiagArray2.h.

◆ elem() [1/8]

template<typename T>
T DiagArray2< T >::elem ( octave_idx_type  r,
octave_idx_type  c 
) const
inlineinherited

Definition at line 115 of file DiagArray2.h.

Referenced by operator*().

◆ elem() [2/8]

template<typename T >
T & DiagArray2< T >::elem ( octave_idx_type  r,
octave_idx_type  c 
)
inherited

Definition at line 85 of file DiagArray2.cc.

◆ elem() [3/8]

template<typename T>
T& Array< T >::elem ( octave_idx_type  n)
inlineinherited

Definition at line 488 of file Array.h.

Referenced by octave::file_editor_tab::add_octave_apis(), octave_float_complex_matrix::char_array_value(), octave_complex_matrix::char_array_value(), octave_float_matrix::char_array_value(), octave_matrix::char_array_value(), Matrix::column_max(), FloatMatrix::column_max(), ComplexMatrix::column_max(), FloatComplexMatrix::column_max(), Matrix::column_min(), FloatMatrix::column_min(), ComplexMatrix::column_min(), FloatComplexMatrix::column_min(), charNDArray::concat(), ddaspk_f(), ddaspk_j(), ddasrt_j(), ddassl_f(), ddassl_j(), delete_graphics_objects(), DiagArray2< Complex >::dgelem(), dmsolve_extract(), LSODE::do_integrate(), DiagArray2< Complex >::elem(), Array< octave_value >::elem(), Ffunctions(), qr< T >::form(), Givens(), Gsymrcm(), EIG::init(), FloatEIG::init(), ComplexNDArray::insert(), FloatComplexNDArray::insert(), DASPK::integrate(), DASSL::integrate(), DASRT::integrate(), octave_bool_matrix::load_ascii(), octave_cell::load_hdf5(), octave_bool_matrix::load_hdf5(), lsode_f(), SparseMatrix::max(), SparseComplexMatrix::max(), SparseMatrix::min(), SparseComplexMatrix::min(), intNDArray< OCTAVE_INT_T >::operator!(), PermMatrix::operator()(), string_vector::operator[](), Array< octave_value >::permute(), plus_or_minus(), Matrix::pseudo_inverse(), FloatMatrix::pseudo_inverse(), ComplexMatrix::pseudo_inverse(), FloatComplexMatrix::pseudo_inverse(), Matrix::row_max(), FloatMatrix::row_max(), ComplexMatrix::row_max(), FloatComplexMatrix::row_max(), Matrix::row_min(), FloatMatrix::row_min(), ComplexMatrix::row_min(), FloatComplexMatrix::row_min(), graphics_object::set(), and try_cellfun_internal_ops().

◆ elem() [4/8]

template<typename T>
T& Array< T >::elem ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
)
inlineinherited

Definition at line 496 of file Array.h.

◆ elem() [5/8]

template<typename T>
T& Array< T >::elem ( const Array< octave_idx_type > &  ra_idx)
inlineinherited

Definition at line 499 of file Array.h.

◆ elem() [6/8]

template<typename T>
crefT Array< T >::elem ( octave_idx_type  n) const
inlineinherited

Definition at line 518 of file Array.h.

◆ elem() [7/8]

template<typename T>
crefT Array< T >::elem ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
) const
inlineinherited

Definition at line 523 of file Array.h.

◆ elem() [8/8]

template<typename T>
crefT Array< T >::elem ( const Array< octave_idx_type > &  ra_idx) const
inlineinherited

Definition at line 526 of file Array.h.

◆ extract_diag()

◆ fill()

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

Definition at line 72 of file Array.cc.

Referenced by quotient(), and idx_vector::idx_scalar_rep::sort_idx().

◆ find() [1/2]

template<>
Array< octave_idx_type > Array< idx_vector >::find ( octave_idx_type  ,
bool   
) const
inherited

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

◆ find() [2/2]

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

Find indices of (at most n) nonzero elements.

If n is specified, backward specifies search from backward.

Definition at line 2227 of file Array.cc.

Referenced by idx_vector::idx_mask_rep::as_array(), symbol_info_list::symbol_info::display_line(), find_nonzero_elem_idx(), and symbol_info_list::parse_whos_line_format().

◆ fortran_vec() [1/2]

template<typename T>
const T* DiagArray2< T >::fortran_vec ( void  ) const
inlineinherited

◆ fortran_vec() [2/2]

template<typename T>
T* DiagArray2< T >::fortran_vec ( void  )
inlineinherited

Definition at line 171 of file DiagArray2.h.

◆ hermitian()

template<typename T>
MDiagArray2<T> MDiagArray2< T >::hermitian ( T(*)(const T &)  fcn = nullptr) const
inline

◆ index() [1/9]

template<typename T >
Array< T > Array< T >::index ( const idx_vector i) const
inherited

◆ index() [2/9]

template<typename T >
Array< T > Array< T >::index ( const idx_vector i,
const idx_vector j 
) const
inherited

Indexing without resizing.

Definition at line 764 of file Array.cc.

◆ index() [3/9]

template<typename T >
Array< T > Array< T >::index ( const Array< idx_vector > &  ia) const
inherited

Indexing without resizing.

Definition at line 822 of file Array.cc.

◆ index() [4/9]

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

Indexing with possible resizing and fill.

Definition at line 1032 of file Array.cc.

◆ index() [5/9]

template<typename T>
Array<T> Array< T >::index ( const idx_vector i,
bool  resize_ok 
) const
inlineinherited

Indexing with possible resizing and fill.

Definition at line 625 of file Array.h.

◆ index() [6/9]

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

Indexing with possible resizing and fill.

Definition at line 1056 of file Array.cc.

◆ index() [7/9]

template<typename T>
Array<T> Array< T >::index ( const idx_vector i,
const idx_vector j,
bool  resize_ok 
) const
inlineinherited

Indexing with possible resizing and fill.

Definition at line 632 of file Array.h.

◆ index() [8/9]

template<typename T>
Array< T > Array< T >::index ( const Array< idx_vector > &  ia,
bool  resize_ok,
const T &  rfv 
) const
inherited

Indexing with possible resizing and fill.

Definition at line 1084 of file Array.cc.

◆ index() [9/9]

template<typename T>
Array<T> Array< T >::index ( const Array< idx_vector > &  ia,
bool  resize_ok 
) const
inlineinherited

Indexing with possible resizing and fill.

Definition at line 640 of file Array.h.

◆ insert() [1/2]

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

Insert an array into another at a specified position.

If size (a) is [d1 d2 ... dN] and idx is [i1 i2 ... iN], this method is equivalent to x(i1:i1+d1-1, i2:i2+d2-1, ... , iN:iN+dN-1) = a.

Definition at line 1583 of file Array.cc.

Referenced by boolMatrix::insert(), charMatrix::insert(), boolNDArray::insert(), charNDArray::insert(), ComplexNDArray::insert(), FloatComplexNDArray::insert(), Matrix::insert(), FloatNDArray::insert(), intNDArray< OCTAVE_INT_T >::insert(), NDArray::insert(), Cell::insert(), and FloatComplexMatrix::insert().

◆ insert() [2/2]

template<typename T>
Array< T > & Array< T >::insert ( const Array< T > &  a,
octave_idx_type  r,
octave_idx_type  c 
)
inherited

This is just a special case for idx = [r c 0 ...].

Definition at line 1562 of file Array.cc.

◆ ipermute()

template<typename T>
Array<T> Array< T >::ipermute ( const Array< octave_idx_type > &  vec) const
inlineinherited

Definition at line 556 of file Array.h.

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

◆ is_empty()

template<typename T>
bool Array< T >::is_empty ( void  ) const
inlineinherited

Definition at line 568 of file Array.h.

◆ is_multiple_of_identity()

template<typename T>
bool MDiagArray2< T >::is_multiple_of_identity ( val) const

Definition at line 34 of file MDiagArray2.cc.

Referenced by octave_diag_matrix::do_index_op().

◆ is_nd_vector()

template<typename T>
bool Array< T >::is_nd_vector ( void  ) const
inlineinherited

Definition at line 577 of file Array.h.

Referenced by dim_vector::make_nd_vector().

◆ is_shared()

template<typename T>
bool Array< T >::is_shared ( void  )
inlineinherited

Definition at line 588 of file Array.h.

◆ is_sorted()

template<typename T>
sortmode Array< T >::is_sorted ( sortmode  mode = UNSORTED) const
inlineinherited

Definition at line 716 of file Array.h.

◆ is_sorted_rows() [1/2]

template<>
sortmode Array< idx_vector >::is_sorted_rows ( sortmode  ) const
inherited

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

◆ is_sorted_rows() [2/2]

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

Ordering is auto-detected or can be specified.

Definition at line 2086 of file Array.cc.

Referenced by octave_lazy_index::is_sorted_rows(), and octave_matrix::is_sorted_rows().

◆ is_square()

template<typename T>
bool Array< T >::is_square ( void  ) const
inlineinherited

Definition at line 562 of file Array.h.

◆ is_vector()

template<typename T>
bool Array< T >::is_vector ( void  ) const
inlineinherited

Definition at line 574 of file Array.h.

◆ isempty()

template<typename T>
bool DiagArray2< T >::isempty ( void  ) const
inlineinherited

Definition at line 101 of file DiagArray2.h.

◆ issorted() [1/2]

template<>
sortmode Array< idx_vector >::issorted ( sortmode  ) const
inherited

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

◆ issorted() [2/2]

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

Ordering is auto-detected or can be specified.

Definition at line 2033 of file Array.cc.

Referenced by G__ode15__(), octave_lazy_index::issorted(), and octave_matrix::issorted().

◆ issquare()

template<typename T>
bool Array< T >::issquare ( void  ) const
inlineinherited

Definition at line 559 of file Array.h.

◆ isvector()

template<typename T>
bool Array< T >::isvector ( void  ) const
inlineinherited

Definition at line 571 of file Array.h.

Referenced by Ffilter(), and sizes_cmp().

◆ jit_array_rep()

template<typename T>
void* Array< T >::jit_array_rep ( void  ) const
inlineinherited

WARNING: Only call these functions from jit.

Definition at line 854 of file Array.h.

◆ jit_dimensions()

template<typename T>
octave_idx_type* Array< T >::jit_dimensions ( void  ) const
inlineinherited

WARNING: Only call these functions from jit.

Definition at line 852 of file Array.h.

◆ jit_ref_count()

template<typename T>
int* Array< T >::jit_ref_count ( void  )
inlineinherited

WARNING: Only call these functions from jit.

Definition at line 848 of file Array.h.

◆ jit_slice_data()

template<typename T>
T* Array< T >::jit_slice_data ( void  ) const
inlineinherited

WARNING: Only call these functions from jit.

Definition at line 850 of file Array.h.

◆ length()

◆ linear_slice()

template<typename T >
Array< T > Array< T >::linear_slice ( octave_idx_type  lo,
octave_idx_type  up 
) const
inherited

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

Referenced by octave_value_list::slice().

◆ lookup() [1/4]

template<>
Array< octave_idx_type > Array< idx_vector >::lookup ( const Array< idx_vector > &  ,
sortmode   
) const
inherited

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

◆ lookup() [2/4]

template<>
octave_idx_type Array< idx_vector >::lookup ( idx_vector const &  ,
sortmode   
) const
inherited

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

◆ lookup() [3/4]

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

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

◆ lookup() [4/4]

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

Ditto, but for an array of values, specializing on the case when values are sorted.

NaNs get the value N.

Definition at line 2168 of file Array.cc.

◆ make_unique()

template<typename T>
void Array< T >::make_unique ( void  )
inlineinherited

◆ map() [1/3]

template<typename T>
template<typename U , typename F >
Array<U> Array< T >::map ( F  fcn) const
inlineinherited

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

This function is optimized with a manually unrolled loop.

Definition at line 764 of file Array.h.

Referenced by if(), octave_float_complex_diag_matrix::map(), octave_complex_diag_matrix::map(), octave_float_diag_matrix::map(), octave_diag_matrix::map(), DiagMatrix::rcond(), FloatDiagMatrix::rcond(), ComplexDiagMatrix::rcond(), and FloatComplexDiagMatrix::rcond().

◆ map() [2/3]

template<typename T>
template<typename U >
Array<U> Array< T >::map ( U(&)(T)  fcn) const
inlineinherited

Overloads for function references.

Definition at line 796 of file Array.h.

◆ map() [3/3]

template<typename T>
template<typename U >
Array<U> Array< T >::map ( U(&)(const T &)  fcn) const
inlineinherited

Overloads for function references.

Definition at line 801 of file Array.h.

◆ maybe_economize()

template<typename T>
void Array< T >::maybe_economize ( void  )
inlineinherited

Definition at line 690 of file Array.h.

◆ mex_get_data()

template<typename T>
void* Array< T >::mex_get_data ( void  ) const
inlineinherited

Give a pointer to the data in mex format.

Unsafe. This function exists to support the MEX interface. You should not use it anywhere else.

Definition at line 706 of file Array.h.

Referenced by octave_cell::mex_get_data().

◆ ndims()

template<typename T>
int DiagArray2< T >::ndims ( void  ) const
inlineinherited

Definition at line 103 of file DiagArray2.h.

◆ nelem()

◆ nnz()

template<typename T>
octave_idx_type MDiagArray2< T >::nnz ( void  ) const
inline

Definition at line 88 of file MDiagArray2.h.

◆ nth_element() [1/2]

template<>
Array< idx_vector > Array< idx_vector >::nth_element ( const idx_vector ,
int   
) const
inherited

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

◆ nth_element() [2/2]

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

Returns the n-th element in increasing order, using the same ordering as used for sort.

n can either be a scalar index or a contiguous range.

Definition at line 2308 of file Array.cc.

◆ numel()

template<typename T>
octave_idx_type DiagArray2< T >::numel ( void  ) const
inlineinherited

Definition at line 95 of file DiagArray2.h.

◆ operator()() [1/8]

template<typename T>
T DiagArray2< T >::operator() ( octave_idx_type  r,
octave_idx_type  c 
) const
inlineinherited

Definition at line 131 of file DiagArray2.h.

◆ operator()() [2/8]

template<typename T>
T& DiagArray2< T >::operator() ( octave_idx_type  r,
octave_idx_type  c 
)
inlineinherited

Definition at line 138 of file DiagArray2.h.

◆ operator()() [3/8]

template<typename T>
T& Array< T >::operator() ( octave_idx_type  n)
inlineinherited

Definition at line 502 of file Array.h.

◆ operator()() [4/8]

template<typename T>
T& Array< T >::operator() ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
)
inlineinherited

Definition at line 504 of file Array.h.

◆ operator()() [5/8]

template<typename T>
T& Array< T >::operator() ( const Array< octave_idx_type > &  ra_idx)
inlineinherited

Definition at line 506 of file Array.h.

◆ operator()() [6/8]

template<typename T>
crefT Array< T >::operator() ( octave_idx_type  n) const
inlineinherited

Definition at line 529 of file Array.h.

◆ operator()() [7/8]

template<typename T>
crefT Array< T >::operator() ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
) const
inlineinherited

Definition at line 532 of file Array.h.

◆ operator()() [8/8]

template<typename T>
crefT Array< T >::operator() ( const Array< octave_idx_type > &  ra_idx) const
inlineinherited

Definition at line 535 of file Array.h.

◆ operator=()

template<typename T>
MDiagArray2<T>& MDiagArray2< T >::operator= ( const MDiagArray2< T > &  a)
inline

◆ optimize_dimensions()

template<typename T >
bool Array< T >::optimize_dimensions ( const dim_vector dv)
inherited

Returns true if this->dims () == dv, and if so, replaces this->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 2751 of file Array.cc.

◆ page()

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

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

Definition at line 269 of file Array.cc.

◆ pages()

template<typename T>
octave_idx_type Array< T >::pages ( void  ) const
inlineinherited

Definition at line 421 of file Array.h.

◆ permute()

template<typename T >
Array< T > Array< T >::permute ( const Array< octave_idx_type > &  vec,
bool  inv = false 
) const
inherited

◆ print_info()

template<typename T>
void DiagArray2< T >::print_info ( std::ostream &  os,
const std::string prefix 
) const
inlineinherited

Definition at line 173 of file DiagArray2.h.

◆ reshape() [1/2]

◆ reshape() [2/2]

template<typename T>
Array<T> Array< T >::reshape ( const dim_vector new_dims) const
inlineinherited

Definition at line 552 of file Array.h.

◆ resize() [1/4]

template<typename T>
void DiagArray2< T >::resize ( octave_idx_type  n,
octave_idx_type  m,
const T &  rfv 
)
inherited

Definition at line 101 of file DiagArray2.cc.

◆ resize() [2/4]

template<typename T>
void DiagArray2< T >::resize ( octave_idx_type  n,
octave_idx_type  m 
)
inlineinherited

Definition at line 157 of file DiagArray2.h.

◆ resize() [3/4]

template<typename T>
void Array< T >::resize ( const dim_vector dv,
const T &  rfv 
)
inherited

Resizing (with fill).

Definition at line 1010 of file Array.cc.

Referenced by Matrix::column_max(), FloatMatrix::column_max(), ComplexMatrix::column_max(), FloatComplexMatrix::column_max(), Matrix::column_min(), FloatMatrix::column_min(), ComplexMatrix::column_min(), FloatComplexMatrix::column_min(), octave::regexp::compile_internal(), do_fft(), do_fft2(), do_fftn(), LSODE::do_integrate(), DASPK::do_integrate(), DASSL::do_integrate(), F__magick_read__(), Ffilter(), Fget(), Matrix::finverse(), FloatMatrix::finverse(), ComplexMatrix::finverse(), FloatComplexMatrix::finverse(), G__glpk__(), ichol_t(), MArray< Complex >::idx_add_nd(), DASRT::integrate(), octave_float_complex_matrix::load_hdf5(), octave_cell::load_hdf5(), octave_char_matrix_str::load_hdf5(), octave_complex_matrix::load_hdf5(), octave_float_matrix::load_hdf5(), octave_bool_matrix::load_hdf5(), octave_matrix::load_hdf5(), Matrix::lssolve(), FloatMatrix::lssolve(), ComplexMatrix::lssolve(), FloatComplexMatrix::lssolve(), SparseMatrix::max(), SparseComplexMatrix::max(), SparseMatrix::min(), SparseComplexMatrix::min(), octave_value_list::octave_value_list(), octcellregexp(), octave::type_info::register_type(), boolMatrix::resize(), charMatrix::resize(), RowVector::resize(), string_vector::resize(), octave_value_list::resize(), FloatRowVector::resize(), ColumnVector::resize(), FloatColumnVector::resize(), ComplexRowVector::resize(), FloatComplexRowVector::resize(), ComplexColumnVector::resize(), FloatComplexColumnVector::resize(), Matrix::resize(), FloatMatrix::resize(), DiagArray2< Complex >::resize(), ComplexMatrix::resize(), FloatComplexMatrix::resize(), octave_map::resize(), Matrix::row_max(), FloatMatrix::row_max(), ComplexMatrix::row_max(), FloatComplexMatrix::row_max(), Matrix::row_min(), FloatMatrix::row_min(), ComplexMatrix::row_min(), FloatComplexMatrix::row_min(), octave_base_scalar< bool >::sort(), Range::sort_internal(), and octave::math::sparse_lu< lu_type >::sparse_lu().

◆ resize() [4/4]

template<typename T>
void Array< T >::resize ( const dim_vector dv)
inlineinherited

Resizing (with fill).

Definition at line 615 of file Array.h.

Referenced by Array< octave_value >::resize().

◆ resize1() [1/2]

template<typename T>
void Array< T >::resize1 ( octave_idx_type  n,
const T &  rfv 
)
inherited

Resizing (with fill).

Definition at line 897 of file Array.cc.

◆ resize1() [2/2]

template<typename T>
void Array< T >::resize1 ( octave_idx_type  n)
inlineinherited

Resizing (with fill).

Definition at line 612 of file Array.h.

Referenced by Array< octave_value >::resize1().

◆ resize2() [1/2]

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

Resizing (with fill).

Definition at line 968 of file Array.cc.

◆ resize2() [2/2]

template<typename T>
void Array< T >::resize2 ( octave_idx_type  nr,
octave_idx_type  nc 
)
inlineinherited

Resizing (with fill).

Definition at line 606 of file Array.h.

◆ resize_fill_value()

template<typename T >
T Array< T >::resize_fill_value ( void  ) const
virtualinherited

Reimplemented in Cell.

Definition at line 886 of file Array.cc.

◆ rows()

◆ size()

template<typename T>
size_type Array< T >::size ( const size_type  d) const
inlineinherited

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.h.

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

◆ sort() [1/4]

template<>
Array< idx_vector > Array< idx_vector >::sort ( int  ,
sortmode   
) const
inherited

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

◆ sort() [2/4]

template<>
Array< idx_vector > Array< idx_vector >::sort ( Array< octave_idx_type > &  sidx,
int  ,
sortmode   
) const
inherited

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

◆ sort() [3/4]

template<typename T >
Array< T > Array< T >::sort ( int  dim = 0,
sortmode  mode = ASCENDING 
) const
inherited

◆ sort() [4/4]

template<typename T >
Array< T > Array< T >::sort ( Array< octave_idx_type > &  sidx,
int  dim = 0,
sortmode  mode = ASCENDING 
) const
inherited

Definition at line 1872 of file Array.cc.

◆ sort_rows_idx() [1/2]

template<>
Array< octave_idx_type > Array< idx_vector >::sort_rows_idx ( sortmode  ) const
inherited

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

◆ sort_rows_idx() [2/2]

template<typename T >
Array< octave_idx_type > Array< T >::sort_rows_idx ( sortmode  mode = ASCENDING) const
inherited

◆ squeeze()

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

Chop off leading singleton dimensions.

Definition at line 116 of file Array.cc.

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

◆ test()

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

Generic any/all test functionality with arbitrary predicate.

Definition at line 807 of file Array.h.

◆ test_all() [1/3]

template<typename T>
template<typename F >
bool Array< T >::test_all ( F  fcn) const
inlineinherited

Simpler calls.

Definition at line 819 of file Array.h.

◆ test_all() [2/3]

template<typename T>
bool Array< T >::test_all ( bool(&)(T)  fcn) const
inlineinherited

Overloads for function references.

Definition at line 831 of file Array.h.

◆ test_all() [3/3]

template<typename T>
bool Array< T >::test_all ( bool(&)(const T &)  fcn) const
inlineinherited

Overloads for function references.

Definition at line 834 of file Array.h.

◆ test_any() [1/3]

template<typename T>
template<typename F >
bool Array< T >::test_any ( F  fcn) const
inlineinherited

Simpler calls.

Definition at line 815 of file Array.h.

◆ test_any() [2/3]

template<typename T>
bool Array< T >::test_any ( bool(&)(T)  fcn) const
inlineinherited

Overloads for function references.

Definition at line 825 of file Array.h.

◆ test_any() [3/3]

template<typename T>
bool Array< T >::test_any ( bool(&)(const T &)  fcn) const
inlineinherited

Overloads for function references.

Definition at line 828 of file Array.h.

◆ transpose()

template<typename T>
MDiagArray2<T> MDiagArray2< T >::transpose ( void  ) const
inline

◆ xelem() [1/8]

template<typename T>
T DiagArray2< T >::xelem ( octave_idx_type  r,
octave_idx_type  c 
) const
inlineinherited

Definition at line 145 of file DiagArray2.h.

◆ xelem() [2/8]

template<typename T>
T& Array< T >::xelem ( octave_idx_type  n)
inlineinherited

Definition at line 458 of file Array.h.

Referenced by intNDArray< OCTAVE_INT_T >::abs(), dim_vector::as_column(), dim_vector::as_row(), octave::type_info::assign_ops_map(), octave::type_info::assignany_ops_map(), octave::type_info::binary_ops_map(), column_norms(), octave::type_info::compound_binary_ops_map(), DiagArray2< Complex >::dgxelem(), do_numeric_lookup(), dim_vector::elem(), Array< octave_value >::elem(), dim_vector::empty_2d(), F__octave_link_file_dialog__(), F__octave_link_input_dialog__(), F__octave_link_list_dialog__(), find_nonzero_elem_idx(), dim_vector::first_non_singleton(), qr< T >::form(), Gamd(), octave::math::lu< T >::getp(), idx_vector::idx_vector_rep::idx_vector_rep(), idx_vector::inverse_permutation(), dim_vector::is_nd_vector(), dim_vector::isvector(), kron(), LuAminusSigmaB(), octave::type_info::non_const_unary_ops_map(), norm1(), octave::octave_jit_paren_scalar(), octave::octave_jit_paren_scalar_subsasgn(), octave::octave_jit_paren_subsasgn_matrix_range(), 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< DiagMatrix, Matrix >::permute(), octave::math::sparse_qr< SPARSE_T >::sparse_qr_rep< SPARSE_T >::Pinv(), octave::math::sparse_lu< lu_type >::Pr_vec(), put_int(), read_mat_binary_data(), row_norms(), intNDArray< OCTAVE_INT_T >::signum(), idx_vector::idx_range_rep::sort_idx(), idx_vector::idx_mask_rep::sort_idx(), octave::type_info::unary_ops_map(), DiagArray2< Complex >::xelem(), octave_value_list::xelem(), and dim_vector::zero_by_zero().

◆ xelem() [3/8]

template<typename T>
crefT Array< T >::xelem ( octave_idx_type  n) const
inlineinherited

Definition at line 459 of file Array.h.

◆ xelem() [4/8]

template<typename T>
T& Array< T >::xelem ( octave_idx_type  i,
octave_idx_type  j 
)
inlineinherited

Definition at line 461 of file Array.h.

◆ xelem() [5/8]

template<typename T>
T& Array< T >::xelem ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
)
inlineinherited

Definition at line 466 of file Array.h.

◆ xelem() [6/8]

template<typename T>
crefT Array< T >::xelem ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
) const
inlineinherited

Definition at line 468 of file Array.h.

◆ xelem() [7/8]

template<typename T>
T& Array< T >::xelem ( const Array< octave_idx_type > &  ra_idx)
inlineinherited

Definition at line 471 of file Array.h.

◆ xelem() [8/8]

template<typename T>
crefT Array< T >::xelem ( const Array< octave_idx_type > &  ra_idx) const
inlineinherited

Definition at line 474 of file Array.h.

Friends And Related Function Documentation

◆ operator* [1/2]

template<typename T>
MDiagArray2<T> operator* ( const MDiagArray2< T > &  ,
const T &   
)
friend

Definition at line 63 of file MDiagArray2.cc.

◆ operator* [2/2]

template<typename T>
MDiagArray2<T> operator* ( const T &  ,
const MDiagArray2< T > &   
)
friend

Definition at line 70 of file MDiagArray2.cc.

◆ operator+ [1/2]

template<typename T>
MDiagArray2<T> operator+ ( const MDiagArray2< T > &  )
friend

Definition at line 97 of file MDiagArray2.cc.

◆ operator+ [2/2]

template<typename T>
MDiagArray2<T> operator+ ( const MDiagArray2< T > &  ,
const MDiagArray2< T > &   
)
friend

Definition at line 89 of file MDiagArray2.cc.

◆ operator- [1/2]

template<typename T>
MDiagArray2<T> operator- ( const MDiagArray2< T > &  )
friend

Definition at line 104 of file MDiagArray2.cc.

◆ operator- [2/2]

template<typename T>
MDiagArray2<T> operator- ( const MDiagArray2< T > &  ,
const MDiagArray2< T > &   
)
friend

Definition at line 90 of file MDiagArray2.cc.

◆ operator/

template<typename T>
MDiagArray2<T> operator/ ( const MDiagArray2< T > &  ,
const T &   
)
friend

Definition at line 64 of file MDiagArray2.cc.

◆ product

template<typename T>
MDiagArray2<T> product ( const MDiagArray2< T > &  ,
const MDiagArray2< T > &   
)
friend

Definition at line 91 of file MDiagArray2.cc.

Member Data Documentation

◆ d1

template<typename T>
octave_idx_type DiagArray2< T >::d1
protectedinherited

Definition at line 43 of file DiagArray2.h.

◆ d2

template<typename T>
octave_idx_type DiagArray2< T >::d2
protectedinherited

Definition at line 43 of file DiagArray2.h.

◆ dimensions

template<typename T>
dim_vector Array< T >::dimensions
protectedinherited

Definition at line 216 of file Array.h.

Referenced by Array< octave_value >::Array(), and Array< octave_value >::jit_dimensions().

◆ rep

◆ slice_data

template<typename T>
T* Array< T >::slice_data
protectedinherited

Definition at line 227 of file Array.h.

Referenced by Array< octave_value >::Array(), and Array< octave_value >::jit_slice_data().

◆ slice_len

template<typename T>
octave_idx_type Array< T >::slice_len
protectedinherited

Definition at line 228 of file Array.h.


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