codeare  1.2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Matrix< T, P, b > Class Template Reference

Matrix template.
Core data structure. More...

#include <Matrix.hpp>

+ Inheritance diagram for Matrix< T, P, b >:
+ Collaboration diagram for Matrix< T, P, b >:

Public Member Functions

Matrix< T, P > operator->* (const Matrix< T, P > &M) const
 Matrix product. i.e. this * M. More...
 
Matrix< T, P > prod (const Matrix< T, P > &M, const char transa= 'N', const char transb= 'N') const
 Matrix Product. More...
 
Matrix< T, P > prodt (const Matrix< T, P > &M) const
 Complex conjugate left and multiply with right. More...
 
dotc (const Matrix< T, P > &M) const
 Scalar product (complex: conjugate first vector) using BLAS routines XDOTC and XDOT. More...
 
dot (const Matrix< T, P > &M) const
 Scalar product using BLAS routines XDOTU and XDOT. More...
 
Matrix< cbooloperator== (const Matrix< T, P > &M) const NOEXCEPT
 Elementwise equality with scalar (lhs) More...
 
template<class S >
Matrix< cbooloperator== (const Matrix< S, P > &M) const NOEXCEPT
 Elementwise equality, result[i] = (this[i] == m[i]). i.e. this == m. More...
 
Matrix< cbooloperator== (const T s) const NOEXCEPT
 Scalar equality. result[i] = (this[i] == m). More...
 
Constructors and destructors

Constructors and destructors

 Matrix () NOEXCEPT
 Contruct 1-dim with single element. More...
 
 Matrix (const Vector< size_t > &dim) NOEXCEPT
 Construct matrix with aligned dimension vector. More...
 
 Matrix (const Vector< size_t > &dim, const Vector< float > &res) NOEXCEPT
 Construct matrix with dimension and resolution arrays. More...
 
 Matrix (const size_t n) NOEXCEPT
 Construct square 2D matrix. More...
 
 Matrix (const size_t m, const size_t n) NOEXCEPT
 Construct 2D matrix. More...
 
 Matrix (const size_t m, const size_t n, const size_t k) NOEXCEPT
 Construct 3D volume. More...
 
 Matrix (const size_t col, const size_t lin, const size_t cha, const size_t set, const size_t eco=1, const size_t phs=1, const size_t rep=1, const size_t seg=1, const size_t par=1, const size_t slc=1, const size_t ida=1, const size_t idb=1, const size_t idc=1, const size_t idd=1, const size_t ide=1, const size_t ave=1) NOEXCEPT
 Construct 4D volume. More...
 
Import export functions for ICE access specifiers.<br/>

Ice access specifiers can be handled in one of the following ways.
It is crucial to understand that the

size_t Import (const IceAs &ias, const size_t pos)
 
 Matrix (const IceAs &ias)
 
size_t Import (const IceAs &ias)
 
size_t Export (IceAs &ias) const
 
size_t Export (IceAs &ias, const size_t pos) const
 
Elementwise access

Elementwise access

operator[] (const size_t p) const NOEXCEPT
 Get copy of p-th element. More...
 
T & operator[] (const size_t p) NOEXCEPT
 Get reference to p-th element. More...
 
const T * Ptr (const size_t p=0) const NOEXCEPT
 Get pointer to memory starting at p-th (default:0) element. More...
 
T * Ptr (const size_t p=0) NOEXCEPT
 Get pointer to memory starting at p-th (default:0) element. More...
 
Vector< T > & Container () NOEXCEPT
 Data container (lhs) More...
 
Vector< T > Container () const NOEXCEPT
 Data container (rhs) More...
 
Vector< T >::iterator Begin () NOEXCEPT
 Container iterator to first element (lhs) More...
 
Vector< T >::const_iterator Begin () const NOEXCEPT
 Container const iterator to first element (rhs) More...
 
Vector< T >::iterator End () NOEXCEPT
 Container iterator to last element (lhs) More...
 
Vector< T >::const_iterator End () const NOEXCEPT
 Container const iterator to last element (rhs) More...
 
const T & At (const size_t p) const NOEXCEPT
 Element at position p (rhs) More...
 
T & At (const size_t pos) NOEXCEPT
 Element at position (lhs) More...
 
const T & At (const size_t x, const size_t y) const NOEXCEPT
 Get element in (first) slice (rhs) More...
 
T & At (const size_t x, const size_t y) NOEXCEPT
 
const T & At (const size_t x, const size_t y, const size_t z) const NOEXCEPT
 Get element in (first) volume (lhs) More...
 
T & At (const size_t x, const size_t y, const size_t z) NOEXCEPT
 
const T & At (const size_t x, const size_t y, const size_t z, const size_t w) const NOEXCEPT
 Reference to element in (first) volume (lhs) More...
 
T & At (const size_t x, const size_t y, const size_t z, const size_t w) NOEXCEPT
 
const T & At (const size_t col, const size_t lin, const size_t cha, const size_t set, const size_t eco, const size_t phs=0, const size_t rep=0, const size_t seg=0, const size_t par=0, const size_t slc=0, const size_t ida=0, const size_t idb=0, const size_t idc=0, const size_t idd=0, const size_t ide=0, const size_t ave=0) const NOEXCEPT
 Get value at position (lhs) More...
 
T & At (const size_t col, const size_t lin, const size_t cha, const size_t set, const size_t eco, const size_t phs=0, const size_t rep=0, const size_t seg=0, const size_t par=0, const size_t slc=0, const size_t ida=0, const size_t idb=0, const size_t idc=0, const size_t idd=0, const size_t ide=0, const size_t ave=0) NOEXCEPT
 
template<class S >
 operator Matrix< S, P > () const NOEXCEPT
 Cast operator. More...
 
Matrix< T > operator() (const Vector< size_t > &indices, size_t col=0) const NOEXCEPT
 Deliver range of values with indices. More...
 
Matrix< T > operator() (size_t row, const Vector< size_t > &indices) const NOEXCEPT
 Deliver range of values with indices. More...
 
Matrix< T > operator() (const Vector< size_t > &row_inds, const Vector< size_t > &col_inds) const NOEXCEPT
 Deliver range of values with indices. More...
 
const T & operator() (const size_t p) const NOEXCEPT
 
T & operator() (const size_t p) NOEXCEPT
 Get value of pth element of repository. More...
 
const T & operator() (const size_t x, const size_t y) const NOEXCEPT
 Get value in slice. More...
 
T & operator() (const size_t x, const size_t y) NOEXCEPT
 Reference to value in slice. More...
 
const T & operator() (const size_t x, const size_t y, const size_t z) const NOEXCEPT
 Get value in volume. More...
 
T & operator() (const size_t x, const size_t y, const size_t z) NOEXCEPT
 Reference to value in volume. More...
 
const T & operator() (const size_t x, const size_t y, const size_t z, const size_t w) const NOEXCEPT
 Get value in volume. More...
 
T & operator() (const size_t x, const size_t y, const size_t z, const size_t w) NOEXCEPT
 Reference to value in volume. More...
 
T & operator() (const size_t col, const size_t lin, const size_t cha, const size_t set, const size_t eco, const size_t phs=0, const size_t rep=0, const size_t seg=0, const size_t par=0, const size_t slc=0, const size_t ida=0, const size_t idb=0, const size_t idc=0, const size_t idd=0, const size_t ide=0, const size_t ave=0) NOEXCEPT
 Reference to element. More...
 
const T & operator() (const size_t col, const size_t lin, const size_t cha, const size_t set, const size_t eco, const size_t phs=0, const size_t rep=0, const size_t seg=0, const size_t par=0, const size_t slc=0, const size_t ida=0, const size_t idb=0, const size_t idc=0, const size_t idd=0, const size_t ide=0, const size_t ave=0) const NOEXCEPT
 Value at ... More...
 
Dimensions

Some convenience functions to access dimensionality

size_t Height () const NOEXCEPT
 Get number of rows, i.e. tmp = size(this); tmp(1). More...
 
size_t Width () const NOEXCEPT
 Get number of columns, i.e. tmp = size(this); tmp(2). More...
 
float Res (const size_t i) const NOEXCEPT
 Get resolution of a given dimension. More...
 
float & Res (const size_t i) NOEXCEPT
 Resolution of a given dimension. More...
 
const Vector< float > & Res () const NOEXCEPT
 Resolution array. More...
 
size_t Dim (const size_t i) const NOEXCEPT
 Get size a given dimension. More...
 
const Vector< size_t > & Dim () const NOEXCEPT
 Get dimension array. More...
 
size_t NDim () const NOEXCEPT
 
const Vector< size_t > & Dsz () const NOEXCEPT
 Get dimension sizes. More...
 
void Clear () NOEXCEPT
 Purge data and free RAM. More...
 
Other functions.

Other functions.

const char * GetClassName () const NOEXCEPT
 Who are we? More...
 
void SetClassName (const char *name) NOEXCEPT
 Who are we? More...
 
size_t Size () const NOEXCEPT
 Number of elements. More...
 
Some operators

Operator definitions. Needs big expansion still.

Matrix< T, P > & operator= (const Vector< T > &v) NOEXCEPT
 Assignment data. More...
 
const Matrix< T, P > & operator= (const T s) NOEXCEPT
 Assignment operator. Sets all elements s. More...
 
Matrix< T, P > operator- () const NOEXCEPT
 Unary minus (additive inverse) More...
 
Matrix< T, P > operator+ () const NOEXCEPT
 Unary plus. More...
 
Matrix< T, P > operator! () const NOEXCEPT
 Transposition / Complex conjugation. i.e. this'. More...
 
Matrix< cbooloperator!= (const T s) const NOEXCEPT
 Return a matrix with result[i] = (m[i] ? this[i] : 0). More...
 
Matrix< cbooloperator> (const T s) const NOEXCEPT
 Scalar greater comaprison, result[i] = (this[i] > m). i.e. this > m. More...
 
Matrix< cbooloperator>= (const T s) const NOEXCEPT
 Scalar greater or equal comparison. result[i] = (this[i] >= m). i.e. this >= m. More...
 
Matrix< cbooloperator<= (const T s) const NOEXCEPT
 Scalar minor or equal comparison. result[i] = (this[i] <= m). i.e. this <= m. More...
 
Matrix< cbooloperator< (const T s) const NOEXCEPT
 Scalar minor or equal comparison. result[i] = (this[i] < m). i.e. this < m. More...
 
Matrix< cbooloperator!= (const Matrix< T, P > &M) const NOEXCEPT
 Elementwise equality, result[i] = (this[i] != m[i]). i.e. this ~= m. More...
 
Matrix< cbooloperator>= (const Matrix< T, P > &M) const NOEXCEPT
 Matrix comparison, result[i] = (this[i] >= m[i]). i.e. this >= m. More...
 
Matrix< cbooloperator<= (const Matrix< T, P > &M) const NOEXCEPT
 Matrix comparison, result[i] = (this[i] <= m[i]). i.e. this <= m. More...
 
Matrix< cbooloperator> (const Matrix< T, P > &M) const NOEXCEPT
 Matrix comparison, result[i] = (this[i] > m[i]). i.e. this > m. More...
 
Matrix< cbooloperator< (const Matrix< T, P > &M) const NOEXCEPT
 Matrix comparison, result[i] = (this[i] < m[i]). i.e. this < m. More...
 
Matrix< cbooloperator|| (const Matrix< T, P > &M) const NOEXCEPT
 Matrix comparison, result[i] = (m[i] || this[i] ? 1 : 0). i.e. this | m. More...
 
Matrix< short > operator| (const Matrix< T, P > &rhs) const NOEXCEPT
 Matrix comparison, result[i] = (m[i] || this[i] ? 1 : 0). i.e. this | m. More...
 
Matrix< cbooloperator&& (const Matrix< T, P > &M) const NOEXCEPT
 Matrix comparison, result[i] = (m[i] && this[i] ? 1 : 0). i.e. this & m. More...
 
Matrix< T, P > operator^ (const float p) const NOEXCEPT
 Elementwise raise of power. i.e. this .^ p. More...
 
Matrix< T, P > & operator^= (const float p) NOEXCEPT
 Elementwise raise of power. i.e. this .^ p. More...
 
template<class S >
Matrix< T, P > operator+ (const S s) const NOEXCEPT
 Elementwise addition iof all elements with a scalar. More...
 
Matrix< T, P > & operator+= (const Matrix< T, P > &M) NOEXCEPT
 ELementwise multiplication and assignment operator. i.e. this = this .* M. More...
 
template<class S >
Matrix< T, P > & operator+= (const Matrix< S, P > &M) NOEXCEPT
 ELementwise multiplication and assignment operator. i.e. this = m. More...
 
template<class S >
Matrix< T, P > & operator+= (const S s) NOEXCEPT
 ELementwise addition with scalar and assignment operator. i.e. this = m. More...
 
template<class S >
Matrix< T, P > operator- (const S s) const NOEXCEPT
 Elementwise subtraction all elements by a scalar. More...
 
Matrix< T, P > & operator-= (const Matrix< T, P > &M) NOEXCEPT
 ELementwise multiplication and assignment operator. i.e. this = this .* M. More...
 
template<class S >
Matrix< T, P > & operator-= (const Matrix< S, P > &M) NOEXCEPT
 ELementwise multiplication and assignment operator. i.e. this = m. More...
 
template<class S >
Matrix< T, P > & operator-= (const S s) NOEXCEPT
 ELementwise substration with scalar and assignment operator. i.e. this = m. More...
 
template<class S >
Matrix< T, P > operator* (const S s) const NOEXCEPT
 Elementwise multiplication. i.e. this .* M. More...
 
Matrix< T, P > & operator*= (const Matrix< T, P > &M) NOEXCEPT
 ELementwise multiplication and assignment operator. i.e. this = this .* M. More...
 
template<class S >
Matrix< T, P > & operator*= (const Matrix< S, P > &M) NOEXCEPT
 ELementwise multiplication and assignment operator. i.e. this = this .* M. More...
 
template<class S >
Matrix< T, P > & operator*= (const S s) NOEXCEPT
 ELementwise multiplication with scalar and assignment operator. i.e. this *= s. More...
 
template<class S >
Matrix< T, P > operator/ (const S s) const NOEXCEPT
 Elementwise division by scalar. i.e. this * m. More...
 
Matrix< T, P > & operator/= (const Matrix< T, P > &M) NOEXCEPT
 ELementwise multiplication and assignment operator. i.e. this = this .* M. More...
 
template<class S >
Matrix< T, P > & operator/= (const Matrix< S, P > &M) NOEXCEPT
 ELementwise division and assignment operator. i.e. this = this ./ M. More...
 
template<class S >
Matrix< T, P > & operator/= (const S s) NOEXCEPT
 ELementwise multiplication with scalar and assignment operator. i.e. this = m. More...
 

Protected Member Functions

size_t DimProd () const NOEXCEPT
 Number of elements. More...
 
void Allocate () NOEXCEPT
 Allocate RAM. More...
 

Protected Attributes

Vector< size_t > _dim
 
Vector< size_t > _dsz
 Dimensions. More...
 
Vector< float > _res
 Dimension size. More...
 
Vector< T > _M
 Resolutions. More...
 
std::string _name
 Data container. More...
 

Friends

Friend operators

Who doesn't need friends

Matrix< T, P > operator* (const double s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise multiplication with scalar (lhs) More...
 
Matrix< T, P > operator* (const float s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise multiplication with scalar (lhs) More...
 
Matrix< T, P > operator* (const short s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise multiplication with scalar (lhs) More...
 
Matrix< T, P > operator* (const int s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise multiplication with scalar (lhs) More...
 
Matrix< T, P > operator* (const long s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise multiplication with scalar (lhs) More...
 
Matrix< T, P > operator* (const cxfl s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise multiplication with scalar (lhs) More...
 
Matrix< T, P > operator* (const cxdb s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise multiplication with scalar (lhs) More...
 
Matrix< T, P > operator+ (const double s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise multiplication with scalar (lhs) More...
 
Matrix< T, P > operator+ (const float s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise multiplication with scalar (lhs) More...
 
Matrix< T, P > operator+ (const short s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise multiplication with scalar (lhs) More...
 
Matrix< T, P > operator+ (const int s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise multiplication with scalar (lhs) More...
 
Matrix< T, P > operator+ (const long s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise multiplication with scalar (lhs) More...
 
Matrix< T, P > operator+ (const cxfl s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise multiplication with scalar (lhs) More...
 
Matrix< T, P > operator+ (const cxdb s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise multiplication with scalar (lhs) More...
 
Matrix< T, P > operator- (const double s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise multiplication with scalar (lhs) More...
 
Matrix< T, P > operator- (const float s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise multiplication with scalar (lhs) More...
 
Matrix< T, P > operator- (const short s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise multiplication with scalar (lhs) More...
 
Matrix< T, P > operator- (const int s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise multiplication with scalar (lhs) More...
 
Matrix< T, P > operator- (const long s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise multiplication with scalar (lhs) More...
 
Matrix< T, P > operator- (const cxfl s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise multiplication with scalar (lhs) More...
 
Matrix< T, P > operator- (const cxdb s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise multiplication with scalar (lhs) More...
 
Matrix< T, P > operator/ (const T s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise multiplication with scalar (lhs) More...
 
Matrix< cbooloperator== (const T s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise equality with scalar (lhs) More...
 
Matrix< cbooloperator>= (const T s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise >= with scalar (lhs) More...
 
Matrix< cbooloperator<= (const T s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise <= with scalar (lhs) More...
 
Matrix< cbooloperator!= (const T s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise unequality with scalar (lhs) More...
 
Matrix< cbooloperator> (const T s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise equality with scalar (lhs) More...
 
Matrix< cbooloperator< (const T s, const Matrix< T, P > &m) NOEXCEPT
 Elementwise < with scalar (lhs) More...
 

Detailed Description

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
class Matrix< T, P, b >

Matrix template.
Core data structure.

Author
Kaveh Vahedipour
Date
Mar 2010

Definition at line 101 of file Matrix.hpp.

Constructor & Destructor Documentation

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix< T, P, b >::Matrix ( )
inline

Contruct 1-dim with single element.

Definition at line 118 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix< T, P, b >::Matrix ( const Vector< size_t > &  dim)
inline

Construct matrix with aligned dimension vector.

Parameters
dimAll dimensions

Definition at line 134 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix< T, P, b >::Matrix ( const Vector< size_t > &  dim,
const Vector< float > &  res 
)
inlineexplicit

Construct matrix with dimension and resolution arrays.

Parameters
dimAll 16 Dimensions
resAll 16 Resolutions

Definition at line 156 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix< T, P, b >::Matrix ( const size_t  n)
inlineexplicit

Construct square 2D matrix.

Usage:

Matrix<double> m (5); // Empty 5x5 matrix
Parameters
nRows & Columns

Definition at line 181 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix< T, P, b >::Matrix ( const size_t  m,
const size_t  n 
)
inline

Construct 2D matrix.

Usage:

Matrix<double> m (5,4); // Empty 5x4 matrix
Parameters
mRows
nColumns

Definition at line 208 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix< T, P, b >::Matrix ( const size_t  m,
const size_t  n,
const size_t  k 
)
inline

Construct 3D volume.

Usage:

Matrix<double> m (5,4,6); // Empty 5x4x6 matrix
Parameters
mRows
nColumns
kSlices

Definition at line 234 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix< T, P, b >::Matrix ( const size_t  col,
const size_t  lin,
const size_t  cha,
const size_t  set,
const size_t  eco = 1,
const size_t  phs = 1,
const size_t  rep = 1,
const size_t  seg = 1,
const size_t  par = 1,
const size_t  slc = 1,
const size_t  ida = 1,
const size_t  idb = 1,
const size_t  idc = 1,
const size_t  idd = 1,
const size_t  ide = 1,
const size_t  ave = 1 
)
inline

Construct 4D volume.

Parameters
colScan
linPhase encoding lines
chaChannels
setSets
ecoEchoes
phsPhases
repRepetitions
segSegments
parPartitions
slcSlices
idaIDA
idbIDB
idcIDC
iddIDD
ideIDE
aveAverages

Definition at line 267 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix< T, P, b >::Matrix ( const IceAs &  ias)
inline

Definition at line 28 of file Matrix.hpp.

Member Function Documentation

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
void Matrix< T, P, b >::Allocate ( )
inlineprotected

Allocate RAM.

Definition at line 2218 of file Matrix.hpp.

Referenced by Matrix< size_t >::Matrix().

+ Here is the caller graph for this function:

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
const T& Matrix< T, P, b >::At ( const size_t  p) const
inline

Element at position p (rhs)

Parameters
pPosition
Returns
Value at _M[p]

Definition at line 506 of file Matrix.hpp.

Referenced by Matrix< size_t >::operator()(), and resample().

+ Here is the caller graph for this function:

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
T& Matrix< T, P, b >::At ( const size_t  pos)
inline

Element at position (lhs)

Parameters
posPosition
Returns
Reference to _M[p]

Definition at line 519 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
const T& Matrix< T, P, b >::At ( const size_t  x,
const size_t  y 
) const
inline

Get element in (first) slice (rhs)

Parameters
xColumn
yLine
Returns
Value

Definition at line 534 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
T& Matrix< T, P, b >::At ( const size_t  x,
const size_t  y 
)
inline

Definition at line 538 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
const T& Matrix< T, P, b >::At ( const size_t  x,
const size_t  y,
const size_t  z 
) const
inline

Get element in (first) volume (lhs)

Parameters
xColumn
yLine
zSlice
Returns
Value

Definition at line 553 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
T& Matrix< T, P, b >::At ( const size_t  x,
const size_t  y,
const size_t  z 
)
inline

Definition at line 557 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
const T& Matrix< T, P, b >::At ( const size_t  x,
const size_t  y,
const size_t  z,
const size_t  w 
) const
inline

Reference to element in (first) volume (lhs)

Parameters
xColumn
yLine
zSlice
Returns
Reference

Definition at line 573 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
T& Matrix< T, P, b >::At ( const size_t  x,
const size_t  y,
const size_t  z,
const size_t  w 
)
inline

Definition at line 578 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
const T& Matrix< T, P, b >::At ( const size_t  col,
const size_t  lin,
const size_t  cha,
const size_t  set,
const size_t  eco,
const size_t  phs = 0,
const size_t  rep = 0,
const size_t  seg = 0,
const size_t  par = 0,
const size_t  slc = 0,
const size_t  ida = 0,
const size_t  idb = 0,
const size_t  idc = 0,
const size_t  idd = 0,
const size_t  ide = 0,
const size_t  ave = 0 
) const
inline

Get value at position (lhs)

Parameters
colColumn
linLine
chaChannel
setSet
ecoEcho
phsPhase
repRepetition
segSegment
parPartition
slcSlice
idaFree index A
idbFree index B
idcFree index C
iddFree index D
ideFree index E
aveAverage
Returns
Value at position

Definition at line 607 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
T& Matrix< T, P, b >::At ( const size_t  col,
const size_t  lin,
const size_t  cha,
const size_t  set,
const size_t  eco,
const size_t  phs = 0,
const size_t  rep = 0,
const size_t  seg = 0,
const size_t  par = 0,
const size_t  slc = 0,
const size_t  ida = 0,
const size_t  idb = 0,
const size_t  idc = 0,
const size_t  idd = 0,
const size_t  ide = 0,
const size_t  ave = 0 
)
inline

Definition at line 620 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Vector<T>::iterator Matrix< T, P, b >::Begin ( )
inline

Container iterator to first element (lhs)

Returns
Container iterator

Definition at line 461 of file Matrix.hpp.

Referenced by NCSENSE< T >::Adjoint(), ones(), Matrix< size_t >::operator-(), RandTraits< float >::Populate(), RandTraits< double >::Populate(), RandTraits< short >::Populate(), RandTraits< long >::Populate(), prod(), resize(), and sum().

+ Here is the caller graph for this function:

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Vector<T>::const_iterator Matrix< T, P, b >::Begin ( ) const
inline

Container const iterator to first element (rhs)

Returns
Container const iterator

Definition at line 472 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
void Matrix< T, P, b >::Clear ( )
inline

Purge data and free RAM.

Definition at line 1099 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Vector<T>& Matrix< T, P, b >::Container ( )
inline

Data container (lhs)

Returns
Data container

Definition at line 438 of file Matrix.hpp.

Referenced by CGRAPPA< T >::ARC(), DFT< T >::DFT(), flipud(), isnan(), NFFT< T >::NFFT(), norm(), PolyVal< T >::PolyVal(), codeare::matrix::io::CODFile::Read(), squeeze(), unwrap(), and codeare::matrix::io::CODFile::Write().

+ Here is the caller graph for this function:

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Vector<T> Matrix< T, P, b >::Container ( ) const
inline

Data container (rhs)

Returns
Data container

Definition at line 449 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
const Vector<size_t>& Matrix< T, P, b >::Dim ( ) const
inline

Get dimension array.

Returns
All dimensions

Definition at line 1073 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
size_t Matrix< T, P, b >::DimProd ( ) const
inlineprotected

Number of elements.

Returns
Size

Definition at line 2209 of file Matrix.hpp.

Referenced by Matrix< size_t >::Allocate().

+ Here is the caller graph for this function:

template<class T, paradigm P, const bool & b>
T Matrix< T, P, b >::dot ( const Matrix< T, P > &  M) const
inline

Scalar product using BLAS routines XDOTU and XDOT.

Parameters
MFactor
Returns
Scalar product

Definition at line 623 of file Lapack.hpp.

References DOT().

+ Here is the call graph for this function:

template<class T, paradigm P, const bool & b>
T Matrix< T, P, b >::dotc ( const Matrix< T, P > &  M) const
inline

Scalar product (complex: conjugate first vector) using BLAS routines XDOTC and XDOT.

Parameters
MFactor
Returns
Scalar product

Definition at line 619 of file Lapack.hpp.

References DOTC().

Referenced by NCSENSE< T >::Adjoint().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
const Vector<size_t>& Matrix< T, P, b >::Dsz ( ) const
inline

Get dimension sizes.

Returns
All dimensions

Definition at line 1090 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Vector<T>::iterator Matrix< T, P, b >::End ( )
inline

Container iterator to last element (lhs)

Returns
Container iterator

Definition at line 483 of file Matrix.hpp.

Referenced by ones(), RandTraits< float >::Populate(), RandTraits< double >::Populate(), RandTraits< short >::Populate(), RandTraits< long >::Populate(), prod(), and sum().

+ Here is the caller graph for this function:

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Vector<T>::const_iterator Matrix< T, P, b >::End ( ) const
inline

Container const iterator to last element (rhs)

Returns
Container const iterator

Definition at line 494 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
size_t Matrix< T, P, b >::Export ( IceAs &  ias) const
inline

Definition at line 95 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
size_t Matrix< T, P, b >::Export ( IceAs &  ias,
const size_t  pos 
) const
inline

Definition at line 109 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
const char* Matrix< T, P, b >::GetClassName ( ) const
inline

Who are we?

Returns
Class name

Definition at line 1127 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
size_t Matrix< T, P, b >::Height ( ) const
inline

Get number of rows, i.e. tmp = size(this); tmp(1).

Returns
Number of rows.

Definition at line 965 of file Matrix.hpp.

Referenced by chol(), print(), and svd2().

+ Here is the caller graph for this function:

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
size_t Matrix< T, P, b >::Import ( const IceAs &  ias,
const size_t  pos 
)
inline

Definition at line 6 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
size_t Matrix< T, P, b >::Import ( const IceAs &  ias)
inline

Definition at line 59 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
size_t Matrix< T, P, b >::NDim ( ) const
inline
template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
template<class S >
Matrix< T, P, b >::operator Matrix< S, P > ( ) const
inline

Cast operator.

Returns
Casted copy

Definition at line 640 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> Matrix< T, P, b >::operator! ( ) const
inline

Transposition / Complex conjugation. i.e. this'.

Returns
Matrix::tr()

Definition at line 1257 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<cbool> Matrix< T, P, b >::operator!= ( const T  s) const
inline

Return a matrix with result[i] = (m[i] ? this[i] : 0).

Parameters
MThe operand
Returns
Cross-section or zero Scalar inequality. result[i] = (this[i] != m). i.e. this ~= m
Parameters
sComparing scalar.
Returns
Matrix of false where elements are equal s and true else.

Definition at line 1285 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<cbool> Matrix< T, P, b >::operator!= ( const Matrix< T, P > &  M) const
inline

Elementwise equality, result[i] = (this[i] != m[i]). i.e. this ~= m.

Parameters
MComparing matrix.
Returns
Hit list

Definition at line 1363 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<cbool> Matrix< T, P, b >::operator&& ( const Matrix< T, P > &  M) const
inline

Matrix comparison, result[i] = (m[i] && this[i] ? 1 : 0). i.e. this & m.

Parameters
MComparing matrix.
Returns
Hit list

Definition at line 1473 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T> Matrix< T, P, b >::operator() ( const Vector< size_t > &  indices,
size_t  col = 0 
) const
inline

Deliver range of values with indices.

Parameters
indicesList of indices
Returns
Matrix containing values at indices

Definition at line 653 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T> Matrix< T, P, b >::operator() ( size_t  row,
const Vector< size_t > &  indices 
) const
inline

Deliver range of values with indices.

Parameters
indicesList of indices
Returns
Matrix containing values at indices

Definition at line 671 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T> Matrix< T, P, b >::operator() ( const Vector< size_t > &  row_inds,
const Vector< size_t > &  col_inds 
) const
inline

Deliver range of values with indices.

Parameters
indicesList of indices
Returns
Matrix containing values at indices

Definition at line 689 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
const T& Matrix< T, P, b >::operator() ( const size_t  p) const
inline
See Also
At(const size_t)
Parameters
pRequested position.
Returns
Requested scalar value.

Definition at line 715 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
T& Matrix< T, P, b >::operator() ( const size_t  p)
inline

Get value of pth element of repository.

Parameters
pRequested position.
Returns
Requested scalar value.

Definition at line 727 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
const T& Matrix< T, P, b >::operator() ( const size_t  x,
const size_t  y 
) const
inline

Get value in slice.

Parameters
xColumn
yLine
Returns
Value

Definition at line 740 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
T& Matrix< T, P, b >::operator() ( const size_t  x,
const size_t  y 
)
inline

Reference to value in slice.

Parameters
xColumn
yLine
Returns
Reference

Definition at line 753 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
const T& Matrix< T, P, b >::operator() ( const size_t  x,
const size_t  y,
const size_t  z 
) const
inline

Get value in volume.

Parameters
xColumn
yLine
zSlice
Returns
Value

Definition at line 768 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
T& Matrix< T, P, b >::operator() ( const size_t  x,
const size_t  y,
const size_t  z 
)
inline

Reference to value in volume.

Parameters
xColumn
yLine
zSlice
Returns
Reference to _M[col + _dim[COL]*lin + _dim[COL]*_dim[LIN]*slc]

Definition at line 783 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
const T& Matrix< T, P, b >::operator() ( const size_t  x,
const size_t  y,
const size_t  z,
const size_t  w 
) const
inline

Get value in volume.

Parameters
xColumn
yLine
zSlice
Returns
Value

Definition at line 798 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
T& Matrix< T, P, b >::operator() ( const size_t  x,
const size_t  y,
const size_t  z,
const size_t  w 
)
inline

Reference to value in volume.

Parameters
xColumn
yLine
zSlice
Returns
Reference to _M[col + _dim[COL]*lin + _dim[COL]*_dim[LIN]*slc]

Definition at line 813 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
T& Matrix< T, P, b >::operator() ( const size_t  col,
const size_t  lin,
const size_t  cha,
const size_t  set,
const size_t  eco,
const size_t  phs = 0,
const size_t  rep = 0,
const size_t  seg = 0,
const size_t  par = 0,
const size_t  slc = 0,
const size_t  ida = 0,
const size_t  idb = 0,
const size_t  idc = 0,
const size_t  idd = 0,
const size_t  ide = 0,
const size_t  ave = 0 
)
inline

Reference to element.

Parameters
colColumn
linLine
chaChannel
setSet
ecoEcho
phsPhase
repRepetition
segSegment
parPartition
slcSlice
idaFree index A
idbFree index B
idcFree index C
iddFree index D
ideFree index E
aveAverage
Returns
Reference to position

Definition at line 840 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
const T& Matrix< T, P, b >::operator() ( const size_t  col,
const size_t  lin,
const size_t  cha,
const size_t  set,
const size_t  eco,
const size_t  phs = 0,
const size_t  rep = 0,
const size_t  seg = 0,
const size_t  par = 0,
const size_t  slc = 0,
const size_t  ida = 0,
const size_t  idb = 0,
const size_t  idc = 0,
const size_t  idd = 0,
const size_t  ide = 0,
const size_t  ave = 0 
) const
inline

Value at ...

Parameters
colColumn
linLine
chaChannel
setSet
ecoEcho
phsPhase
repRepetition
segSegment
parPartition
slcSlice
idaFree index A
idbFree index B
idcFree index C
iddFree index D
ideFree index E
aveAverage
Returns
Value

Definition at line 878 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
template<class S >
Matrix<T,P> Matrix< T, P, b >::operator* ( const S  s) const
inline

Elementwise multiplication. i.e. this .* M.

Parameters
MFactor matrix.
Returns
Result Elementwise multiplication. i.e. this .* M.
Parameters
MFactor matrix.
Returns
Result Elementwise multiplication with a scalar. i.e. this * m.
Parameters
sFactor scalar
Returns
Result

Definition at line 1651 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P>& Matrix< T, P, b >::operator*= ( const Matrix< T, P > &  M)
inline

ELementwise multiplication and assignment operator. i.e. this = this .* M.

Parameters
MFactor matrix.
Returns
Result

Definition at line 1665 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
template<class S >
Matrix<T,P>& Matrix< T, P, b >::operator*= ( const Matrix< S, P > &  M)
inline

ELementwise multiplication and assignment operator. i.e. this = this .* M.

Parameters
MFactor matrix.
Returns
Result

Definition at line 1679 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
template<class S >
Matrix<T,P>& Matrix< T, P, b >::operator*= ( const S  s)
inline

ELementwise multiplication with scalar and assignment operator. i.e. this *= s.

Parameters
sFactor scalar.
Returns
Result

Definition at line 1693 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> Matrix< T, P, b >::operator+ ( ) const
inline

Unary plus.

Returns
Identity

Definition at line 1246 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
template<class S >
Matrix<T,P> Matrix< T, P, b >::operator+ ( const S  s) const
inline

Elementwise addition iof all elements with a scalar.

Parameters
sScalar additive.

Definition at line 1518 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P>& Matrix< T, P, b >::operator+= ( const Matrix< T, P > &  M)
inline

ELementwise multiplication and assignment operator. i.e. this = this .* M.

Parameters
MFactor matrix.
Returns
Result

Definition at line 1531 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
template<class S >
Matrix<T,P>& Matrix< T, P, b >::operator+= ( const Matrix< S, P > &  M)
inline

ELementwise multiplication and assignment operator. i.e. this = m.

Parameters
MAdded matrix.
Returns
Result

Definition at line 1545 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
template<class S >
Matrix<T,P>& Matrix< T, P, b >::operator+= ( const S  s)
inline

ELementwise addition with scalar and assignment operator. i.e. this = m.

Parameters
sAdded scalar.
Returns
Result

Definition at line 1559 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> Matrix< T, P, b >::operator- ( ) const
inline

Unary minus (additive inverse)

Returns
Negation

Definition at line 1233 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
template<class S >
Matrix<T,P> Matrix< T, P, b >::operator- ( const S  s) const
inline

Elementwise subtraction all elements by a scalar.

Parameters
sScalar substruent.

Definition at line 1570 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P>& Matrix< T, P, b >::operator-= ( const Matrix< T, P > &  M)
inline

ELementwise multiplication and assignment operator. i.e. this = this .* M.

Parameters
MFactor matrix.
Returns
Result

Definition at line 1584 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
template<class S >
Matrix<T,P>& Matrix< T, P, b >::operator-= ( const Matrix< S, P > &  M)
inline

ELementwise multiplication and assignment operator. i.e. this = m.

Parameters
MAdded matrix.
Returns
Result

Definition at line 1598 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
template<class S >
Matrix<T,P>& Matrix< T, P, b >::operator-= ( const S  s)
inline

ELementwise substration with scalar and assignment operator. i.e. this = m.

Parameters
sAdded scalar.
Returns
Result

Definition at line 1611 of file Matrix.hpp.

template<class T, paradigm P, const bool & b>
Matrix< T, P > Matrix< T, P, b >::operator->* ( const Matrix< T, P > &  M) const
inline

Matrix product. i.e. this * M.

Parameters
MThe factor.

Definition at line 472 of file Lapack.hpp.

References gemm().

+ Here is the call graph for this function:

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
template<class S >
Matrix<T,P> Matrix< T, P, b >::operator/ ( const S  s) const
inline

Elementwise division by scalar. i.e. this * m.

Parameters
sThe divisor.
Returns
Result

Definition at line 1707 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P>& Matrix< T, P, b >::operator/= ( const Matrix< T, P > &  M)
inline

ELementwise multiplication and assignment operator. i.e. this = this .* M.

Parameters
MFactor matrix.
Returns
Result

Definition at line 1720 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
template<class S >
Matrix<T,P>& Matrix< T, P, b >::operator/= ( const Matrix< S, P > &  M)
inline

ELementwise division and assignment operator. i.e. this = this ./ M.

Parameters
MDivisor matrix.
Returns
Result

Definition at line 1734 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
template<class S >
Matrix<T,P>& Matrix< T, P, b >::operator/= ( const S  s)
inline

ELementwise multiplication with scalar and assignment operator. i.e. this = m.

Parameters
sDivisor scalar.
Returns
Result

Definition at line 1750 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<cbool> Matrix< T, P, b >::operator< ( const T  s) const
inline

Scalar minor or equal comparison. result[i] = (this[i] < m). i.e. this < m.

Parameters
sComparing scalar.
Returns
Hit list

Definition at line 1348 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<cbool> Matrix< T, P, b >::operator< ( const Matrix< T, P > &  M) const
inline

Matrix comparison, result[i] = (this[i] < m[i]). i.e. this < m.

Parameters
MComparing matrix.
Returns
Hit list

Definition at line 1427 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<cbool> Matrix< T, P, b >::operator<= ( const T  s) const
inline

Scalar minor or equal comparison. result[i] = (this[i] <= m). i.e. this <= m.

Parameters
sComparing scalar.
Returns
Hit list

Definition at line 1333 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<cbool> Matrix< T, P, b >::operator<= ( const Matrix< T, P > &  M) const
inline

Matrix comparison, result[i] = (this[i] <= m[i]). i.e. this <= m.

Parameters
MComparing matrix.
Returns
Hit list

Definition at line 1395 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P>& Matrix< T, P, b >::operator= ( const Vector< T > &  v)
inline

Assignment data.

Parameters
vData vector (size must match numel(M)).

Definition at line 1201 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
const Matrix<T,P>& Matrix< T, P, b >::operator= ( const T  s)
inline

Assignment operator. Sets all elements s.

Parameters
sThe assigned scalar.

Definition at line 1220 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<cbool> Matrix< T, P, b >::operator== ( const Matrix< T, P > &  M) const
inline

Elementwise equality with scalar (lhs)

Parameters
mbScalar lhs
mMatrix rhs
Returns
T+M Elementwise equality, result[i] = (this[i] == m[i]). i.e. this == m
Parameters
MComparing matrix.
Returns
Hit list

Definition at line 2158 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
template<class S >
Matrix<cbool> Matrix< T, P, b >::operator== ( const Matrix< S, P > &  M) const
inline

Elementwise equality, result[i] = (this[i] == m[i]). i.e. this == m.

Parameters
MComparing matrix.
Returns
Hit list

Definition at line 2176 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<cbool> Matrix< T, P, b >::operator== ( const T  s) const
inline

Scalar equality. result[i] = (this[i] == m).

Parameters
sComparing scalar.
Returns
Matrix of true where elements are equal s and false else.

Definition at line 2191 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<cbool> Matrix< T, P, b >::operator> ( const T  s) const
inline

Scalar greater comaprison, result[i] = (this[i] > m). i.e. this > m.

Parameters
sComparing scalar.
Returns
Hit list

Definition at line 1301 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<cbool> Matrix< T, P, b >::operator> ( const Matrix< T, P > &  M) const
inline

Matrix comparison, result[i] = (this[i] > m[i]). i.e. this > m.

Parameters
MComparing matrix.
Returns
Hit list

Definition at line 1411 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<cbool> Matrix< T, P, b >::operator>= ( const T  s) const
inline

Scalar greater or equal comparison. result[i] = (this[i] >= m). i.e. this >= m.

Parameters
sComparing scalar.
Returns
Hit list

Definition at line 1318 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<cbool> Matrix< T, P, b >::operator>= ( const Matrix< T, P > &  M) const
inline

Matrix comparison, result[i] = (this[i] >= m[i]). i.e. this >= m.

Parameters
MComparing matrix.
Returns
Hit list

Definition at line 1379 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
T Matrix< T, P, b >::operator[] ( const size_t  p) const
inline

Get copy of p-th element.

Usage:

Matrix<float> m = rand<float> (10,1);
float f = m[6]; // right hand side
Parameters
pRequested position.
Returns
Value at _M[p].

Definition at line 373 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
T& Matrix< T, P, b >::operator[] ( const size_t  p)
inline

Get reference to p-th element.

Usage:

Matrix<float> m = rand<float> (10,1);
m[6] = 1.8; // left hand side
Parameters
pRequested position.
Returns
Reference to _M[p].

Definition at line 392 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> Matrix< T, P, b >::operator^ ( const float  p) const
inline

Elementwise raise of power. i.e. this .^ p.

Parameters
pPower.
Returns
Result

Definition at line 1489 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P>& Matrix< T, P, b >::operator^= ( const float  p)
inline

Elementwise raise of power. i.e. this .^ p.

Parameters
pPower.
Returns
Result

Definition at line 1504 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<short> Matrix< T, P, b >::operator| ( const Matrix< T, P > &  rhs) const
inline

Matrix comparison, result[i] = (m[i] || this[i] ? 1 : 0). i.e. this | m.

Parameters
MComparing matrix.
Returns
Hit list

Definition at line 1458 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<cbool> Matrix< T, P, b >::operator|| ( const Matrix< T, P > &  M) const
inline

Matrix comparison, result[i] = (m[i] || this[i] ? 1 : 0). i.e. this | m.

Parameters
MComparing matrix.
Returns
Hit list

Definition at line 1443 of file Matrix.hpp.

template<class T, paradigm P, const bool & b>
Matrix< T, P > Matrix< T, P, b >::prod ( const Matrix< T, P > &  M,
const char  transa = 'N',
const char  transb = 'N' 
) const

Matrix Product.

Parameters
MThe factor
transaTranspose ('T') / Conjugate transpose ('C') the left matrix. Default: No transposition'N'
transbTranspose ('T') / Conjugate transpose ('C') the right matrix. Default: No transposition 'N'
Returns
Product of this and M.

Definition at line 464 of file Lapack.hpp.

References gemm().

+ Here is the call graph for this function:

template<class T, paradigm P, const bool & b>
Matrix< T, P > Matrix< T, P, b >::prodt ( const Matrix< T, P > &  M) const
inline

Complex conjugate left and multiply with right.

Parameters
MFactor
Returns
Product of conj(this) and M.

Definition at line 468 of file Lapack.hpp.

References gemm().

+ Here is the call graph for this function:

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
const T* Matrix< T, P, b >::Ptr ( const size_t  p = 0) const
inline

Get pointer to memory starting at p-th (default:0) element.

Parameters
pPosition
Returns
Data

Definition at line 412 of file Matrix.hpp.

Referenced by NFFT< T >::Adjoint(), chol(), Column(), dot(), dotc(), eig2(), gemm(), gemv(), interp1(), inv(), norm(), RRClient::RemoteConnector::SetMatrix(), Slice(), svd2(), NFFT< T >::Trafo(), Volume(), NIFile::Write(), and codeare::matrix::io::write_real().

+ Here is the caller graph for this function:

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
T* Matrix< T, P, b >::Ptr ( const size_t  p = 0)
inline

Get pointer to memory starting at p-th (default:0) element.

Parameters
pPosition
Returns
Data

Definition at line 425 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
float& Matrix< T, P, b >::Res ( const size_t  i)
inline

Resolution of a given dimension.

Parameters
iDimension
Returns
Resolution

Definition at line 1036 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
const Vector<float>& Matrix< T, P, b >::Res ( ) const
inline

Resolution array.

Returns
All resolutions

Definition at line 1049 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
void Matrix< T, P, b >::SetClassName ( const char *  name)
inline

Who are we?

Returns
Class name

Definition at line 1138 of file Matrix.hpp.

Referenced by codeare::matrix::io::CODFile::Read(), and Workspace::SetMatrix().

+ Here is the caller graph for this function:

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
size_t Matrix< T, P, b >::Width ( ) const
inline

Get number of columns, i.e. tmp = size(this); tmp(2).

Returns
Number of columns.

Definition at line 976 of file Matrix.hpp.

Referenced by svd2().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<cbool> operator!= ( const T  s,
const Matrix< T, P > &  m 
)
friend

Elementwise unequality with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
T!=M

Definition at line 2105 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> operator* ( const double  s,
const Matrix< T, P > &  m 
)
friend

Elementwise multiplication with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m * s

Definition at line 1776 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> operator* ( const float  s,
const Matrix< T, P > &  m 
)
friend

Elementwise multiplication with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m * s

Definition at line 1789 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> operator* ( const short  s,
const Matrix< T, P > &  m 
)
friend

Elementwise multiplication with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m * s

Definition at line 1802 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> operator* ( const int  s,
const Matrix< T, P > &  m 
)
friend

Elementwise multiplication with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m * s

Definition at line 1815 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> operator* ( const long  s,
const Matrix< T, P > &  m 
)
friend

Elementwise multiplication with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m * s

Definition at line 1828 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> operator* ( const cxfl  s,
const Matrix< T, P > &  m 
)
friend

Elementwise multiplication with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m * s

Definition at line 1841 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> operator* ( const cxdb  s,
const Matrix< T, P > &  m 
)
friend

Elementwise multiplication with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m * s

Definition at line 1854 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> operator+ ( const double  s,
const Matrix< T, P > &  m 
)
friend

Elementwise multiplication with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m * s

Definition at line 1868 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> operator+ ( const float  s,
const Matrix< T, P > &  m 
)
friend

Elementwise multiplication with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m * s

Definition at line 1881 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> operator+ ( const short  s,
const Matrix< T, P > &  m 
)
friend

Elementwise multiplication with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m * s

Definition at line 1894 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> operator+ ( const int  s,
const Matrix< T, P > &  m 
)
friend

Elementwise multiplication with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m * s

Definition at line 1907 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> operator+ ( const long  s,
const Matrix< T, P > &  m 
)
friend

Elementwise multiplication with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m * s

Definition at line 1920 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> operator+ ( const cxfl  s,
const Matrix< T, P > &  m 
)
friend

Elementwise multiplication with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m * s

Definition at line 1933 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> operator+ ( const cxdb  s,
const Matrix< T, P > &  m 
)
friend

Elementwise multiplication with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m * s

Definition at line 1946 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> operator- ( const double  s,
const Matrix< T, P > &  m 
)
friend

Elementwise multiplication with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m * s

Definition at line 1960 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> operator- ( const float  s,
const Matrix< T, P > &  m 
)
friend

Elementwise multiplication with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m * s

Definition at line 1973 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> operator- ( const short  s,
const Matrix< T, P > &  m 
)
friend

Elementwise multiplication with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m * s

Definition at line 1986 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> operator- ( const int  s,
const Matrix< T, P > &  m 
)
friend

Elementwise multiplication with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m * s

Definition at line 1999 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> operator- ( const long  s,
const Matrix< T, P > &  m 
)
friend

Elementwise multiplication with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m * s

Definition at line 2012 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> operator- ( const cxfl  s,
const Matrix< T, P > &  m 
)
friend

Elementwise multiplication with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m * s

Definition at line 2025 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> operator- ( const cxdb  s,
const Matrix< T, P > &  m 
)
friend

Elementwise multiplication with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m * s

Definition at line 2038 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<T,P> operator/ ( const T  s,
const Matrix< T, P > &  m 
)
friend

Elementwise multiplication with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m * s

Definition at line 2051 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<cbool> operator< ( const T  s,
const Matrix< T, P > &  m 
)
friend

Elementwise < with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
T+M

Definition at line 2131 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<cbool> operator<= ( const T  s,
const Matrix< T, P > &  m 
)
friend

Elementwise <= with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
T<=M

Definition at line 2092 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<cbool> operator== ( const T  s,
const Matrix< T, P > &  m 
)
friend

Elementwise equality with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m == s

Definition at line 2066 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<cbool> operator> ( const T  s,
const Matrix< T, P > &  m 
)
friend

Elementwise equality with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
T+M

Definition at line 2118 of file Matrix.hpp.

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Matrix<cbool> operator>= ( const T  s,
const Matrix< T, P > &  m 
)
friend

Elementwise >= with scalar (lhs)

Parameters
sScalar lhs
mMatrix rhs
Returns
m <= t

Definition at line 2079 of file Matrix.hpp.

Field Documentation

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Vector<size_t> Matrix< T, P, b >::_dsz
protected
template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
std::string Matrix< T, P, b >::_name
protected

Data container.

Definition at line 2240 of file Matrix.hpp.

Referenced by Matrix< size_t >::GetClassName(), and Matrix< size_t >::SetClassName().

template<class T, paradigm P = SHM, const bool & b = TypeTraits<T>::Supported>
Vector<float> Matrix< T, P, b >::_res
protected

The documentation for this class was generated from the following files: