TBCI Numerical high perf. C++ Library  2.8.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
TMatrix< T > Class Template Reference

#include <bvector.h>

Inheritance diagram for TMatrix< T >:
Inheritance graph
[legend]
Collaboration diagram for TMatrix< T >:
Collaboration graph
[legend]

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 More...
 
 TMatrix (const unsigned, const unsigned)
 c'tor for Matrix, specifying rows and columns More...
 
 TMatrix (const T &, const unsigned, const unsigned)
 c'tor for Matrix, specifying and initialization value and rows and columns More...
 
 TMatrix (const Vector< T > &, const enum rowcolvec=colvec)
 c'tor to construct 1-column (or 1-row) Matrix from Vector More...
 
 TMatrix (const TMatrix< T > &) HOT
 aliasing copies (TBCI) More...
 
 TMatrix (TSMatrix< T >)
 
 TMatrix (const Matrix< T > &) HOT
 full copying More...
 
void real_destroy ()
 real destructor More...
 
void mark_destroy () const
 mark destructible More...
 
 ~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 More...
 
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 ... More...
 
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. More...
 
TMatrix< T > & transpose ()
 
T operator() (const unsigned int, const unsigned int) const HOT
 Element access (desctructive for TMatrix!) More...
 
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 More...
 
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. More...
 
Tgetrowptr (const unsigned r)
 
bool operator== (const Matrix< T > &m)
 Comparison. More...
 
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 More...
 
unsigned int rows () const
 number of rows More...
 
unsigned long size () const
 number of elements More...
 
TVector< Toperator() (const unsigned int) const
 Row vector. More...
 
TVector< Tget_row (const unsigned int) const
 Row vector. More...
 
TVector< Tget_col (const unsigned int) const
 Column vector. More...
 
void set_row (const Vector< T > &, const unsigned int)
 Fill complete row. More...
 
void set_col (const Vector< T > &, const unsigned int)
 Fill complete column. More...
 
void set_row_partial (const Vector< T > &, const unsigned int, const unsigned int)
 Fill partial row. More...
 
void set_col_partial (const Vector< T > &, const unsigned int, const unsigned int)
 Fill partial column. More...
 
TMatrix< T > & resize (const unsigned int, const unsigned int)
 Resize Matrix, specifying rows and columns. More...
 
TMatrix< T > & resize (const unsigned int d)
 Resize Matrix to square shape. More...
 
TMatrix< T > & resize (const T &, const unsigned int, const unsigned int)
 Resize Matrix and fill with value. More...
 
TMatrix< T > & resize (const TMatrix< T > &)
 Resizing assignment. More...
 
TMatrix< T > & cheapdownsizerow (const unsigned)
 Resize number of rows without actually freeing memory (efficiency) More...
 
TMatrix< T > & fill (const T &=(T) 0)
 Fill matrix. More...
 
TMatrix< T > & clear ()
 Clear matrix (fill with 0) More...
 
TMatrix< T > & fill (const Vector< T > &)
 Fill complete matrix by vector elements (m00, m01, ... m0C, m10, ...) More...
 
TMatrix< T > & setunit (const T &=(T) 1)
 Set to unit matrix (optionally scaled) More...
 
TMatrix< T > & row_expand (const unsigned int r)
 Set new numbers of rows to matrix (expansion only) More...
 
TMatrix< T > & row_expand (const TMatrix< T > &m)
 Append matrix below existing one. More...
 
T trace () const
 Trace. More...
 
double fabssqr () const
 Sum over all squared elements. More...
 
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 More...
 
Toperator() (const unsigned, const unsigned)
 rw access More...
 
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]. More...
 
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 48 of file bvector.h.

Member Typedef Documentation

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

Definition at line 130 of file matrix.h.

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

Definition at line 112 of file matrix.h.

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

Definition at line 131 of file matrix.h.

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

Definition at line 113 of file matrix.h.

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

Definition at line 129 of file matrix.h.

Constructor & Destructor Documentation

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 TMatrix< T >::set_ptrs().

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 TMatrix< T >::set_ptrs().

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 TMatrix< T >::dim, LIKELY, TMatrix< T >::set_ptrs(), T, TBCIFILL, and TMatrix< T >::vec.

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 TMatrix< T >::dim, LIKELY, TMatrix< T >::set_ptrs(), T, TBCICOPY, BVector< T >::vec, and TMatrix< T >::vec.

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

aliasing copies (TBCI)

Definition at line 496 of file matrix.h.

References TMatrix< T >::alias(), BCHKNR, and TMatrix< T >::freeable.

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

full copying

Definition at line 484 of file matrix.h.

References TMatrix< T >::dim, LIKELY, TMatrix< T >::set_ptrs(), T, TBCICOPY, and TMatrix< T >::vec.

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

Definition at line 184 of file matrix.h.

References TMatrix< T >::freeable, and TMatrix< T >::real_destroy().

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

Definition at line 193 of file matrix.h.

References TMatrix< T >::endvec, TMatrix< T >::set_ptrs(), T, U, and TMatrix< T >::vec.

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

Definition at line 200 of file matrix.h.

References TMatrix< T >::endvec, TMatrix< T >::set_ptrs(), T, U, and TMatrix< T >::vec.

Member Function Documentation

template<typename T >
TMatrix< T > & TMatrix< T >::alias ( const TMatrix< T > &  m)
inline
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, TMatrix< T >::col, TMatrix< T >::dim, TMatrix< T >::endvec, LIKELY, TMatrix< T >::resize(), TMatrix< T >::row, UNLIKELY, and TMatrix< T >::vec.

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

Clear matrix (fill with 0)

Definition at line 580 of file matrix.h.

References TMatrix< T >::dim, T, TBCICLEAR, UNLIKELY, and TMatrix< T >::vec.

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

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

Definition at line 389 of file matrix.h.

References TMatrix< T >::fabssqr(), GLBL__, MATH__, and std::sqrt().

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().

Referenced by TMatrix< T >::fabs(), and fabssqr().

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 TMatrix< T >::dim, T, TBCIFILL, and TMatrix< T >::vec.

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

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, TMatrix< T >::dim, TMatrix< T >::size(), T, TBCICOPY, BVector< T >::vec, and TMatrix< T >::vec.

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 TMatrix< T >::mat.

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

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, TMatrix< T >::col, index, TMatrix< T >::mark_destroy(), TMatrix< T >::mat, REGISTER, TMatrix< T >::row, v, and BVector< T >::vec.

Referenced by LU_solve().

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 TMatrix< T >::col, TMatrix< T >::mark_destroy(), TMatrix< T >::mat, T, TBCICOPY, v, and BVector< T >::vec.

Referenced by TMatrix< T >::operator()().

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, and TMatrix< T >::mat.

Referenced by lu_decomp().

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

Definition at line 127 of file matrix.h.

References TMatrix< T >::endvec.

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 TMatrix< T >::mat.

Referenced by if().

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

Definition at line 297 of file matrix.h.

References TMatrix< T >::mat.

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

Definition at line 126 of file matrix.h.

References TMatrix< T >::vec.

template<typename T >
void TMatrix< T >::mark_destroy ( ) const
inline
template<typename T>
static const char* TMatrix< T >::mat_info ( )
inlinestatic

Definition at line 180 of file matrix.h.

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

Definition at line 301 of file matrix.h.

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

Definition at line 306 of file matrix.h.

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

Definition at line 310 of file matrix.h.

References ts.

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, TMatrix< T >::col, EXPCHK, index, TMatrix< T >::mark_destroy(), TMatrix< T >::mat, and TMatrix< T >::row.

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 TMatrix< T >::get_row().

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

Definition at line 988 of file matrix.h.

References a.

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

Definition at line 2041 of file matrix.h.

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

Definition at line 2049 of file matrix.h.

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

Definition at line 2056 of file matrix.h.

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

Definition at line 246 of file matrix.h.

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

Definition at line 248 of file matrix.h.

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

Definition at line 250 of file matrix.h.

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

Definition at line 955 of file matrix.h.

References a.

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

Definition at line 974 of file matrix.h.

References TMatrix< T >::operator+=().

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

Definition at line 967 of file matrix.h.

References TMatrix< T >::operator+=().

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

Definition at line 981 of file matrix.h.

References TMatrix< T >::operator+=().

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

arithmetics ...

Definition at line 917 of file matrix.h.

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

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

Definition at line 942 of file matrix.h.

References TMatrix< T >::dim, STD_SMP_TEMPLATE2C, and TMatrix< T >::vec.

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

Definition at line 833 of file matrix.h.

References TMatrix< T >::dim, and TMatrix< T >::vec.

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

Definition at line 977 of file matrix.h.

References TMatrix< T >::operator-=().

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

Definition at line 970 of file matrix.h.

References TMatrix< T >::operator-=().

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

Definition at line 984 of file matrix.h.

References TMatrix< T >::operator-=().

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

Definition at line 920 of file matrix.h.

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

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

Definition at line 948 of file matrix.h.

References TMatrix< T >::dim, STD_SMP_TEMPLATE2C, and TMatrix< T >::vec.

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

Definition at line 992 of file matrix.h.

References BCHK, and T.

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

Definition at line 959 of file matrix.h.

References BCHK, and T.

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 BCHK, TMatrix< T >::dim, T, TBCICOPY, and TMatrix< T >::vec.

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

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

Definition at line 560 of file matrix.h.

References TMatrix< T >::fill().

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

Comparison.

Definition at line 840 of file matrix.h.

References TMatrix< T >::col, TMatrix< T >::dim, LIKELY, TMatrix< T >::row, T, TBCICOMP, and TMatrix< T >::vec.

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

Definition at line 304 of file matrix.h.

template<typename T >
bool TMatrix< T >::operator== ( TSMatrix< T ts)
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, and TMatrix< T >::row.

template<typename T >
void TMatrix< T >::real_destroy ( )
inline
template<typename T >
TMatrix< T > & TMatrix< T >::resize ( const unsigned int  r,
const unsigned int  c 
)
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 TMatrix< T >::resize().

Referenced by TMatrix< T >::resize().

template<typename T >
TMatrix< T > & TMatrix< T >::resize ( const T v,
const unsigned int  r,
const unsigned int  c 
)
template<typename T >
TMatrix< T > & TMatrix< T >::resize ( const TMatrix< T > &  m)
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 TMatrix< T >::col, TMatrix< T >::dim, TMatrix< T >::endvec, i, LIKELY, TMatrix< T >::mat, NEW, REALLOC, REGISTER, TMatrix< T >::row, T, TBCIDELETE, UNLIKELY, and TMatrix< T >::vec.

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 TMatrix< T >::col, TMatrix< T >::dim, TMatrix< T >::endvec, i, LIKELY, TMatrix< T >::mat, NEW, REALLOC, REGISTER, TMatrix< T >::row, T, TBCIDELETE, UNLIKELY, and TMatrix< T >::vec.

template<typename T>
unsigned int TMatrix< T >::rows ( ) const
inline
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, and TMatrix< T >::mat.

Referenced by if().

template<typename T >
void TMatrix< T >::set_col ( const Vector< T > &  v,
const unsigned int  c 
)
inline
template<typename T >
void TMatrix< T >::set_col_partial ( const Vector< T > &  v,
const unsigned int  c,
const unsigned  int 
)
inline
template<typename T >
int TMatrix< T >::set_ptrs ( )
inlineprotected
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, TMatrix< T >::col, BVector< T >::dim, index, TMatrix< T >::mat, TMatrix< T >::row, TMatrix< T >::size(), T, TBCICOPY, and BVector< T >::vec.

Referenced by operator>>().

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

Fill partial row.

Definition at line 597 of file matrix.h.

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

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, TMatrix< T >::col, TMatrix< T >::dim, LIKELY, TMatrix< T >::mat, MIN, REGISTER, TMatrix< T >::row, T, TBCICLEAR, and TMatrix< T >::vec.

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

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

Definition at line 283 of file matrix.h.

References c, and TMatrix< T >::mat.

template<typename T>
unsigned long TMatrix< T >::size ( ) const
inline
template<typename T >
TMatrix< T > & TMatrix< T >::swap ( TMatrix< T > &  m)
inline
template<typename T >
T TMatrix< T >::trace ( ) const
inline
template<typename T >
TMatrix< T > & TMatrix< T >::transpose ( )
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, TMatrix< T >::col, TMatrix< T >::mat, and TMatrix< T >::row.

Referenced by TMatrix< T >::transpose(), and transpose().

Friends And Related Function Documentation

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

Definition at line 139 of file matrix.h.

template<typename T>
NOINST TMatrix<T> LU_solve FGD ( const BdMatrix< T > &  ,
const Matrix< T > &   
)
friend
template<typename T>
NOINST TMatrix<T> lu_solve FGD ( BdMatrix< T > &  ,
const Matrix< T > &   
)
friend
template<typename T>
NOINST TMatrix<T> LU_invert FGD ( const BdMatrix< T > &  )
friend
template<typename T>
NOINST TMatrix<T> lu_invert FGD ( BdMatrix< T > &  )
friend
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
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
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
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
template<typename T>
friend class Mat_Brack< T >
friend

Definition at line 136 of file matrix.h.

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

Definition at line 190 of file matrix.h.

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

Definition at line 133 of file matrix.h.

template<typename T>
NOINST TSMatrix<T> FRIEND_TBCI__ operator*FGD ( const T ,
TMatrix< T  
)
friend
template<typename T>
NOINST TSMatrix<T> FRIEND_TBCI__ operator*FGD ( const T ,
const Matrix< T > &   
)
friend
template<typename T>
NOINST TMatrix<T> FRIEND_TBCI__ operator+FGD ( const T ,
TMatrix< T  
)
friend
template<typename T>
NOINST TMatrix<T> FRIEND_TBCI__ operator+FGD ( const T ,
const Matrix< T > &   
)
friend
template<typename T>
NOINST TMatrix<T> FRIEND_TBCI__ operator-FGD ( const T ,
TMatrix< T  
)
friend
template<typename T>
NOINST TMatrix<T> FRIEND_TBCI__ operator-FGD ( const T ,
const Matrix< T > &   
)
friend
template<typename T>
friend class Tensor< T >
friend

Definition at line 135 of file matrix.h.

template<typename T>
template<typename U >
friend class TMatrix
friend

Definition at line 191 of file matrix.h.

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

Definition at line 134 of file matrix.h.

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

Definition at line 138 of file matrix.h.

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

Definition at line 137 of file matrix.h.

Member Data Documentation

template<typename T>
unsigned int TMatrix< T >::col
protected
template<typename T>
unsigned long TMatrix< T >::dim
protected
template<typename T>
T * TMatrix< T >::endvec
protected
template<typename T>
unsigned int TMatrix< T >::freeable
mutableprotected
template<typename T>
T** TMatrix< T >::mat
protected
template<typename T>
unsigned int TMatrix< T >::row
protected
template<typename T>
T * TMatrix< T >::vec
protected

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