TBCI Numerical high perf. C++ Library 2.8.0
TMatrix< T > Class Template Reference

#include <matrix.h>

Inheritance diagram for TMatrix< T >:
Collaboration diagram for TMatrix< T >:

Public Types

typedef T value_type
typedef T element_type
typedef T aligned_value_type TALIGN(MIN_ALIGN2)

Public Member Functions

Tgetvec () const
Tgetendvec () const
 TMatrix (const unsigned=0)
 c'tor for square Matrix
 TMatrix (const unsigned, const unsigned)
 c'tor for Matrix, specifying rows and columns
 TMatrix (const T &, const unsigned, const unsigned)
 c'tor for Matrix, specifying and initialization value and rows and columns
 TMatrix (const Vector< T > &, const enum rowcolvec=colvec)
 c'tor to construct 1-column (or 1-row) Matrix from Vector
 TMatrix (const TMatrix< T > &) HOT
 aliasing copies (TBCI)
 TMatrix (TSMatrix< T >)
 TMatrix (const Matrix< T > &) HOT
 full copying
void real_destroy ()
 real destructor
void mark_destroy () const
 mark destructible
 ~TMatrix ()
template<typename U>
 TMatrix (const Matrix< U > &m)
template<typename U>
 TMatrix (const TMatrix< U > &tm)
TMatrix< T > & operator= (const Matrix< T > &) HOT
 assignment, non-resizing
TMatrix< T > & operator= (const TMatrix< T > &) HOT
TMatrix< T > & operator= (TSMatrix< T >)
TMatrix< T > & operator= (const T &)
TMatrix< T > & alias (const TMatrix< T > &m)
TMatrix< T > & operator+= (TMatrix< T >)
 arithmetics ...
TMatrix< T > & operator+= (const Matrix< T > &)
TMatrix< T > & operator+= (const T &)
TMatrix< T > & operator+= (TSMatrix< T >)
TMatrix< T > & operator-= (TMatrix< T >)
TMatrix< T > & operator-= (const Matrix< T > &)
TMatrix< T > & operator-= (const T &)
TMatrix< T > & operator-= (TSMatrix< T >)
TSMatrix< Toperator*= (const T &)
TSMatrix< Toperator/= (const T &)
TMatrix< T > & operator- ()
TMatrix< T > & operator+ (TMatrix< T >)
TMatrix< T > & operator+ (TSMatrix< T >)
TMatrix< T > & operator+ (const Matrix< T > &)
TMatrix< T > & operator+ (const T &)
TMatrix< T > & operator- (TMatrix< T >)
TMatrix< T > & operator- (TSMatrix< T >)
TMatrix< T > & operator- (const Matrix< T > &)
TMatrix< T > & operator- (const T &)
TSMatrix< Toperator* (const T &)
TSMatrix< Toperator/ (const T &)
TMatrix< Toperator* (const Matrix< T > &)
TMatrix< Toperator* (TMatrix< T >)
TMatrix< Toperator* (TSMatrix< T >)
TVector< Toperator* (const Vector< T > &v)
TVector< Toperator* (TVector< T > &tv)
TVector< Toperator* (const TSVector< T > &tsv)
TMatrix< T > & swap (TMatrix< T > &)
TMatrix< Ttransposed_copy () const
 Inefficient! Use transMult if possible.
TMatrix< T > & transpose ()
T operator() (const unsigned int, const unsigned int) const HOT
 Element access (desctructive for TMatrix!).
Mat_Brack< Toperator[] (const unsigned int i) const
Tsetval (const T &val, const unsigned int r, const unsigned int c)
Tsetval (const unsigned r, const unsigned c)
tbci_traits< T >::const_refval_type get (const unsigned r, const unsigned c) const
 get, set and getcref are used internally and not for public consumption
Tset (const T &val, const unsigned r, const unsigned c)
const Tgetcref (const unsigned r, const unsigned c) const
const Tgetrowptr (const unsigned r) const
 Helpers for matvecmul.
Tgetrowptr (const unsigned r)
bool operator== (const Matrix< T > &m)
 Comparison.
bool operator!= (const Matrix< T > &m)
bool operator== (TMatrix< T > tm)
bool operator!= (TMatrix< T > tm)
bool operator== (TSMatrix< T >)
bool operator!= (TSMatrix< T > ts)
unsigned int columns () const
 number of columns
unsigned int rows () const
 number of rows
unsigned long size () const
 number of elements
TVector< Toperator() (const unsigned int) const
 Row vector.
TVector< Tget_row (const unsigned int) const
 Row vector.
TVector< Tget_col (const unsigned int) const
 Column vector.
void set_row (const Vector< T > &, const unsigned int)
 Fill complete row.
void set_col (const Vector< T > &, const unsigned int)
 Fill complete column.
void set_row_partial (const Vector< T > &, const unsigned int, const unsigned int)
 Fill partial row.
void set_col_partial (const Vector< T > &, const unsigned int, const unsigned int)
 Fill partial column.
TMatrix< T > & resize (const unsigned int, const unsigned int)
 Resize Matrix, specifying rows and columns.
TMatrix< T > & resize (const unsigned int d)
 Resize Matrix to square shape.
TMatrix< T > & resize (const T &, const unsigned int, const unsigned int)
 Resize Matrix and fill with value.
TMatrix< T > & resize (const TMatrix< T > &)
 Resizing assignment.
TMatrix< T > & cheapdownsizerow (const unsigned)
 Resize number of rows without actually freeing memory (efficiency).
TMatrix< T > & fill (const T &=(T) 0)
 Fill matrix.
TMatrix< T > & clear ()
 Clear matrix (fill with 0).
TMatrix< T > & fill (const Vector< T > &)
 Fill complete matrix by vector elements (m00, m01, ... m0C, m10, ...).
TMatrix< T > & setunit (const T &=(T) 1)
 Set to unit matrix (optionally scaled).
TMatrix< T > & row_expand (const unsigned int r)
 Set new numbers of rows to matrix (expansion only).
TMatrix< T > & row_expand (const TMatrix< T > &m)
 Append matrix below existing one.
T trace () const
 Trace.
double fabssqr () const
 Sum over all squared elements.
double fabs () const
Public Member Functions inherited from Matrix_Sig< T >
 Matrix_Sig ()
 ~Matrix_Sig ()
tbci_traits< T >::const_refval_type operator() (const unsigned, const unsigned) const
 ro access
Toperator() (const unsigned, const unsigned)
 rw access
Matrix_Sig< T > & fill (const T &)
Matrix_Sig< T > & setunit (const T &=(T) 1)
Matrix_Sig< T > & clear ()
TVector< Toperator* (const Vector_Sig< T > &) const
TVector< TtransMult (const Vector_Sig< T > &) const
unsigned int rows () const
unsigned int columns () const

Static Public Member Functions

static const char * mat_info ()
Static Public Member Functions inherited from Matrix_Sig< T >
static const char * mat_info ()

Protected Types

typedef T mat_t
typedef TTptr

Protected Member Functions

int set_ptrs ()

Protected Attributes

unsigned long dim
unsigned int row
unsigned int col:31
unsigned int freeable:1
T ** mat
 C storage layout: mat[row][col].
Tvec
Tendvec

Friends

class Matrix< T >
class TSMatrix< T >
class Tensor< T >
class Mat_Brack< T >
class Vector< T >
class TVector< T >
class BdMatrix< T >
template<typename U>
class Matrix
template<typename U>
class TMatrix
NOINST TMatrix< T > LU_solve FGD (const BdMatrix< T > &, const Matrix< T > &)
NOINST TMatrix< T > lu_solve FGD (BdMatrix< T > &, const Matrix< T > &)
NOINST TMatrix< T > LU_invert FGD (const BdMatrix< T > &)
NOINST TMatrix< T > lu_invert FGD (BdMatrix< T > &)
void FRIEND_TBCI2__ do_mat_vec_mult FGD (const unsigned start, const unsigned end, TVector< T > *res, const Matrix< T > *mat, const Vector< T > *vec) HOT
void FRIEND_TBCI2__ do_mat_tsv_mult FGD (const unsigned start, const unsigned end, TVector< T > *res, const Matrix< T > *mat, const TSVector< T > *tsv) HOT
void FRIEND_TBCI2__ do_mat_vec_transmult_exact FGD (const unsigned start, const unsigned end, TVector< T > *res, const Matrix< T > *mat, const Vector< T > *vec) HOT
void FRIEND_TBCI2__ do_mat_vec_transmult FGD (const unsigned start, const unsigned end, TVector< T > *res, const Matrix< T > *mat, const Vector< T > *vec) HOT
NOINST TMatrix< T > FRIEND_TBCI__ operator+FGD (const T &, TMatrix< T >)
NOINST TMatrix< T > FRIEND_TBCI__ operator-FGD (const T &, TMatrix< T >)
NOINST TMatrix< T > FRIEND_TBCI__ operator+FGD (const T &, const Matrix< T > &)
NOINST TMatrix< T > FRIEND_TBCI__ operator-FGD (const T &, const Matrix< T > &)
NOINST TSMatrix< T > FRIEND_TBCI__ operator*FGD (const T &, TMatrix< T >)
NOINST TSMatrix< T > FRIEND_TBCI__ operator*FGD (const T &, const Matrix< T > &)

Detailed Description

template<typename T>
class TMatrix< T >

Temporary Base Class (non referable!) for Matrices (acc. to Temp. Base Class Idiom, iX 11/96, 166)

Definition at line 109 of file matrix.h.

Member Typedef Documentation

◆ element_type

template<typename T>
typedef T TMatrix< T >::element_type

Definition at line 130 of file matrix.h.

◆ mat_t

template<typename T>
typedef T TMatrix< T >::mat_t
protected

Definition at line 112 of file matrix.h.

◆ TALIGN

template<typename T>
typedef T aligned_value_type TMatrix< T >::TALIGN(MIN_ALIGN2)

Definition at line 131 of file matrix.h.

◆ Tptr

template<typename T>
typedef T* TMatrix< T >::Tptr
protected

Definition at line 113 of file matrix.h.

◆ value_type

template<typename T>
typedef T TMatrix< T >::value_type

Definition at line 129 of file matrix.h.

Constructor & Destructor Documentation

◆ TMatrix() [1/9]

template<typename T>
TMatrix< T >::TMatrix ( const unsigned d = 0)
inlineexplicit

c'tor for square Matrix

Definition at line 445 of file matrix.h.

References col, dim, freeable, mat, NEW, row, set_ptrs(), T, and vec.

◆ TMatrix() [2/9]

template<typename T>
TMatrix< T >::TMatrix ( const unsigned r,
const unsigned c )
inline

c'tor for Matrix, specifying rows and columns

Definition at line 454 of file matrix.h.

References c, col, dim, freeable, mat, NEW, row, set_ptrs(), T, and vec.

◆ TMatrix() [3/9]

template<typename T>
TMatrix< T >::TMatrix ( const T & val,
const unsigned r,
const unsigned c )
inline

c'tor for Matrix, specifying and initialization value and rows and columns

Definition at line 462 of file matrix.h.

References c, col, dim, freeable, LIKELY, mat, NEW, row, set_ptrs(), T, TBCIFILL, and vec.

◆ TMatrix() [4/9]

template<typename T>
TMatrix< T >::TMatrix ( const Vector< T > & v,
const enum rowcolvec r = colvec )
inlineexplicit

c'tor to construct 1-column (or 1-row) Matrix from Vector

Definition at line 472 of file matrix.h.

References col, dim, freeable, LIKELY, mat, NEW, row, rowvec, set_ptrs(), T, TBCICOPY, BVector< T >::vec, and vec.

◆ TMatrix() [5/9]

template<typename T>
TMatrix< T >::TMatrix ( const TMatrix< T > & tm)
inline

aliasing copies (TBCI)

Definition at line 496 of file matrix.h.

References alias(), BCHKNR, col, dim, endvec, freeable, mat, row, TMatrix, and vec.

◆ TMatrix() [6/9]

template<typename T>
TMatrix< T >::TMatrix ( TSMatrix< T > ts)
inline

Definition at line 514 of file matrix.h.

References col, dim, endvec, freeable, mat, row, ts, and vec.

◆ TMatrix() [7/9]

template<typename T>
TMatrix< T >::TMatrix ( const Matrix< T > & m)
inline

full copying

Definition at line 484 of file matrix.h.

References col, dim, freeable, LIKELY, mat, Matrix, NEW, row, set_ptrs(), T, TBCICOPY, and vec.

◆ ~TMatrix()

template<typename T>
TMatrix< T >::~TMatrix ( )
inline

Definition at line 184 of file matrix.h.

References freeable, and real_destroy().

◆ TMatrix() [8/9]

template<typename T>
template<typename U>
TMatrix< T >::TMatrix ( const Matrix< U > & m)
inlineexplicit

Definition at line 193 of file matrix.h.

References _COL, _DIM, _ROW, col, dim, endvec, freeable, mat, Matrix, NEW, row, set_ptrs(), T, U, and vec.

◆ TMatrix() [9/9]

template<typename T>
template<typename U>
TMatrix< T >::TMatrix ( const TMatrix< U > & tm)
inlineexplicit

Definition at line 200 of file matrix.h.

References _COL, _DIM, _ROW, col, dim, endvec, freeable, mat, NEW, row, set_ptrs(), T, TMatrix, U, and vec.

Member Function Documentation

◆ alias()

template<typename T>
TMatrix< T > & TMatrix< T >::alias ( const TMatrix< T > & m)
inline

Definition at line 504 of file matrix.h.

References alias(), BCHKNR, col, dim, endvec, freeable, mat, real_destroy(), row, TMatrix, and vec.

Referenced by alias(), operator=(), and TMatrix().

◆ cheapdownsizerow()

template<typename T>
TMatrix< T > & TMatrix< T >::cheapdownsizerow ( const unsigned nr)

Resize number of rows without actually freeing memory (efficiency).

Definition at line 792 of file matrix.h.

References BCHK, col, dim, endvec, LIKELY, resize(), row, TMatrix, UNLIKELY, and vec.

◆ clear()

template<typename T>
TMatrix< T > & TMatrix< T >::clear ( )
inline

Clear matrix (fill with 0).

Definition at line 580 of file matrix.h.

References dim, T, TBCICLEAR, TMatrix, UNLIKELY, and vec.

Referenced by Matrix< T >::clear().

◆ columns()

template<typename T>
unsigned int TMatrix< T >::columns ( ) const
inline

◆ fabs()

template<typename T>
double TMatrix< T >::fabs ( ) const
inline

Definition at line 389 of file matrix.h.

References fabssqr(), GLBL__, MATH__, and sqrt().

◆ fabssqr()

template<typename T>
double TMatrix< T >::fabssqr ( ) const
inline

Sum over all squared elements.

Definition at line 1050 of file matrix.h.

References Matrix< T >::fabssqr(), and Matrix.

Referenced by fabs(), and fabssqr().

◆ fill() [1/2]

template<typename T>
TMatrix< T > & TMatrix< T >::fill ( const T & val = (T)0)
inline

Fill matrix.

Definition at line 805 of file matrix.h.

References dim, T, TBCIFILL, TMatrix, and vec.

Referenced by Matrix< T >::fill(), Matrix< T >::fill(), and operator=().

◆ fill() [2/2]

template<typename T>
TMatrix< T > & TMatrix< T >::fill ( const Vector< T > & v)
inline

Fill complete matrix by vector elements (m00, m01, ... m0C, m10, ...).

Definition at line 822 of file matrix.h.

References BCHK, BVector< T >::dim, dim, size(), T, TBCICOPY, TMatrix, BVector< T >::vec, and vec.

◆ get()

template<typename T>
tbci_traits< T >::const_refval_type TMatrix< T >::get ( const unsigned r,
const unsigned c ) const
inline

get, set and getcref are used internally and not for public consumption

Definition at line 288 of file matrix.h.

References c, and mat.

Referenced by LU_bkw_subst(), lu_decomp(), LU_det(), LU_fwd_subst(), norm_1(), norm_1(), and TSMatrix< T >::operator*().

◆ get_col()

template<typename T>
TVector< T > TMatrix< T >::get_col ( const unsigned int c) const
inline

Column vector.

Definition at line 627 of file matrix.h.

References BCHK, c, col, get_col(), index, mark_destroy(), mat, REGISTER, row, and BVector< T >::vec.

Referenced by get_col().

◆ get_row()

template<typename T>
TVector< T > TMatrix< T >::get_row ( const unsigned int r) const
inline

Row vector.

Definition at line 640 of file matrix.h.

References col, mark_destroy(), mat, T, TBCICOPY, and BVector< T >::vec.

Referenced by operator()().

◆ getcref()

template<typename T>
const T & TMatrix< T >::getcref ( const unsigned r,
const unsigned c ) const
inline

Definition at line 292 of file matrix.h.

References c, mat, and T.

Referenced by lu_decomp().

◆ getendvec()

template<typename T>
T * TMatrix< T >::getendvec ( ) const
inline

Definition at line 127 of file matrix.h.

References endvec, and T.

◆ getrowptr() [1/2]

template<typename T>
T * TMatrix< T >::getrowptr ( const unsigned r)
inline

Definition at line 297 of file matrix.h.

References mat, and T.

◆ getrowptr() [2/2]

template<typename T>
const T * TMatrix< T >::getrowptr ( const unsigned r) const
inline

Helpers for matvecmul.

Definition at line 296 of file matrix.h.

References mat, and T.

◆ getvec()

template<typename T>
T * TMatrix< T >::getvec ( ) const
inline

Definition at line 126 of file matrix.h.

References T, and vec.

◆ mark_destroy()

template<typename T>
void TMatrix< T >::mark_destroy ( ) const
inline

mark destructible

Definition at line 402 of file matrix.h.

References freeable.

Referenced by get_col(), get_row(), norm_1(), operator()(), TSMatrix< T >::operator*(), and transposed_copy().

◆ mat_info()

template<typename T>
const char * TMatrix< T >::mat_info ( )
inlinestatic

Definition at line 180 of file matrix.h.

◆ operator!=() [1/3]

template<typename T>
bool TMatrix< T >::operator!= ( const Matrix< T > & m)
inline

Definition at line 301 of file matrix.h.

References Matrix.

◆ operator!=() [2/3]

template<typename T>
bool TMatrix< T >::operator!= ( TMatrix< T > tm)
inline

Definition at line 306 of file matrix.h.

References TMatrix.

◆ operator!=() [3/3]

template<typename T>
bool TMatrix< T >::operator!= ( TSMatrix< T > ts)
inline

Definition at line 310 of file matrix.h.

References ts.

◆ operator()() [1/2]

template<typename T>
TVector< T > TMatrix< T >::operator() ( const unsigned int i) const
inline

Row vector.

Definition at line 649 of file matrix.h.

References get_row(), and i.

◆ operator()() [2/2]

template<typename T>
T TMatrix< T >::operator() ( const unsigned int r,
const unsigned int c ) const
inline

Element access (desctructive for TMatrix!).

Definition at line 523 of file matrix.h.

References c, col, EXPCHK, index, mark_destroy(), mat, row, and T.

◆ operator*() [1/7]

template<typename T>
TMatrix< T > TMatrix< T >::operator* ( const Matrix< T > & a)
inline

Definition at line 2041 of file matrix.h.

References a, Matrix, and TMatrix.

◆ operator*() [2/7]

template<typename T>
TSMatrix< T > TMatrix< T >::operator* ( const T & a)
inline

Definition at line 988 of file matrix.h.

References a, T, and TSMatrix< T >.

◆ operator*() [3/7]

template<typename T>
TVector< T > TMatrix< T >::operator* ( const TSVector< T > & tsv)
inline

Definition at line 250 of file matrix.h.

References Matrix.

◆ operator*() [4/7]

template<typename T>
TVector< T > TMatrix< T >::operator* ( const Vector< T > & v)
inline

Definition at line 246 of file matrix.h.

References Matrix.

◆ operator*() [5/7]

template<typename T>
TMatrix< T > TMatrix< T >::operator* ( TMatrix< T > a)
inline

Definition at line 2049 of file matrix.h.

References a, Matrix, and TMatrix.

◆ operator*() [6/7]

template<typename T>
TMatrix< T > TMatrix< T >::operator* ( TSMatrix< T > a)
inline

Definition at line 2056 of file matrix.h.

References a, Matrix, and TMatrix.

◆ operator*() [7/7]

template<typename T>
TVector< T > TMatrix< T >::operator* ( TVector< T > & tv)
inline

Definition at line 248 of file matrix.h.

References Matrix.

◆ operator*=()

template<typename T>
TSMatrix< T > TMatrix< T >::operator*= ( const T & a)
inline

Definition at line 955 of file matrix.h.

References a, T, and TSMatrix< T >.

◆ operator+() [1/4]

template<typename T>
TMatrix< T > & TMatrix< T >::operator+ ( const Matrix< T > & a)
inline

Definition at line 967 of file matrix.h.

References a, Matrix, operator+=(), and TMatrix.

◆ operator+() [2/4]

template<typename T>
TMatrix< T > & TMatrix< T >::operator+ ( const T & a)
inline

Definition at line 981 of file matrix.h.

References a, operator+=(), T, and TMatrix.

◆ operator+() [3/4]

template<typename T>
TMatrix< T > & TMatrix< T >::operator+ ( TMatrix< T > a)
inline

Definition at line 974 of file matrix.h.

References a, Matrix, operator+=(), and TMatrix.

◆ operator+() [4/4]

template<typename T>
TMatrix< T > & TMatrix< T >::operator+ ( TSMatrix< T > ts)
inline

Definition at line 924 of file matrix.h.

References BCHK, col, dim, row, rows(), STD_SMP_TEMPLATE3VC, TMatrix, ts, and vec.

◆ operator+=() [1/4]

template<typename T>
TMatrix< T > & TMatrix< T >::operator+= ( const Matrix< T > & a)
inline

Definition at line 882 of file matrix.h.

References a, BCHK, col, dim, Matrix, row, rows(), STD_SMP_TEMPLATE2V, TMatrix, and vec.

◆ operator+=() [2/4]

template<typename T>
TMatrix< T > & TMatrix< T >::operator+= ( const T & a)
inline

Definition at line 942 of file matrix.h.

References a, dim, STD_SMP_TEMPLATE2C, T, TMatrix, and vec.

◆ operator+=() [3/4]

template<typename T>
TMatrix< T > & TMatrix< T >::operator+= ( TMatrix< T > a)
inline

◆ operator+=() [4/4]

template<typename T>
TMatrix< T > & TMatrix< T >::operator+= ( TSMatrix< T > a)
inline

Definition at line 899 of file matrix.h.

References a, BCHK, col, dim, row, rows(), STD_SMP_TEMPLATE3VC, TMatrix, and vec.

◆ operator-() [1/5]

template<typename T>
TMatrix< T > & TMatrix< T >::operator- ( )
inline

Definition at line 833 of file matrix.h.

References dim, TMatrix, and vec.

◆ operator-() [2/5]

template<typename T>
TMatrix< T > & TMatrix< T >::operator- ( const Matrix< T > & a)
inline

Definition at line 970 of file matrix.h.

References a, Matrix, operator-=(), and TMatrix.

◆ operator-() [3/5]

template<typename T>
TMatrix< T > & TMatrix< T >::operator- ( const T & a)
inline

Definition at line 984 of file matrix.h.

References a, operator-=(), T, and TMatrix.

◆ operator-() [4/5]

template<typename T>
TMatrix< T > & TMatrix< T >::operator- ( TMatrix< T > a)
inline

Definition at line 977 of file matrix.h.

References a, Matrix, operator-=(), and TMatrix.

◆ operator-() [5/5]

template<typename T>
TMatrix< T > & TMatrix< T >::operator- ( TSMatrix< T > ts)
inline

Definition at line 932 of file matrix.h.

References BCHK, col, dim, row, rows(), STD_SMP_TEMPLATE3VC, TMatrix, ts, and vec.

◆ operator-=() [1/4]

template<typename T>
TMatrix< T > & TMatrix< T >::operator-= ( const Matrix< T > & a)
inline

Definition at line 890 of file matrix.h.

References a, BCHK, col, dim, Matrix, row, rows(), STD_SMP_TEMPLATE2V, TMatrix, and vec.

◆ operator-=() [2/4]

template<typename T>
TMatrix< T > & TMatrix< T >::operator-= ( const T & a)
inline

Definition at line 948 of file matrix.h.

References a, dim, STD_SMP_TEMPLATE2C, T, TMatrix, and vec.

◆ operator-=() [3/4]

template<typename T>
TMatrix< T > & TMatrix< T >::operator-= ( TMatrix< T > a)
inline

◆ operator-=() [4/4]

template<typename T>
TMatrix< T > & TMatrix< T >::operator-= ( TSMatrix< T > a)
inline

Definition at line 907 of file matrix.h.

References a, BCHK, col, dim, row, rows(), STD_SMP_TEMPLATE3VC, TMatrix, and vec.

◆ operator/()

template<typename T>
TSMatrix< T > TMatrix< T >::operator/ ( const T & b)
inline

Definition at line 992 of file matrix.h.

References b, BCHK, Matrix, T, and TSMatrix< T >.

◆ operator/=()

template<typename T>
TSMatrix< T > TMatrix< T >::operator/= ( const T & a)
inline

Definition at line 959 of file matrix.h.

References a, BCHK, Matrix, T, and TSMatrix< T >.

◆ operator=() [1/4]

template<typename T>
TMatrix< T > & TMatrix< T >::operator= ( const Matrix< T > & a)
inline

assignment, non-resizing

Definition at line 533 of file matrix.h.

References a, BCHK, dim, Matrix, T, TBCICOPY, TMatrix, and vec.

Referenced by Matrix< T >::operator=(), Matrix< T >::operator=(), and Matrix< T >::operator=().

◆ operator=() [2/4]

template<typename T>
TMatrix< T > & TMatrix< T >::operator= ( const T & val)
inline

Definition at line 560 of file matrix.h.

References fill(), T, and TMatrix.

◆ operator=() [3/4]

template<typename T>
TMatrix< T > & TMatrix< T >::operator= ( const TMatrix< T > & a)
inline

Definition at line 542 of file matrix.h.

References a, alias(), BCHK, col, row, and TMatrix.

◆ operator=() [4/4]

template<typename T>
TMatrix< T > & TMatrix< T >::operator= ( TSMatrix< T > a)
inline

Definition at line 551 of file matrix.h.

References a, BCHK, col, row, and TMatrix.

◆ operator==() [1/3]

template<typename T>
bool TMatrix< T >::operator== ( const Matrix< T > & m)

Comparison.

Definition at line 840 of file matrix.h.

References col, dim, LIKELY, Matrix, row, T, TBCICOMP, and vec.

◆ operator==() [2/3]

template<typename T>
bool TMatrix< T >::operator== ( TMatrix< T > tm)
inline

Definition at line 304 of file matrix.h.

References Matrix, and TMatrix.

◆ operator==() [3/3]

template<typename T>
bool TMatrix< T >::operator== ( TSMatrix< T > ts)

Definition at line 854 of file matrix.h.

References col, dim, endvec, LIKELY, Matrix, REGISTER, row, T, TBCICOMP, ts, UNLIKELY, and vec.

◆ operator[]()

template<typename T>
Mat_Brack< T > TMatrix< T >::operator[] ( const unsigned int i) const
inline

Definition at line 2355 of file matrix.h.

References EXPCHK, Mat_Brack< T >, and row.

◆ real_destroy()

◆ resize() [1/4]

template<typename T>
TMatrix< T > & TMatrix< T >::resize ( const T & v,
const unsigned int r,
const unsigned int c )

Resize Matrix and fill with value.

Definition at line 745 of file matrix.h.

References c, col, dim, endvec, LIKELY, mat, NEW, row, set_ptrs(), T, TBCIDELETE, TBCIFILL, TMatrix, UNLIKELY, and vec.

◆ resize() [2/4]

template<typename T>
TMatrix< T > & TMatrix< T >::resize ( const TMatrix< T > & m)

Resizing assignment.

Definition at line 768 of file matrix.h.

References col, dim, endvec, LIKELY, mat, NEW, row, set_ptrs(), T, TBCICOPY, TBCIDELETE, TMatrix, UNLIKELY, and vec.

◆ resize() [3/4]

template<typename T>
TMatrix< T > & TMatrix< T >::resize ( const unsigned int d)
inline

Resize Matrix to square shape.

Definition at line 364 of file matrix.h.

References resize(), and TMatrix.

Referenced by resize().

◆ resize() [4/4]

template<typename T>
TMatrix< T > & TMatrix< T >::resize ( const unsigned int r,
const unsigned int c )

Resize Matrix, specifying rows and columns.

Definition at line 655 of file matrix.h.

References c, col, dim, endvec, LIKELY, mat, MIN, NEW, row, set_ptrs(), T, TBCICOPY, TBCIDELETE, TMatrix, UNLIKELY, and vec.

Referenced by cheapdownsizerow(), Matrix< T >::resize(), Matrix< T >::resize(), and Matrix< T >::resize().

◆ row_expand() [1/2]

template<typename T>
TMatrix< T > & TMatrix< T >::row_expand ( const TMatrix< T > & m)

Append matrix below existing one.

FIXME: Correct?

Definition at line 707 of file matrix.h.

References col, dim, endvec, i, LIKELY, mat, NEW, REALLOC, REGISTER, row, T, TBCIDELETE, TMatrix, UNLIKELY, and vec.

◆ row_expand() [2/2]

template<typename T>
TMatrix< T > & TMatrix< T >::row_expand ( const unsigned int r)

Set new numbers of rows to matrix (expansion only).

Definition at line 678 of file matrix.h.

References col, dim, endvec, i, LIKELY, mat, NEW, REALLOC, REGISTER, row, T, TBCIDELETE, TMatrix, UNLIKELY, and vec.

◆ rows()

◆ set()

template<typename T>
T & TMatrix< T >::set ( const T & val,
const unsigned r,
const unsigned c )
inline

Definition at line 290 of file matrix.h.

References c, mat, and T.

◆ set_col()

template<typename T>
void TMatrix< T >::set_col ( const Vector< T > & v,
const unsigned int c )
inline

Fill complete column.

Definition at line 606 of file matrix.h.

References BCHKNR, c, col, BVector< T >::dim, index, mat, REGISTER, row, set_col(), size(), and BVector< T >::vec.

Referenced by set_col(), and set_col_partial().

◆ set_col_partial()

template<typename T>
void TMatrix< T >::set_col_partial ( const Vector< T > & ,
const unsigned int ,
const unsigned int  )
inline

Fill partial column.

Definition at line 616 of file matrix.h.

References BCHKNR, c, col, BVector< T >::dim, index, large, mat, REGISTER, row, set_col(), and BVector< T >::vec.

◆ set_ptrs()

template<typename T>
int TMatrix< T >::set_ptrs ( )
inlineprotected

Definition at line 409 of file matrix.h.

References col, dim, endvec, i, LIKELY, MAT, mat, REGISTER, RESTRICT, row, T, TBCIDELETE, UNLIKELY, VEC, and vec.

Referenced by resize(), resize(), resize(), TMatrix(), TMatrix(), TMatrix(), TMatrix(), TMatrix(), TMatrix(), and TMatrix().

◆ set_row()

template<typename T>
void TMatrix< T >::set_row ( const Vector< T > & v,
const unsigned int r )
inline

Fill complete row.

Definition at line 589 of file matrix.h.

References BCHKNR, col, BVector< T >::dim, index, mat, row, set_row(), size(), T, TBCICOPY, and BVector< T >::vec.

Referenced by operator>>(), and set_row().

◆ set_row_partial()

template<typename T>
void TMatrix< T >::set_row_partial ( const Vector< T > & ,
const unsigned int ,
const unsigned int  )
inline

Fill partial row.

Definition at line 597 of file matrix.h.

References BCHKNR, col, BVector< T >::dim, index, large, mat, row, set_row_partial(), T, TBCICOPY, and BVector< T >::vec.

Referenced by set_row_partial().

◆ setunit()

template<typename T>
TMatrix< T > & TMatrix< T >::setunit ( const T & fac = (T)1)
inline

Set to unit matrix (optionally scaled).

Definition at line 567 of file matrix.h.

References BCHK, col, dim, fac, i, LIKELY, mat, MIN, REGISTER, row, setunit(), T, TBCICLEAR, TMatrix, and vec.

Referenced by Matrix< T >::setunit(), and setunit().

◆ setval() [1/2]

template<typename T>
T & TMatrix< T >::setval ( const T & val,
const unsigned int r,
const unsigned int c )
inline

◆ setval() [2/2]

template<typename T>
T & TMatrix< T >::setval ( const unsigned r,
const unsigned c )
inline

Definition at line 283 of file matrix.h.

References c, mat, and T.

◆ size()

template<typename T>
unsigned long TMatrix< T >::size ( ) const
inline

◆ swap()

template<typename T>
TMatrix< T > & TMatrix< T >::swap ( TMatrix< T > & m)
inline

Definition at line 1759 of file matrix.h.

References col, dim, endvec, mat, row, TMatrix, and vec.

Referenced by transpose().

◆ trace()

template<typename T>
T TMatrix< T >::trace ( ) const
inline

Trace.

Definition at line 812 of file matrix.h.

References ALIGN3, BCHK, col, i, mat, MIN_ALIGN2, REGISTER, row, T, and vec.

◆ transpose()

template<typename T>
TMatrix< T > & TMatrix< T >::transpose ( )

Definition at line 1079 of file matrix.h.

References c, col, Matrix, swap(), TMatrix, and transposed_copy().

◆ transposed_copy()

template<typename T>
TMatrix< T > TMatrix< T >::transposed_copy ( ) const

Inefficient! Use transMult if possible.

Definition at line 1061 of file matrix.h.

References c, col, mark_destroy(), mat, and TMatrix.

Referenced by transpose(), and transpose().

◆ BdMatrix< T >

template<typename T>
friend class BdMatrix< T >
friend

Definition at line 131 of file matrix.h.

References Matrix, MIN_ALIGN2, and T.

◆ FGD [1/8]

template<typename T>
NOINST TMatrix< T > lu_invert FGD ( BdMatrix< T > & )
friend

References lu_invert(), NOINST, and TMatrix.

◆ FGD [2/8]

template<typename T>
NOINST TMatrix< T > lu_solve FGD ( BdMatrix< T > & ,
const Matrix< T > &  )
friend

References lu_solve(), Matrix, NOINST, and TMatrix.

◆ FGD [3/8]

template<typename T>
NOINST TMatrix< T > LU_invert FGD ( const BdMatrix< T > & )
friend

References LU_invert(), NOINST, and TMatrix.

◆ FGD [4/8]

template<typename T>
NOINST TMatrix< T > LU_solve FGD ( const BdMatrix< T > & ,
const Matrix< T > &  )
friend

References LU_solve(), Matrix, NOINST, and TMatrix.

◆ FGD [5/8]

template<typename T>
void FRIEND_TBCI2__ do_mat_tsv_mult FGD ( const unsigned start,
const unsigned end,
TVector< T > * res,
const Matrix< T > * mat,
const TSVector< T > * tsv )
friend

◆ FGD [6/8]

template<typename T>
void FRIEND_TBCI2__ do_mat_vec_transmult FGD ( const unsigned start,
const unsigned end,
TVector< T > * res,
const Matrix< T > * mat,
const Vector< T > * vec )
friend

◆ FGD [7/8]

template<typename T>
void FRIEND_TBCI2__ do_mat_vec_transmult_exact FGD ( const unsigned start,
const unsigned end,
TVector< T > * res,
const Matrix< T > * mat,
const Vector< T > * vec )
friend

References end, FRIEND_TBCI2__, HOT, mat, Matrix, res, and vec.

◆ FGD [8/8]

template<typename T>
void FRIEND_TBCI2__ do_mat_vec_mult FGD ( const unsigned start,
const unsigned end,
TVector< T > * res,
const Matrix< T > * mat,
const Vector< T > * vec )
friend

◆ Mat_Brack< T >

template<typename T>
friend class Mat_Brack< T >
friend

Definition at line 131 of file matrix.h.

Referenced by operator[]().

◆ Matrix

◆ Matrix< T >

template<typename T>
friend class Matrix< T >
friend

Definition at line 131 of file matrix.h.

◆ operator*FGD [1/2]

template<typename T>
NOINST TSMatrix< T > FRIEND_TBCI__ operator*FGD ( const T & ,
const Matrix< T > &  )
friend

References FRIEND_TBCI__, HOT, i, Matrix, NOINST, T, and TMatrix.

◆ operator*FGD [2/2]

template<typename T>
NOINST TSMatrix< T > FRIEND_TBCI__ operator*FGD ( const T & ,
TMatrix< T >  )
friend

References FRIEND_TBCI__, NOINST, T, and TMatrix.

◆ operator+FGD [1/2]

template<typename T>
NOINST TMatrix< T > FRIEND_TBCI__ operator+FGD ( const T & ,
const Matrix< T > &  )
friend

References FRIEND_TBCI__, Matrix, NOINST, T, and TMatrix.

◆ operator+FGD [2/2]

template<typename T>
NOINST TMatrix< T > FRIEND_TBCI__ operator+FGD ( const T & ,
TMatrix< T >  )
friend

References FRIEND_TBCI__, NOINST, T, and TMatrix.

◆ operator-FGD [1/2]

template<typename T>
NOINST TMatrix< T > FRIEND_TBCI__ operator-FGD ( const T & ,
const Matrix< T > &  )
friend

References FRIEND_TBCI__, Matrix, NOINST, T, and TMatrix.

◆ operator-FGD [2/2]

template<typename T>
NOINST TMatrix< T > FRIEND_TBCI__ operator-FGD ( const T & ,
TMatrix< T >  )
friend

References FRIEND_TBCI__, NOINST, T, and TMatrix.

◆ Tensor< T >

template<typename T>
friend class Tensor< T >
friend

Definition at line 131 of file matrix.h.

◆ TMatrix

◆ TSMatrix< T >

template<typename T>
friend class TSMatrix< T >
friend

Definition at line 131 of file matrix.h.

Referenced by operator*(), operator*(), operator*(), operator*=(), operator/(), and operator/=().

◆ TVector< T >

template<typename T>
friend class TVector< T >
friend

Definition at line 131 of file matrix.h.

◆ Vector< T >

template<typename T>
friend class Vector< T >
friend

Definition at line 131 of file matrix.h.

Member Data Documentation

◆ col

◆ dim

◆ endvec

◆ freeable

template<typename T>
unsigned int TMatrix< T >::freeable
mutableprotected

◆ mat

◆ row

◆ vec


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