FEDRA emulsion software from the OPERA Collaboration
|
#include <SMatrix.hh>
Public Types | |
— Typedefs — | |
typedef T | value_type |
Public Member Functions | |
— Access functions — | |
T | apply (unsigned int i) const |
access the parse tree More... | |
const T * | Array () const |
return read-only pointer to internal array More... | |
T * | Array () |
return pointer to internal array More... | |
— Operators — | |
bool | operator== (const T &rhs) const |
element wise comparison More... | |
bool | operator!= (const T &rhs) const |
element wise comparison More... | |
bool | operator== (const SMatrix< T, D1, D2 > &rhs) const |
element wise comparison More... | |
bool | operator!= (const SMatrix< T, D1, D2 > &rhs) const |
element wise comparison More... | |
template<class A > | |
bool | operator== (const Expr< A, T, D1, D2 > &rhs) const |
element wise comparison More... | |
template<class A > | |
bool | operator!= (const Expr< A, T, D1, D2 > &rhs) const |
element wise comparison More... | |
bool | operator> (const T &rhs) const |
element wise comparison More... | |
bool | operator< (const T &rhs) const |
element wise comparison More... | |
bool | operator> (const SMatrix< T, D1, D2 > &rhs) const |
element wise comparison More... | |
bool | operator< (const SMatrix< T, D1, D2 > &rhs) const |
element wise comparison More... | |
template<class A > | |
bool | operator> (const Expr< A, T, D1, D2 > &rhs) const |
element wise comparison More... | |
template<class A > | |
bool | operator< (const Expr< A, T, D1, D2 > &rhs) const |
element wise comparison More... | |
const T & | operator() (unsigned int i, unsigned int j) const |
read-only access More... | |
T & | operator() (unsigned int i, unsigned int j) |
read/write access More... | |
SMatrix< T, D1, D2 > & | operator+= (const SMatrix< T, D1, D2 > &rhs) |
template<class A > | |
SMatrix< T, D1, D2 > & | operator+= (const Expr< A, T, D1, D2 > &rhs) |
SMatrix< T, D1, D2 > & | operator-= (const SMatrix< T, D1, D2 > &rhs) |
template<class A > | |
SMatrix< T, D1, D2 > & | operator-= (const Expr< A, T, D1, D2 > &rhs) |
SMatrix< T, D1, D2 > & | operator*= (const SMatrix< T, D1, D2 > &rhs) |
template<class A > | |
SMatrix< T, D1, D2 > & | operator*= (const Expr< A, T, D1, D2 > &rhs) |
SMatrix< T, D1, D2 > & | operator/= (const SMatrix< T, D1, D2 > &rhs) |
template<class A > | |
SMatrix< T, D1, D2 > & | operator/= (const Expr< A, T, D1, D2 > &rhs) |
— Constructors — | |
static const unsigned int | rows = D1 |
return no. of matrix rows More... | |
static const unsigned int | cols = D2 |
return no. of matrix columns More... | |
static const unsigned int | size = D1*D2 |
return no of elements: rows*columns More... | |
SMatrix () | |
SMatrix (const SMatrix< T, D1, D2 > &rhs) | |
template<class A > | |
SMatrix (const Expr< A, T, D1, D2 > &rhs) | |
SMatrix (const T &rhs, const bool diagonal=false) | |
2nd arg: set only diagonal? More... | |
SMatrix (const SVector< T, D1 > &rhs) | |
constructor via dyadic product More... | |
template<class A > | |
SMatrix (const Expr< A, T, D1 > &rhs) | |
constructor via dyadic product More... | |
template<class T1 > | |
SMatrix (const T1 *a, const bool triang=false, const unsigned int len=D1 *D2) | |
SMatrix< T, D1, D2 > & | operator= (const T &rhs) |
template<class A > | |
SMatrix< T, D1, D2 > & | operator= (const Expr< A, T, D1, D2 > &rhs) |
— Expert functions — | |
T | array [D1 *D2] |
bool | sinvert () |
invert symmetric, pos. def. Matrix via Dsinv More... | |
bool | sdet (T &det) |
bool | invert () |
invert square Matrix via Dinv More... | |
bool | det (T &det) |
template<unsigned int D> | |
SMatrix< T, D1, D2 > & | place_in_row (const SVector< T, D > &rhs, const unsigned int row, const unsigned int col) |
place a vector in a Matrix row More... | |
template<class A , unsigned int D> | |
SMatrix< T, D1, D2 > & | place_in_row (const Expr< A, T, D > &rhs, const unsigned int row, const unsigned int col) |
place a vector expression in a Matrix row More... | |
template<unsigned int D> | |
SMatrix< T, D1, D2 > & | place_in_col (const SVector< T, D > &rhs, const unsigned int row, const unsigned int col) |
place a vector in a Matrix column More... | |
template<class A , unsigned int D> | |
SMatrix< T, D1, D2 > & | place_in_col (const Expr< A, T, D > &rhs, const unsigned int row, const unsigned int col) |
place a vector expression in a Matrix column More... | |
template<unsigned int D3, unsigned int D4> | |
SMatrix< T, D1, D2 > & | place_at (const SMatrix< T, D3, D4 > &rhs, const unsigned int row, const unsigned int col) |
place a matrix in this matrix More... | |
template<class A , unsigned int D3, unsigned int D4> | |
SMatrix< T, D1, D2 > & | place_at (const Expr< A, T, D3, D4 > &rhs, const unsigned int row, const unsigned int col) |
place a matrix expression in this matrix More... | |
SVector< T, D2 > | row (const unsigned int therow) const |
return a Matrix row as a vector More... | |
SVector< T, D1 > | col (const unsigned int thecol) const |
return a Matrix column as a vector More... | |
std::ostream & | print (std::ostream &os) const |
used by operator<<() More... | |
SMatrix. A generic fixed size n x m Matrix class.q
@memo SMatrix
typedef T SMatrix< T, D1, D2 >::value_type |
SMatrix< T, D1, D2 >::SMatrix | ( | const SMatrix< T, D1, D2 > & | rhs | ) |
SMatrix< T, D1, D2 >::SMatrix | ( | const Expr< A, T, D1, D2 > & | rhs | ) |
SMatrix< T, D1, D2 >::SMatrix | ( | const T & | rhs, |
const bool | diagonal = false |
||
) |
2nd arg: set only diagonal?
SMatrix< T, D1, D2 >::SMatrix | ( | const SVector< T, D1 > & | rhs | ) |
constructor via dyadic product
SMatrix< T, D1, D2 >::SMatrix | ( | const Expr< A, T, D1 > & | rhs | ) |
constructor via dyadic product
SMatrix< T, D1, D2 >::SMatrix | ( | const T1 * | a, |
const bool | triang = false , |
||
const unsigned int | len = D1 *D2 |
||
) |
constructor via array, triag=true: array contains only upper/lower triangular part of a symmetric matrix, len: length of array
T SMatrix< T, D1, D2 >::apply | ( | unsigned int | i | ) | const |
access the parse tree
T * SMatrix< T, D1, D2 >::Array | ( | ) |
return pointer to internal array
const T * SMatrix< T, D1, D2 >::Array | ( | ) | const |
return read-only pointer to internal array
SVector< T, D1 > SMatrix< T, D1, D2 >::col | ( | const unsigned int | thecol | ) | const |
return a Matrix column as a vector
bool SMatrix< T, D1, D2 >::det | ( | T & | det | ) |
determinant of square Matrix via Dfact. \textbf{Note:} this will destroy the contents of the Matrix!
bool SMatrix< T, D1, D2 >::invert | ( | ) |
invert square Matrix via Dinv
bool SMatrix< T, D1, D2 >::operator!= | ( | const Expr< A, T, D1, D2 > & | rhs | ) | const |
element wise comparison
bool SMatrix< T, D1, D2 >::operator!= | ( | const SMatrix< T, D1, D2 > & | rhs | ) | const |
element wise comparison
bool SMatrix< T, D1, D2 >::operator!= | ( | const T & | rhs | ) | const |
element wise comparison
T & SMatrix< T, D1, D2 >::operator() | ( | unsigned int | i, |
unsigned int | j | ||
) |
read/write access
const T & SMatrix< T, D1, D2 >::operator() | ( | unsigned int | i, |
unsigned int | j | ||
) | const |
read-only access
SMatrix< T, D1, D2 > & SMatrix< T, D1, D2 >::operator*= | ( | const Expr< A, T, D1, D2 > & | rhs | ) |
SMatrix< T, D1, D2 > & SMatrix< T, D1, D2 >::operator*= | ( | const SMatrix< T, D1, D2 > & | rhs | ) |
SMatrix< T, D1, D2 > & SMatrix< T, D1, D2 >::operator+= | ( | const Expr< A, T, D1, D2 > & | rhs | ) |
SMatrix< T, D1, D2 > & SMatrix< T, D1, D2 >::operator+= | ( | const SMatrix< T, D1, D2 > & | rhs | ) |
SMatrix< T, D1, D2 > & SMatrix< T, D1, D2 >::operator-= | ( | const Expr< A, T, D1, D2 > & | rhs | ) |
SMatrix< T, D1, D2 > & SMatrix< T, D1, D2 >::operator-= | ( | const SMatrix< T, D1, D2 > & | rhs | ) |
SMatrix< T, D1, D2 > & SMatrix< T, D1, D2 >::operator/= | ( | const Expr< A, T, D1, D2 > & | rhs | ) |
SMatrix< T, D1, D2 > & SMatrix< T, D1, D2 >::operator/= | ( | const SMatrix< T, D1, D2 > & | rhs | ) |
bool SMatrix< T, D1, D2 >::operator< | ( | const Expr< A, T, D1, D2 > & | rhs | ) | const |
element wise comparison
bool SMatrix< T, D1, D2 >::operator< | ( | const SMatrix< T, D1, D2 > & | rhs | ) | const |
element wise comparison
bool SMatrix< T, D1, D2 >::operator< | ( | const T & | rhs | ) | const |
element wise comparison
SMatrix< T, D1, D2 > & SMatrix< T, D1, D2 >::operator= | ( | const Expr< A, T, D1, D2 > & | rhs | ) |
SMatrix< T, D1, D2 > & SMatrix< T, D1, D2 >::operator= | ( | const T & | rhs | ) |
bool SMatrix< T, D1, D2 >::operator== | ( | const Expr< A, T, D1, D2 > & | rhs | ) | const |
element wise comparison
bool SMatrix< T, D1, D2 >::operator== | ( | const SMatrix< T, D1, D2 > & | rhs | ) | const |
element wise comparison
bool SMatrix< T, D1, D2 >::operator== | ( | const T & | rhs | ) | const |
element wise comparison
bool SMatrix< T, D1, D2 >::operator> | ( | const Expr< A, T, D1, D2 > & | rhs | ) | const |
element wise comparison
bool SMatrix< T, D1, D2 >::operator> | ( | const SMatrix< T, D1, D2 > & | rhs | ) | const |
element wise comparison
bool SMatrix< T, D1, D2 >::operator> | ( | const T & | rhs | ) | const |
element wise comparison
SMatrix< T, D1, D2 > & SMatrix< T, D1, D2 >::place_at | ( | const Expr< A, T, D3, D4 > & | rhs, |
const unsigned int | row, | ||
const unsigned int | col | ||
) |
place a matrix expression in this matrix
SMatrix< T, D1, D2 > & SMatrix< T, D1, D2 >::place_at | ( | const SMatrix< T, D3, D4 > & | rhs, |
const unsigned int | row, | ||
const unsigned int | col | ||
) |
place a matrix in this matrix
SMatrix< T, D1, D2 > & SMatrix< T, D1, D2 >::place_in_col | ( | const Expr< A, T, D > & | rhs, |
const unsigned int | row, | ||
const unsigned int | col | ||
) |
place a vector expression in a Matrix column
SMatrix< T, D1, D2 > & SMatrix< T, D1, D2 >::place_in_col | ( | const SVector< T, D > & | rhs, |
const unsigned int | row, | ||
const unsigned int | col | ||
) |
place a vector in a Matrix column
SMatrix< T, D1, D2 > & SMatrix< T, D1, D2 >::place_in_row | ( | const Expr< A, T, D > & | rhs, |
const unsigned int | row, | ||
const unsigned int | col | ||
) |
place a vector expression in a Matrix row
SMatrix< T, D1, D2 > & SMatrix< T, D1, D2 >::place_in_row | ( | const SVector< T, D > & | rhs, |
const unsigned int | row, | ||
const unsigned int | col | ||
) |
place a vector in a Matrix row
std::ostream & SMatrix< T, D1, D2 >::print | ( | std::ostream & | os | ) | const |
used by operator<<()
SVector< T, D2 > SMatrix< T, D1, D2 >::row | ( | const unsigned int | therow | ) | const |
return a Matrix row as a vector
bool SMatrix< T, D1, D2 >::sdet | ( | T & | det | ) |
determinant of symmetrc, pos. def. Matrix via Dsfact. \textbf{Note:} this will destroy the contents of the Matrix!
bool SMatrix< T, D1, D2 >::sinvert | ( | ) |
invert symmetric, pos. def. Matrix via Dsinv
|
private |
|
static |
return no. of matrix columns
|
static |
return no. of matrix rows
|
static |
return no of elements: rows*columns