GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
MArray.h File Reference
#include "octave-config.h"
#include "Array.h"
#include "MArray-fwd.h"
#include "mx-inlines.cc"

Go to the source code of this file.

Classes

class  MArray< T >
 Template for N-dimensional array classes with like-type math operators. More...
 

Macros

#define INSTANTIATE_MARRAY_FRIENDS(T, API)
 
#define INSTANTIATE_MDIAGARRAY2_FRIENDS(T, API)
 
#define MARRAY_FORWARD_DEFS(B, R, T)
 

Functions

template<typename T >
MArray< T > operator* (const MArray< T > &, const T &)
 
template<typename T >
MArray< T > operator* (const T &, const MArray< T > &)
 
template<typename T >
MArray< T > & operator*= (MArray< T > &, const T &)
 
template<typename T >
MArray< T > operator+ (const MArray< T > &)
 
template<typename T >
MArray< T > operator+ (const MArray< T > &, const MArray< T > &)
 
template<typename T >
MArray< T > operator+ (const MArray< T > &, const T &)
 
template<typename T >
MArray< T > operator+ (const T &, const MArray< T > &)
 
template<typename T >
MArray< T > & operator+= (MArray< T > &, const MArray< T > &)
 
template<typename T >
MArray< T > & operator+= (MArray< T > &, const T &)
 
template<typename T >
MArray< T > operator- (const MArray< T > &)
 
template<typename T >
MArray< T > operator- (const MArray< T > &, const MArray< T > &)
 
template<typename T >
MArray< T > operator- (const MArray< T > &, const T &)
 
template<typename T >
MArray< T > operator- (const T &, const MArray< T > &)
 
template<typename T >
MArray< T > & operator-= (MArray< T > &, const MArray< T > &)
 
template<typename T >
MArray< T > & operator-= (MArray< T > &, const T &)
 
template<typename T >
MArray< T > operator/ (const MArray< T > &, const T &)
 
template<typename T >
MArray< T > operator/ (const T &, const MArray< T > &)
 
template<typename T >
MArray< T > & operator/= (MArray< T > &, const T &)
 
template<typename T >
MArray< T > product (const MArray< T > &, const MArray< T > &)
 
template<typename T >
MArray< T > & product_eq (MArray< T > &, const MArray< T > &)
 
template<typename T >
MArray< T > quotient (const MArray< T > &, const MArray< T > &)
 
template<typename T >
MArray< T > & quotient_eq (MArray< T > &, const MArray< T > &)
 

Macro Definition Documentation

◆ INSTANTIATE_MARRAY_FRIENDS

#define INSTANTIATE_MARRAY_FRIENDS (   T,
  API 
)
Value:
template API MArray<T>& operator += (MArray<T>&, const T&); \
template API MArray<T>& operator -= (MArray<T>&, const T&); \
template API MArray<T>& operator *= (MArray<T>&, const T&); \
template API MArray<T>& operator /= (MArray<T>&, const T&); \
template API MArray<T>& operator += (MArray<T>&, const MArray<T>&); \
template API MArray<T>& operator -= (MArray<T>&, const MArray<T>&); \
template API MArray<T>& product_eq (MArray<T>&, const MArray<T>&); \
template API MArray<T>& quotient_eq (MArray<T>&, const MArray<T>&); \
template API MArray<T> operator + (const MArray<T>&); \
template API MArray<T> operator - (const MArray<T>&); \
template API MArray<T> operator + (const MArray<T>&, const T&); \
template API MArray<T> operator - (const MArray<T>&, const T&); \
template API MArray<T> operator * (const MArray<T>&, const T&); \
template API MArray<T> operator / (const MArray<T>&, const T&); \
template API MArray<T> operator + (const T&, const MArray<T>&); \
template API MArray<T> operator - (const T&, const MArray<T>&); \
template API MArray<T> operator * (const T&, const MArray<T>&); \
template API MArray<T> operator / (const T&, const MArray<T>&); \
template API MArray<T> operator + (const MArray<T>&, const MArray<T>&); \
template API MArray<T> operator - (const MArray<T>&, const MArray<T>&); \
template API MArray<T> quotient (const MArray<T>&, const MArray<T>&); \
template API MArray<T> product (const MArray<T>&, const MArray<T>&);
MArray< T > & product_eq(MArray< T > &, const MArray< T > &)
Definition: MArray.cc:297
MArray< T > quotient(const MArray< T > &, const MArray< T > &)
Definition: MArray.cc:360
MArray< T > & quotient_eq(MArray< T > &, const MArray< T > &)
Definition: MArray.cc:308
MArray< T > operator/(const MArray< T > &, const T &)
Definition: MArray.cc:330
MArray< T > operator-(const MArray< T > &)
Definition: MArray.cc:371
MArray< T > & operator+=(MArray< T > &, const T &)
Definition: MArray.cc:229
MArray< T > & operator/=(MArray< T > &, const T &)
Definition: MArray.cc:262
MArray< T > & operator*=(MArray< T > &, const T &)
Definition: MArray.cc:251
MArray< T > & operator-=(MArray< T > &, const T &)
Definition: MArray.cc:240
MArray< T > operator*(const MArray< T > &, const T &)
Definition: MArray.cc:329
MArray< T > operator+(const MArray< T > &)
Definition: MArray.cc:364
MArray< T > product(const MArray< T > &, const MArray< T > &)
Definition: MArray.cc:359
Template for N-dimensional array classes with like-type math operators.
Definition: MArray.h:63

Definition at line 229 of file MArray.h.

◆ INSTANTIATE_MDIAGARRAY2_FRIENDS

#define INSTANTIATE_MDIAGARRAY2_FRIENDS (   T,
  API 
)
Value:
template API MDiagArray2<T> operator + (const MDiagArray2<T>&); \
template API MDiagArray2<T> operator - (const MDiagArray2<T>&); \
template API MDiagArray2<T> operator * (const MDiagArray2<T>&, const T&); \
template API MDiagArray2<T> operator / (const MDiagArray2<T>&, const T&); \
template API MDiagArray2<T> operator * (const T&, const MDiagArray2<T>&); \
template API MDiagArray2<T> operator + (const MDiagArray2<T>&, \
const MDiagArray2<T>&); \
template API MDiagArray2<T> operator - (const MDiagArray2<T>&, \
const MDiagArray2<T>&); \
template API MDiagArray2<T> product (const MDiagArray2<T>&, \
const MDiagArray2<T>&);
Template for two dimensional diagonal array with math operators.
Definition: MDiagArray2.h:56

Definition at line 254 of file MArray.h.

◆ MARRAY_FORWARD_DEFS

#define MARRAY_FORWARD_DEFS (   B,
  R,
 
)

Definition at line 130 of file MArray.h.

Function Documentation

◆ operator*() [1/2]

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

Definition at line 329 of file MArray.cc.

◆ operator*() [2/2]

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

Definition at line 344 of file MArray.cc.

◆ operator*=()

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

Definition at line 251 of file MArray.cc.

References Array< T, Alloc >::is_shared(), and mx_inline_mul2().

◆ operator+() [1/4]

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

Definition at line 364 of file MArray.cc.

◆ operator+() [2/4]

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

Definition at line 357 of file MArray.cc.

◆ operator+() [3/4]

template<typename T >
MArray<T> operator+ ( const MArray< T > &  a,
const T &  s 
)

Definition at line 327 of file MArray.cc.

◆ operator+() [4/4]

template<typename T >
MArray<T> operator+ ( const T &  s,
const MArray< T > &  a 
)

Definition at line 342 of file MArray.cc.

◆ operator+=() [1/2]

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

Definition at line 275 of file MArray.cc.

References Array< T, Alloc >::is_shared(), and mx_inline_add2().

◆ operator+=() [2/2]

template<typename T >
MArray<T>& operator+= ( MArray< T > &  a,
const T &  s 
)

Definition at line 229 of file MArray.cc.

References Array< T, Alloc >::is_shared(), and mx_inline_add2().

◆ operator-() [1/4]

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

Definition at line 371 of file MArray.cc.

References mx_inline_uminus().

◆ operator-() [2/4]

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

Definition at line 358 of file MArray.cc.

◆ operator-() [3/4]

template<typename T >
MArray<T> operator- ( const MArray< T > &  a,
const T &  s 
)

Definition at line 328 of file MArray.cc.

◆ operator-() [4/4]

template<typename T >
MArray<T> operator- ( const T &  s,
const MArray< T > &  a 
)

Definition at line 343 of file MArray.cc.

◆ operator-=() [1/2]

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

Definition at line 286 of file MArray.cc.

References Array< T, Alloc >::is_shared(), and mx_inline_sub2().

◆ operator-=() [2/2]

template<typename T >
MArray<T>& operator-= ( MArray< T > &  a,
const T &  s 
)

Definition at line 240 of file MArray.cc.

References Array< T, Alloc >::is_shared(), and mx_inline_sub2().

◆ operator/() [1/2]

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

Definition at line 330 of file MArray.cc.

◆ operator/() [2/2]

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

Definition at line 345 of file MArray.cc.

◆ operator/=()

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

Definition at line 262 of file MArray.cc.

References Array< T, Alloc >::is_shared(), and mx_inline_div2().

◆ product()

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

Definition at line 359 of file MArray.cc.

Referenced by product_eq().

◆ product_eq()

template<typename T >
MArray<T>& product_eq ( MArray< T > &  a,
const MArray< T > &  b 
)

Definition at line 297 of file MArray.cc.

References Array< T, Alloc >::is_shared(), mx_inline_mul2(), and product().

◆ quotient()

template<typename T >
MArray<T> quotient ( const MArray< T > &  a,
const MArray< T > &  b 
)

Definition at line 360 of file MArray.cc.

Referenced by quotient_eq().

◆ quotient_eq()

template<typename T >
MArray<T>& quotient_eq ( MArray< T > &  a,
const MArray< T > &  b 
)

Definition at line 308 of file MArray.cc.

References Array< T, Alloc >::is_shared(), mx_inline_div2(), and quotient().