24 #if ! defined (octave_MDiagArray2_h) 25 #define octave_MDiagArray2_h 1 27 #include "octave-config.h" 90 const T *
d = this->
data ();
96 return std::count_if (
d,
d + nel,
126 #define MDIAGARRAY2_FORWARD_DEFS(B, R, T) \ 128 operator + (const R& x) \ 130 return R (operator + (dynamic_cast<const B<T>&> (x))); \ 133 operator - (const R& x) \ 135 return R (operator - (dynamic_cast<const B<T>&> (x))); \ 138 operator * (const R& x, const T& y) \ 140 return R (operator * (dynamic_cast<const B<T>&> (x), (y))); \ 143 operator / (const R& x, const T& y) \ 145 return R (operator / (dynamic_cast<const B<T>&> (x), (y))); \ 148 operator * (const T& x, const R& y) \ 150 return R (operator * ( (x), dynamic_cast<const B<T>&> (y))); \ 153 operator + (const R& x, const R& y) \ 155 return R (operator + (dynamic_cast<const B<T>&> (x), \ 156 dynamic_cast<const B<T>&> (y))); \ 159 operator - (const R& x, const R& y) \ 161 return R (operator - (dynamic_cast<const B<T>&> (x), \ 162 dynamic_cast<const B<T>&> (y))); \ 165 product (const R& x, const R& y) \ 167 return R (product (dynamic_cast<const B<T>&> (x), \ 168 dynamic_cast<const B<T>&> (y))); \ MDiagArray2< T > product(const MDiagArray2< T > &, const MDiagArray2< T > &)
Template for N-dimensional array classes with like-type math operators.
MDiagArray2(octave_idx_type r, octave_idx_type c)
MDiagArray2(octave_idx_type r, octave_idx_type c, const T &val)
identity matrix If supplied two scalar respectively For allows like xample val
MDiagArray2< T > operator*(const MDiagArray2< T > &, const T &)
~MDiagArray2(void)=default
OCTAVE_EXPORT octave_value_list or N dimensional array whose elements are all equal to the IEEE symbol zero divided by zero($0/0$)
DiagArray2< T > transpose(void) const
bool is_multiple_of_identity(T val) const
MDiagArray2< T > operator-(const MDiagArray2< T > &)
octave_idx_type nnz(void) const
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit and then converted to the native representation Opening a file that is already open simply opens it again and returns a separate file id It is not an error to open a file several though writing to the same file through several different file ids may produce unexpected results The possible values of text mode reading and writing automatically converts linefeeds to the appropriate line end character for the you may append a you must also open the file in binary mode The parameter conversions are currently only supported for and permissions will be set to and then everything is written in a single operation This is very efficient and improves performance c
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
DiagArray2< T > hermitian(T(*fcn)(const T &)=nullptr) const
Template for two dimensional diagonal array with math operators.
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
MArray< T > diag(octave_idx_type k=0) const
DiagArray2< T > & operator=(const DiagArray2< T > &a)
MDiagArray2< T > operator/(const MDiagArray2< T > &, const T &)
MDiagArray2< T > & operator=(const MDiagArray2< T > &a)
N Dimensional Array with copy-on-write semantics.
MDiagArray2< T > transpose(void) const
MDiagArray2(const Array< T > &a)
Array< T > extract_diag(octave_idx_type k=0) const
MArray< T > array_value() const
MDiagArray2(const DiagArray2< T > &a)
MDiagArray2(const MDiagArray2< T > &a)
MDiagArray2< T > operator+(const MDiagArray2< T > &)
MDiagArray2< T > hermitian(T(*fcn)(const T &)=nullptr) const
Array< T > array_value(void) const
MDiagArray2(const Array< T > &a, octave_idx_type r, octave_idx_type c)
const T * data(void) const
MDiagArray2(const DiagArray2< U > &a)