Navigation

Operators and Keywords

Function List:

C++ API

Array< T > Class Template Reference

#include <Array.h>

Inherited by Array3< T >, DiagArray2< T > [protected], and MArray< T >.

Collaboration diagram for Array< T >:

List of all members.

Classes

class  ArrayRep

Public Types

typedef T element_type
typedef ref_param< T >::type crefT
typedef bool(* compare_fcn_type )(typename ref_param< T >::type, typename ref_param< T >::type)

Public Member Functions

void make_unique (void)
 Array (void)
 Array (octave_idx_type n) GCC_ATTR_DEPRECATED
 Array (octave_idx_type n, const T &val) GCC_ATTR_DEPRECATED
 Array (const dim_vector &dv)
 Array (const dim_vector &dv, const T &val)
 Array (const Array< T > &a, const dim_vector &dv)
template<class U >
 Array (const Array< U > &a)
 Array (const Array< T > &a)
 ~Array (void)
Array< T > & operator= (const Array< T > &a)
void fill (const T &val)
void clear (void)
void clear (const dim_vector &dv)
void clear (octave_idx_type r, octave_idx_type c)
octave_idx_type capacity (void) const
octave_idx_type length (void) const
octave_idx_type nelem (void) const
octave_idx_type numel (void) const
octave_idx_type dim1 (void) const
octave_idx_type dim2 (void) const
octave_idx_type dim3 (void) const
Array< T > as_column (void) const
Array< T > as_row (void) const
Array< T > as_matrix (void) const
octave_idx_type rows (void) const
octave_idx_type cols (void) const
octave_idx_type columns (void) const
octave_idx_type pages (void) const
size_t byte_size (void) const
const dim_vectordims (void) const
Array< T > squeeze (void) const
void chop_trailing_singletons (void) GCC_ATTR_DEPRECATED
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 & xelem (octave_idx_type n)
crefT xelem (octave_idx_type n) const
T & xelem (octave_idx_type i, octave_idx_type j)
crefT xelem (octave_idx_type i, octave_idx_type j) const
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
T & checkelem (octave_idx_type n)
T & checkelem (octave_idx_type i, octave_idx_type j)
T & checkelem (octave_idx_type i, octave_idx_type j, octave_idx_type k)
T & checkelem (const Array< octave_idx_type > &ra_idx)
T & elem (octave_idx_type n)
T & elem (octave_idx_type i, octave_idx_type j)
T & elem (octave_idx_type i, octave_idx_type j, octave_idx_type k)
T & elem (const Array< octave_idx_type > &ra_idx)
T & operator() (octave_idx_type n)
T & operator() (octave_idx_type i, octave_idx_type j)
T & operator() (octave_idx_type i, octave_idx_type j, octave_idx_type k)
T & operator() (const Array< octave_idx_type > &ra_idx)
crefT checkelem (octave_idx_type n) const
crefT checkelem (octave_idx_type i, octave_idx_type j) 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
crefT elem (octave_idx_type n) const
crefT elem (octave_idx_type i, octave_idx_type j) 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
crefT operator() (octave_idx_type n) const
crefT operator() (octave_idx_type i, octave_idx_type j) 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
Array< T > column (octave_idx_type k) const
Array< T > page (octave_idx_type k) const
Array< T > linear_slice (octave_idx_type lo, octave_idx_type up) const
Array< T > reshape (octave_idx_type nr, octave_idx_type nc) const
Array< T > reshape (const dim_vector &new_dims) const
Array< T > permute (const Array< octave_idx_type > &vec, bool inv=false) const
Array< T > ipermute (const Array< octave_idx_type > &vec) const
bool is_square (void) const
bool is_empty (void) const
bool is_vector (void) const
Array< T > transpose (void) const
Array< T > hermitian (T(*fcn)(const T &)=0) const
const T * data (void) const
const T * fortran_vec (void) const
T * fortran_vec (void)
bool is_shared (void)
int ndims (void) const
Array< T > index (const idx_vector &i) const
Array< T > index (const idx_vector &i, const idx_vector &j) const
Array< T > index (const Array< idx_vector > &ia) const
void resize1 (octave_idx_type n, const T &rfv=resize_fill_value())
void resize (octave_idx_type n) GCC_ATTR_DEPRECATED
void resize (octave_idx_type nr, octave_idx_type nc, const T &rfv=resize_fill_value()) GCC_ATTR_DEPRECATED
void resize (const dim_vector &dv, const T &rfv=resize_fill_value())
Array< T > index (const idx_vector &i, bool resize_ok, const T &rfv=resize_fill_value()) const
Array< T > index (const idx_vector &i, const idx_vector &j, bool resize_ok, const T &rfv=resize_fill_value()) const
Array< T > index (const Array< idx_vector > &ia, bool resize_ok, const T &rfv=resize_fill_value()) const
void assign (const idx_vector &i, const Array< T > &rhs, const T &rfv=resize_fill_value())
void assign (const idx_vector &i, const idx_vector &j, const Array< T > &rhs, const T &rfv=resize_fill_value())
void assign (const Array< idx_vector > &ia, const Array< T > &rhs, const T &rfv=resize_fill_value())
void delete_elements (const idx_vector &i)
void delete_elements (int dim, const idx_vector &i)
void delete_elements (const Array< idx_vector > &ia)
Array< T > & insert (const Array< T > &a, const Array< octave_idx_type > &idx)
Array< T > & insert (const Array< T > &a, octave_idx_type r, octave_idx_type c)
void maybe_economize (void)
void print_info (std::ostream &os, const std::string &prefix) const
void * mex_get_data (void) 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
sortmode is_sorted (sortmode mode=UNSORTED) const
Array< octave_idx_typesort_rows_idx (sortmode mode=ASCENDING) const
sortmode is_sorted_rows (sortmode mode=UNSORTED) const
octave_idx_type lookup (const T &value, sortmode mode=UNSORTED) const
Array< octave_idx_typelookup (const Array< T > &values, sortmode mode=UNSORTED) const
octave_idx_type nnz (void) const
Array< octave_idx_typefind (octave_idx_type n=-1, bool backward=false) const
Array< T > nth_element (const idx_vector &n, int dim=0) const
Array< T > diag (octave_idx_type k=0) const
template<class U , class F >
Array< U > map (F fcn) const
template<class U >
Array< U > map (U(&fcn)(T)) const
template<class U >
Array< U > map (U(&fcn)(const T &)) const
template<class F , bool zero>
bool test (F fcn) const
template<class F >
bool test_any (F fcn) const
template<class F >
bool test_all (F fcn) const
bool test_any (bool(&fcn)(T)) const
bool test_any (bool(&fcn)(const T &)) const
bool test_all (bool(&fcn)(T)) const
bool test_all (bool(&fcn)(const T &)) const
bool optimize_dimensions (const dim_vector &dv)

Static Public Member Functions

static const T & resize_fill_value ()
static Array< T > cat (int dim, octave_idx_type n, const Array< T > *array_list)

Protected Member Functions

 Array (const Array< T > &a, const dim_vector &dv, octave_idx_type l, octave_idx_type u)

Protected Attributes

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

Friends

class Array

template<class T>
class Array< T >


Member Typedef Documentation

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

Constructor & Destructor Documentation

template<class T>
Array< T >::Array ( const Array< T > &  a,
const dim_vector dv,
octave_idx_type  l,
octave_idx_type  u 
) [inline, protected]
template<class T>
Array< T >::Array ( void   )  [inline]
template<class T>
Array< T >::Array ( octave_idx_type  n  )  [inline, explicit]
template<class T>
Array< T >::Array ( octave_idx_type  n,
const T &  val 
) [inline, explicit]
template<class T>
Array< T >::Array ( const dim_vector dv  )  [inline, explicit]
template<class T>
Array< T >::Array ( const dim_vector dv,
const T &  val 
) [inline, explicit]
template<class T>
Array< T >::Array ( const Array< T > &  a,
const dim_vector dv 
)
template<class T>
template<class U >
Array< T >::Array ( const Array< U > &  a  )  [inline]
template<class T>
Array< T >::Array ( const Array< T > &  a  )  [inline]
template<class T>
Array< T >::~Array ( void   )  [inline]

Member Function Documentation

template<class T>
Array<T> Array< T >::as_column ( void   )  const [inline]
template<class T>
Array<T> Array< T >::as_matrix ( void   )  const [inline]
template<class T>
Array<T> Array< T >::as_row ( void   )  const [inline]
template<class T>
void Array< T >::assign ( const idx_vector i,
const Array< T > &  rhs,
const T &  rfv = resize_fill_value () 
)
template<class T>
void Array< T >::assign ( const idx_vector i,
const idx_vector j,
const Array< T > &  rhs,
const T &  rfv = resize_fill_value () 
)
template<class T>
void Array< T >::assign ( const Array< idx_vector > &  ia,
const Array< T > &  rhs,
const T &  rfv = resize_fill_value () 
)
template<class T>
size_t Array< T >::byte_size ( void   )  const [inline]
template<class T>
octave_idx_type Array< T >::capacity ( void   )  const [inline]
template<class T>
Array< T > Array< T >::cat ( int  dim,
octave_idx_type  n,
const Array< T > *  array_list 
) [static]
template<class T >
T & Array< T >::checkelem ( octave_idx_type  n  ) 
template<class T >
T & Array< T >::checkelem ( octave_idx_type  i,
octave_idx_type  j 
)
template<class T >
T & Array< T >::checkelem ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
)
template<class T >
T & Array< T >::checkelem ( const Array< octave_idx_type > &  ra_idx  ) 
template<class T >
Array< T >::crefT Array< T >::checkelem ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
) const
template<class T >
Array< T >::crefT Array< T >::checkelem ( octave_idx_type  n  )  const
template<class T >
Array< T >::crefT Array< T >::checkelem ( const Array< octave_idx_type > &  ra_idx  )  const
template<class T>
void Array< T >::chop_trailing_singletons ( void   )  [inline]
template<class T >
void Array< T >::clear ( const dim_vector dv  ) 
template<class T>
void Array< T >::clear ( octave_idx_type  r,
octave_idx_type  c 
) [inline]
template<class T >
void Array< T >::clear ( void   ) 
template<class T>
octave_idx_type Array< T >::cols ( void   )  const [inline]
template<class T >
Array< T > Array< T >::column ( octave_idx_type  k  )  const
template<class T>
octave_idx_type Array< T >::columns ( void   )  const [inline]
template<class T >
octave_idx_type Array< T >::compute_index ( octave_idx_type  i,
octave_idx_type  j 
) const
template<class T >
octave_idx_type Array< T >::compute_index ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
) const
template<class T >
octave_idx_type Array< T >::compute_index ( const Array< octave_idx_type > &  ra_idx  )  const
template<class T>
octave_idx_type Array< T >::compute_index_unchecked ( const Array< octave_idx_type > &  ra_idx  )  const [inline]
template<class T>
const T* Array< T >::data ( void   )  const [inline]
template<class T >
void Array< T >::delete_elements ( const idx_vector i  ) 
template<class T >
void Array< T >::delete_elements ( int  dim,
const idx_vector i 
)
template<class T >
void Array< T >::delete_elements ( const Array< idx_vector > &  ia  ) 
template<class T>
octave_idx_type Array< T >::dim1 ( void   )  const [inline]
template<class T>
octave_idx_type Array< T >::dim2 ( void   )  const [inline]
template<class T>
octave_idx_type Array< T >::dim3 ( void   )  const [inline]
template<class T>
const dim_vector& Array< T >::dims ( void   )  const [inline]
template<class T>
T& Array< T >::elem ( octave_idx_type  n  )  [inline]
template<class T>
T& Array< T >::elem ( octave_idx_type  i,
octave_idx_type  j 
) [inline]
template<class T>
T& Array< T >::elem ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
) [inline]
template<class T>
T& Array< T >::elem ( const Array< octave_idx_type > &  ra_idx  )  [inline]
template<class T>
crefT Array< T >::elem ( octave_idx_type  n  )  const [inline]
template<class T>
crefT Array< T >::elem ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
) const [inline]
template<class T>
crefT Array< T >::elem ( const Array< octave_idx_type > &  ra_idx  )  const [inline]
template<class T>
void Array< T >::fill ( const T &  val  ) 
template<class T >
Array< octave_idx_type > Array< T >::find ( octave_idx_type  n = -1,
bool  backward = false 
) const
template<class T>
const T* Array< T >::fortran_vec ( void   )  const [inline]
template<class T >
T * Array< T >::fortran_vec ( void   ) 
template<class T >
Array< T > Array< T >::index ( const idx_vector i  )  const
template<class T >
Array< T > Array< T >::index ( const idx_vector i,
const idx_vector j 
) const
template<class T >
Array< T > Array< T >::index ( const Array< idx_vector > &  ia  )  const
template<class T>
Array< T > Array< T >::index ( const idx_vector i,
const idx_vector j,
bool  resize_ok,
const T &  rfv = resize_fill_value () 
) const
template<class T>
Array< T > Array< T >::index ( const idx_vector i,
bool  resize_ok,
const T &  rfv = resize_fill_value () 
) const
template<class T>
Array< T > Array< T >::index ( const Array< idx_vector > &  ia,
bool  resize_ok,
const T &  rfv = resize_fill_value () 
) const
template<class T>
Array< T > & Array< T >::insert ( const Array< T > &  a,
const Array< octave_idx_type > &  idx 
)
template<class T>
Array< T > & Array< T >::insert ( const Array< T > &  a,
octave_idx_type  r,
octave_idx_type  c 
)
template<class T>
bool Array< T >::is_empty ( void   )  const [inline]
template<class T>
bool Array< T >::is_shared ( void   )  [inline]
template<class T >
sortmode Array< T >::is_sorted ( sortmode  mode = UNSORTED  )  const
template<class T >
sortmode Array< T >::is_sorted_rows ( sortmode  mode = UNSORTED  )  const
template<class T>
bool Array< T >::is_square ( void   )  const [inline]
template<class T>
bool Array< T >::is_vector ( void   )  const [inline]
template<class T>
octave_idx_type Array< T >::length ( void   )  const [inline]
template<class T >
Array< T > Array< T >::linear_slice ( octave_idx_type  lo,
octave_idx_type  up 
) const
template<class T>
octave_idx_type Array< T >::lookup ( const T &  value,
sortmode  mode = UNSORTED 
) const
template<class T>
Array< octave_idx_type > Array< T >::lookup ( const Array< T > &  values,
sortmode  mode = UNSORTED 
) const
template<class T>
void Array< T >::make_unique ( void   )  [inline]
template<class T>
template<class U >
Array<U> Array< T >::map ( U(&)(T)  fcn  )  const [inline]
template<class T>
template<class U , class F >
Array<U> Array< T >::map ( fcn  )  const [inline]
template<class T>
template<class U >
Array<U> Array< T >::map ( U(&)(const T &)  fcn  )  const [inline]
template<class T>
void Array< T >::maybe_economize ( void   )  [inline]
template<class T>
void* Array< T >::mex_get_data ( void   )  const [inline]
template<class T>
int Array< T >::ndims ( void   )  const [inline]
template<class T>
octave_idx_type Array< T >::nelem ( void   )  const [inline]
template<class T >
Array< T > Array< T >::nth_element ( const idx_vector n,
int  dim = 0 
) const
template<class T>
octave_idx_type Array< T >::numel ( void   )  const [inline]
template<class T>
crefT Array< T >::operator() ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
) const [inline]
template<class T>
crefT Array< T >::operator() ( octave_idx_type  n  )  const [inline]
template<class T>
T& Array< T >::operator() ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
) [inline]
template<class T>
T& Array< T >::operator() ( octave_idx_type  n  )  [inline]
template<class T>
T& Array< T >::operator() ( octave_idx_type  i,
octave_idx_type  j 
) [inline]
template<class T>
T& Array< T >::operator() ( const Array< octave_idx_type > &  ra_idx  )  [inline]
template<class T>
crefT Array< T >::operator() ( octave_idx_type  i,
octave_idx_type  j 
) const [inline]
template<class T>
crefT Array< T >::operator() ( const Array< octave_idx_type > &  ra_idx  )  const [inline]
template<class T>
Array<T>& Array< T >::operator= ( const Array< T > &  a  )  [inline]
template<class T >
bool Array< T >::optimize_dimensions ( const dim_vector dv  ) 
template<class T >
Array< T > Array< T >::page ( octave_idx_type  k  )  const
template<class T>
octave_idx_type Array< T >::pages ( void   )  const [inline]
template<class T >
Array< T > Array< T >::permute ( const Array< octave_idx_type > &  vec,
bool  inv = false 
) const
template<class T >
void Array< T >::print_info ( std::ostream &  os,
const std::string &  prefix 
) const
template<class T>
Array<T> Array< T >::reshape ( octave_idx_type  nr,
octave_idx_type  nc 
) const [inline]
template<class T>
Array<T> Array< T >::reshape ( const dim_vector new_dims  )  const [inline]
template<class T>
void Array< T >::resize ( octave_idx_type  n  )  [inline]
template<class T>
void Array< T >::resize ( const dim_vector dv,
const T &  rfv = resize_fill_value () 
)
template<class T>
void Array< T >::resize ( octave_idx_type  nr,
octave_idx_type  nc,
const T &  rfv = resize_fill_value () 
) [inline]
template<class T>
void Array< T >::resize1 ( octave_idx_type  n,
const T &  rfv = resize_fill_value () 
)
template<class T>
octave_idx_type Array< T >::rows ( void   )  const [inline]
template<class T >
Array< T > Array< T >::sort ( int  dim = 0,
sortmode  mode = ASCENDING 
) const
template<class T >
Array< T > Array< T >::sort ( Array< octave_idx_type > &  sidx,
int  dim = 0,
sortmode  mode = ASCENDING 
) const
template<class T >
Array< octave_idx_type > Array< T >::sort_rows_idx ( sortmode  mode = ASCENDING  )  const
template<class T>
template<class F , bool zero>
bool Array< T >::test ( fcn  )  const [inline]
template<class T>
bool Array< T >::test_all ( bool(&)(T)  fcn  )  const [inline]
template<class T>
bool Array< T >::test_all ( bool(&)(const T &)  fcn  )  const [inline]
template<class T>
template<class F >
bool Array< T >::test_all ( fcn  )  const [inline]
template<class T>
bool Array< T >::test_any ( bool(&)(const T &)  fcn  )  const [inline]
template<class T>
template<class F >
bool Array< T >::test_any ( fcn  )  const [inline]
template<class T>
bool Array< T >::test_any ( bool(&)(T)  fcn  )  const [inline]
template<class T>
T& Array< T >::xelem ( octave_idx_type  n  )  [inline]
template<class T>
crefT Array< T >::xelem ( octave_idx_type  n  )  const [inline]
template<class T>
T& Array< T >::xelem ( octave_idx_type  i,
octave_idx_type  j 
) [inline]
template<class T>
crefT Array< T >::xelem ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
) const [inline]
template<class T>
crefT Array< T >::xelem ( octave_idx_type  i,
octave_idx_type  j 
) const [inline]
template<class T>
T& Array< T >::xelem ( const Array< octave_idx_type > &  ra_idx  )  [inline]
template<class T>
crefT Array< T >::xelem ( const Array< octave_idx_type > &  ra_idx  )  const [inline]
template<class T>
T& Array< T >::xelem ( octave_idx_type  i,
octave_idx_type  j,
octave_idx_type  k 
) [inline]

Friends And Related Function Documentation

template<class T>
friend class Array [friend]

Member Data Documentation

template<class T>
dim_vector Array< T >::dimensions [protected]
template<class T>
Array<T>::ArrayRep* Array< T >::rep [protected]
template<class T>
T* Array< T >::slice_data [protected]
template<class T>
octave_idx_type Array< T >::slice_len [protected]

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines