26 #if ! defined (octave_DiagArray2_h)
27 #define octave_DiagArray2_h 1
29 #include "octave-config.h"
51 :
Array<T> (), d1 (0), d2 (0) { }
65 :
Array<T> (a), d1 (a.d1), d2 (a.d2) { }
69 :
Array<T> (a.extract_diag ()), d1 (a.dim1 ()), d2 (a.dim2 ()) { }
104 int ndims (
void)
const {
return 2; }
130 {
return check_idx (
r, c) ?
elem (
r, c) : T (0); }
164 DiagArray2<T> hermitian (T (*fcn) (
const T&) =
nullptr)
const;
174 void print_info (std::ostream& os,
const std::string& prefix)
const
charNDArray min(char d, const charNDArray &m)
N Dimensional Array with copy-on-write semantics.
T & xelem(octave_idx_type n)
Size of the specified dimension.
octave_idx_type numel(void) const
Number of elements in the array.
Array< T > & operator=(const Array< T > &a)
T & elem(octave_idx_type n)
Size of the specified dimension.
size_t byte_size(void) const
Size of the specified dimension.
const T * data(void) const
Size of the specified dimension.
void print_info(std::ostream &os, const std::string &prefix) const
Size of the specified dimension.
const T * fortran_vec(void) const
Size of the specified dimension.
T & dgelem(octave_idx_type i)
octave_idx_type diag_length(void) const
void print_info(std::ostream &os, const std::string &prefix) const
dim_vector dims(void) const
size_t byte_size(void) const
T dgelem(octave_idx_type i) const
DiagArray2(octave_idx_type r, octave_idx_type c, const T &val)
octave_idx_type dim1(void) const
void resize(octave_idx_type n, octave_idx_type m)
T elem(octave_idx_type r, octave_idx_type c) const
DiagArray2< T > build_diag_matrix() const
T checkelem(octave_idx_type r, octave_idx_type c) const
const T * data(void) const
octave_idx_type nelem(void) const
T & dgxelem(octave_idx_type i)
T xelem(octave_idx_type r, octave_idx_type c) const
octave_idx_type numel(void) const
octave_idx_type length(void) const
octave_idx_type cols(void) const
DiagArray2(const DiagArray2< T > &a)
DiagArray2(const Array< T > &a)
octave_idx_type columns(void) const
DiagArray2(octave_idx_type r, octave_idx_type c)
~DiagArray2(void)=default
octave_idx_type dim2(void) const
DiagArray2(const DiagArray2< U > &a)
octave_idx_type rows(void) const
const T * fortran_vec(void) const
T dgxelem(octave_idx_type i) const
Vector representing the dimensions (size) of an Array.
T::size_type numel(const T &str)
static void transpose(octave_idx_type N, const octave_idx_type *ridx, const octave_idx_type *cidx, octave_idx_type *ridx2, octave_idx_type *cidx2)