GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
MDiagArray2.cc File Reference
#include "MDiagArray2.h"
#include "Array-util.h"
#include "lo-error.h"
Include dependency graph for MDiagArray2.cc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MARRAY_DADA_OP(FCN, OP, FN)
 
#define MARRAY_DAS_OP(OP, FN)
 

Functions

template<typename T >
MDiagArray2< T > operator* (const MDiagArray2< T > &a, const T &s)
 
template<typename T >
MDiagArray2< T > operator* (const T &s, const MDiagArray2< T > &a)
 
template<typename T >
MDiagArray2< T > operator+ (const MDiagArray2< T > &a)
 
template<typename T >
MDiagArray2< T > operator+ (const MDiagArray2< T > &a, const MDiagArray2< T > &b)
 
template<typename T >
MDiagArray2< T > operator- (const MDiagArray2< T > &a)
 
template<typename T >
MDiagArray2< T > operator- (const MDiagArray2< T > &a, const MDiagArray2< T > &b)
 
template<typename T >
MDiagArray2< T > operator/ (const MDiagArray2< T > &a, const T &s)
 
template<typename T >
MDiagArray2< T > product (const MDiagArray2< T > &a, const MDiagArray2< T > &b)
 

Macro Definition Documentation

◆ MARRAY_DADA_OP

#define MARRAY_DADA_OP (   FCN,
  OP,
  FN 
)
Value:
template <typename T> \
FCN (const MDiagArray2<T>& a, const MDiagArray2<T>& b) \
{ \
if (a.d1 != b.d1 || a.d2 != b.d2) \
octave::err_nonconformant (#FCN, a.d1, a.d2, b.d1, b.d2); \
\
return MDiagArray2<T> (do_mm_binary_op<T, T, T> (a, b, FN, FN, FN, #FCN), a.d1, a.d2); \
}
Template for two dimensional diagonal array with math operators.
Definition: MDiagArray2.h:55
void err_nonconformant(const char *op, octave_idx_type op1_len, octave_idx_type op2_len)
@ FCN
Definition: oct-parse.h:138

Definition at line 80 of file MDiagArray2.cc.

◆ MARRAY_DAS_OP

#define MARRAY_DAS_OP (   OP,
  FN 
)
Value:
template <typename T> \
MDiagArray2<T> \
operator OP (const MDiagArray2<T>& a, const T& s) \
{ \
return MDiagArray2<T> (do_ms_binary_op<T, T, T> (a, s, FN), a.d1, a.d2); \
}

Definition at line 57 of file MDiagArray2.cc.

Function Documentation

◆ operator*() [1/2]

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

Definition at line 65 of file MDiagArray2.cc.

◆ operator*() [2/2]

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

Definition at line 72 of file MDiagArray2.cc.

◆ operator+() [1/2]

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

Definition at line 99 of file MDiagArray2.cc.

◆ operator+() [2/2]

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

Definition at line 91 of file MDiagArray2.cc.

◆ operator-() [1/2]

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

Definition at line 106 of file MDiagArray2.cc.

◆ operator-() [2/2]

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

Definition at line 92 of file MDiagArray2.cc.

◆ operator/()

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

Definition at line 66 of file MDiagArray2.cc.

◆ product()

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

Definition at line 93 of file MDiagArray2.cc.