26 #if ! defined (octave_DiagArray2_h)
27 #define octave_DiagArray2_h 1
29 #include "octave-config.h"
52 :
Array<T> (), m_d1 (0), m_d2 (0) { }
66 :
Array<T> (a), m_d1 (a.m_d1), m_d2 (a.m_d2) { }
70 :
Array<T> (a.extract_diag ()), m_d1 (a.dim1 ()), m_d2 (a.dim2 ()) { }
105 int ndims (
void)
const {
return 2; }
131 {
return check_idx (
r, c) ?
elem (
r, c) : T (0); }
171 #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
172 OCTAVE_DEPRECATED (7,
"for read-only access, use 'data' method instead")
178 void print_info (std::ostream& os,
const std::string& prefix)
const
charNDArray min(char d, const charNDArray &m)
OCTARRAY_OVERRIDABLE_FUNC_API std::size_t byte_size(void) const
Size of the specified dimension.
OCTARRAY_OVERRIDABLE_FUNC_API const T * data(void) const
Size of the specified dimension.
OCTARRAY_OVERRIDABLE_FUNC_API octave_idx_type numel(void) const
Number of elements in the array.
OCTARRAY_API T * fortran_vec(void)
Size of the specified dimension.
Array< T, Alloc > & operator=(const Array< T, Alloc > &a)
OCTARRAY_API void print_info(std::ostream &os, const std::string &prefix) const
Size of the specified dimension.
OCTARRAY_OVERRIDABLE_FUNC_API T & elem(octave_idx_type n)
Size of the specified dimension.
OCTARRAY_OVERRIDABLE_FUNC_API T & xelem(octave_idx_type n)
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
T dgelem(octave_idx_type i) const
std::size_t byte_size(void) 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
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)