GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Macros | Functions
MArray.cc File Reference
#include "MArray.h"
#include "Array-util.h"
#include "lo-error.h"
#include <iostream>
Include dependency graph for MArray.cc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _idxadda_helper< T >
 
struct  _idxadds_helper< T >
 
struct  _idxbinop_helper< T, op >
 

Macros

#define MARRAY_NDND_OP(FCN, OP, FN)
 
#define MARRAY_NDS_OP(OP, FN)
 
#define MARRAY_SND_OP(OP, FN)
 

Functions

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

Macro Definition Documentation

#define MARRAY_NDND_OP (   FCN,
  OP,
  FN 
)
Value:
template <typename T> \
FCN (const MArray<T>& a, const MArray<T>& b) \
{ \
return do_mm_binary_op<T, T, T> (a, b, FN, FN, FN, #FCN); \
}
Definition: oct-parse.h:129
Template for N-dimensional array classes with like-type math operators.
Definition: MArray.h:32
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
Definition: cellfun.cc:398
b
Definition: cellfun.cc:398

Definition at line 336 of file MArray.cc.

#define MARRAY_NDS_OP (   OP,
  FN 
)
Value:
template <typename T> \
MArray<T> \
operator OP (const MArray<T>& a, const T& s) \
{ \
return do_ms_binary_op<T, T, T> (a, s, FN); \
}
Template for N-dimensional array classes with like-type math operators.
Definition: MArray.h:32
s
Definition: file-io.cc:2682
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
Definition: cellfun.cc:398

Definition at line 306 of file MArray.cc.

#define MARRAY_SND_OP (   OP,
  FN 
)
Value:
template <typename T> \
MArray<T> \
operator OP (const T& s, const MArray<T>& a) \
{ \
return do_sm_binary_op<T, T, T> (s, a, FN); \
}
Template for N-dimensional array classes with like-type math operators.
Definition: MArray.h:32
s
Definition: file-io.cc:2682
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
Definition: cellfun.cc:398

Definition at line 321 of file MArray.cc.

Function Documentation

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

Definition at line 316 of file MArray.cc.

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

Definition at line 331 of file MArray.cc.

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

Definition at line 238 of file MArray.cc.

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

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

Definition at line 314 of file MArray.cc.

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

Definition at line 329 of file MArray.cc.

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

Definition at line 344 of file MArray.cc.

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

Definition at line 351 of file MArray.cc.

References a.

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

Definition at line 216 of file MArray.cc.

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

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

Definition at line 262 of file MArray.cc.

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

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

Definition at line 315 of file MArray.cc.

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

Definition at line 330 of file MArray.cc.

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

Definition at line 345 of file MArray.cc.

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

Definition at line 358 of file MArray.cc.

References a, and mx_inline_uminus().

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

Definition at line 227 of file MArray.cc.

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

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

Definition at line 273 of file MArray.cc.

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

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

Definition at line 317 of file MArray.cc.

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

Definition at line 332 of file MArray.cc.

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

Definition at line 249 of file MArray.cc.

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

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

Definition at line 346 of file MArray.cc.

Referenced by product_eq().

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

Definition at line 284 of file MArray.cc.

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

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

Definition at line 347 of file MArray.cc.

Referenced by quotient_eq().

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

Definition at line 295 of file MArray.cc.

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