TBCI::TMatrix< T > Class Template Reference

#include <matrix.h>

Inheritance diagram for TBCI::TMatrix< T >:

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

Collaboration graph
[legend]

List of all members.

Public Types

typedef T value_type
typedef T element_type
typedef T aligned_value_type

Public Member Functions

T * getvec () const
T * getendvec () 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 > &)
 aliasing copies (TBCI)
 TMatrix (TSMatrix< T >)
 TMatrix (const Matrix< T > &)
 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 > &)
 assignment, non-resizing
TMatrix< T > & operator= (const TMatrix< T > &)
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< T > operator*= (const T &)
TSMatrix< T > operator/= (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< T > operator* (const T &)
TSMatrix< T > operator/ (const T &)
TMatrix< T > operator* (const Matrix< T > &)
TMatrix< T > operator* (TMatrix< T >)
TMatrix< T > operator* (TSMatrix< T >)
TVector< T > operator* (const Vector< T > &v)
TVector< T > operator* (TVector< T > &tv)
TVector< T > operator* (const TSVector< T > &tsv)
TMatrix< T > & swap (TMatrix< T > &)
TMatrix< T > transposed_copy () const
 Inefficient! Use transMult if possible.
TMatrix< T > & transpose ()
operator() (const unsigned int, const unsigned int) const
 Element access (desctructive for TVector!).
Mat_Brack< T > operator[] (const unsigned int i) const
T & setval (const T &val, const unsigned int r, const unsigned int c)
T & setval (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
T & set (const T &val, const unsigned r, const unsigned c)
const T & getcref (const unsigned r, const unsigned c) const
const T * getcolptr (const unsigned r) const
 Helpers for matvecmul.
T * getcolptr (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< T > operator() (const unsigned int) const
 Row vector.
TVector< T > get_row (const unsigned int) const
 Row vector.
TVector< T > get_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.
trace () const
 Trace.
double fabssqr () const
 Sum over all squared elements.
double fabs () const

Static Public Member Functions

static const char * mat_info ()

Protected Types

typedef T mat_t
typedef T * Tptr

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].
T * vec
T * endvec

Friends

class Matrix< T >
class TSMatrix< T >
class Tensor< T >
class Mat_Brack< T >
class Vector< T >
class TVector< T >
class BdMatrix< T >
class Matrix
class TMatrix
TMatrix< T > LU_solve (const BdMatrix< T > &, const Matrix< T > &)
TMatrix< T > lu_solve (BdMatrix< T > &, const Matrix< T > &)
TMatrix< T > LU_invert (const BdMatrix< T > &)
 return the inverse Matrix for an already LU decomposed BdMatrix
TMatrix< T > lu_invert (BdMatrix< T > &)
 return the inverse Matrix for a BdMatrix by doing an LU decomposition
void do_mat_vec_mult (const unsigned start, const unsigned end, TVector< T > *res, const Matrix< T > *mat, const Vector< T > *vec)
void do_mat_tsv_mult (const unsigned start, const unsigned end, TVector< T > *res, const Matrix< T > *mat, const TSVector< T > *tsv)
void do_mat_vec_transmult (const unsigned start, const unsigned end, TVector< T > *res, const Matrix< T > *mat, const Vector< T > *vec)
TMatrix< T > operator+ (const T &, TMatrix< T >)
TMatrix< T > operator- (const T &, TMatrix< T >)
TMatrix< T > operator+ (const T &, const Matrix< T > &)
TMatrix< T > operator- (const T &, const Matrix< T > &)
TSMatrix< T > operator* (const T &, TMatrix< T >)
TSMatrix< T > operator* (const T &, const Matrix< T > &)


Detailed Description

template<typename T>
class TBCI::TMatrix< T >

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

Definition at line 106 of file matrix.h.


Member Typedef Documentation

template<typename T>
typedef T TBCI::TMatrix< T >::mat_t [protected]

Definition at line 109 of file matrix.h.

template<typename T>
typedef T* TBCI::TMatrix< T >::Tptr [protected]

Definition at line 110 of file matrix.h.

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

Reimplemented in TBCI::Matrix< T >.

Definition at line 126 of file matrix.h.

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

Reimplemented in TBCI::Matrix< T >.

Definition at line 127 of file matrix.h.

template<typename T>
typedef T TBCI::TMatrix< T >::aligned_value_type

Reimplemented in TBCI::Matrix< T >.

Definition at line 128 of file matrix.h.


Constructor & Destructor Documentation

template<typename T>
TBCI::TMatrix< T >::TMatrix ( const unsigned  d = 0  )  [inline, explicit]

c'tor for square Matrix

Definition at line 439 of file matrix.h.

References TBCI::TMatrix< T >::set_ptrs().

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

c'tor for Matrix, specifying rows and columns

Definition at line 448 of file matrix.h.

References TBCI::TMatrix< T >::set_ptrs().

template<typename T>
TBCI::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 456 of file matrix.h.

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

template<typename T>
TBCI::TMatrix< T >::TMatrix ( const Vector< T > &  v,
const enum rowcolvec  r = colvec 
) [inline, explicit]

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

Definition at line 466 of file matrix.h.

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

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

aliasing copies (TBCI)

Definition at line 490 of file matrix.h.

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

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

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

full copying

Definition at line 478 of file matrix.h.

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

template<typename T>
TBCI::TMatrix< T >::~TMatrix (  )  [inline]

Definition at line 178 of file matrix.h.

template<typename T>
template<typename U>
TBCI::TMatrix< T >::TMatrix ( const Matrix< U > &  m  )  [inline, explicit]

Definition at line 187 of file matrix.h.

References T, and U.

template<typename T>
template<typename U>
TBCI::TMatrix< T >::TMatrix ( const TMatrix< U > &  tm  )  [inline, explicit]

Definition at line 194 of file matrix.h.

References T, and U.


Member Function Documentation

template<typename T>
int TBCI::TMatrix< T >::set_ptrs (  )  [inline, protected]

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

Definition at line 123 of file matrix.h.

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

Definition at line 124 of file matrix.h.

template<typename T>
void TBCI::TMatrix< T >::real_destroy (  )  [inline]

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

template<typename T>
static const char* TBCI::TMatrix< T >::mat_info (  )  [inline, static]

Reimplemented from TBCI::Matrix_Sig< T >.

Reimplemented in TBCI::Matrix< T >.

Definition at line 174 of file matrix.h.

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

assignment, non-resizing

Reimplemented in TBCI::Matrix< T >.

Definition at line 527 of file matrix.h.

References BCHK, TBCI::TMatrix< T >::dim, T, TBCICOPY, and TBCI::TMatrix< T >::vec.

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

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

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

Reimplemented in TBCI::Matrix< T >.

Definition at line 554 of file matrix.h.

References TBCI::TMatrix< T >::fill().

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

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

arithmetics ...

Reimplemented in TBCI::Matrix< T >.

Definition at line 911 of file matrix.h.

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

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

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

Reimplemented in TBCI::Matrix< T >.

Definition at line 936 of file matrix.h.

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

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

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

Reimplemented in TBCI::Matrix< T >.

Definition at line 914 of file matrix.h.

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

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

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

Reimplemented in TBCI::Matrix< T >.

Definition at line 942 of file matrix.h.

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

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

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

Reimplemented in TBCI::Matrix< T >.

Definition at line 949 of file matrix.h.

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

Reimplemented in TBCI::Matrix< T >.

Definition at line 953 of file matrix.h.

References BCHK, and T.

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

Definition at line 827 of file matrix.h.

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

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

Definition at line 968 of file matrix.h.

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

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

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

Definition at line 961 of file matrix.h.

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

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

Definition at line 975 of file matrix.h.

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

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

Definition at line 971 of file matrix.h.

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

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

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

Definition at line 964 of file matrix.h.

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

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

Definition at line 978 of file matrix.h.

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

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

Definition at line 982 of file matrix.h.

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

Definition at line 986 of file matrix.h.

References BCHK, and T.

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

Definition at line 2024 of file matrix.h.

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

Definition at line 2032 of file matrix.h.

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

Definition at line 2039 of file matrix.h.

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

Definition at line 240 of file matrix.h.

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

Definition at line 242 of file matrix.h.

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

Definition at line 244 of file matrix.h.

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

template<typename T>
TMatrix< T > TBCI::TMatrix< T >::transposed_copy (  )  const [inline]

Inefficient! Use transMult if possible.

Definition at line 1055 of file matrix.h.

References TBCI::TMatrix< T >::col, TBCI::TMatrix< T >::mat, and TBCI::TMatrix< T >::row.

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

template<typename T>
TMatrix< T > & TBCI::TMatrix< T >::transpose (  )  [inline]

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

Element access (desctructive for TVector!).

Reimplemented in TBCI::Matrix< T >.

Definition at line 517 of file matrix.h.

References BCHK, TBCI::TMatrix< T >::col, TBCI::TMatrix< T >::mark_destroy(), TBCI::TMatrix< T >::mat, and TBCI::TMatrix< T >::row.

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

Definition at line 2328 of file matrix.h.

References BCHK, and TBCI::TMatrix< T >::row.

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

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

Definition at line 277 of file matrix.h.

template<typename T>
tbci_traits<T>::const_refval_type TBCI::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 282 of file matrix.h.

Referenced by TBCI::norm_1(), and TBCI::TSMatrix< T >::operator*().

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

Definition at line 284 of file matrix.h.

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

Definition at line 286 of file matrix.h.

template<typename T>
const T* TBCI::TMatrix< T >::getcolptr ( const unsigned  r  )  const [inline]

Helpers for matvecmul.

Definition at line 290 of file matrix.h.

template<typename T>
T* TBCI::TMatrix< T >::getcolptr ( const unsigned  r  )  [inline]

Definition at line 291 of file matrix.h.

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

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

Definition at line 295 of file matrix.h.

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

Definition at line 298 of file matrix.h.

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

Definition at line 300 of file matrix.h.

template<typename T>
bool TBCI::TMatrix< T >::operator== ( TSMatrix< T >  ts  )  [inline]

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

Definition at line 304 of file matrix.h.

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

template<typename T>
unsigned int TBCI::TMatrix< T >::rows (  )  const [inline]

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

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

Row vector.

Reimplemented in TBCI::Matrix< T >.

Definition at line 643 of file matrix.h.

References TBCI::TMatrix< T >::get_row().

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

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

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

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

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

template<typename T>
void TBCI::TMatrix< T >::set_col_partial ( const Vector< T > &  v,
const unsigned int  c,
const unsigned  int 
) [inline]

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

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

Resize Matrix to square shape.

Definition at line 358 of file matrix.h.

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

template<typename T>
TMatrix< T > & TBCI::TMatrix< T >::resize ( const TMatrix< T > &  m  )  [inline]

template<typename T>
TMatrix< T > & TBCI::TMatrix< T >::cheapdownsizerow ( const unsigned  nr  )  [inline]

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

Definition at line 786 of file matrix.h.

References BCHK, TBCI::TMatrix< T >::col, TBCI::TMatrix< T >::dim, TBCI::TMatrix< T >::endvec, LIKELY, TBCI::TMatrix< T >::resize(), TBCI::TMatrix< T >::row, UNLIKELY, and TBCI::TMatrix< T >::vec.

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

Fill matrix.

Reimplemented from TBCI::Matrix_Sig< T >.

Reimplemented in TBCI::Matrix< T >.

Definition at line 799 of file matrix.h.

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

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

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

Clear matrix (fill with 0).

Reimplemented from TBCI::Matrix_Sig< T >.

Reimplemented in TBCI::Matrix< T >.

Definition at line 574 of file matrix.h.

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

Referenced by TBCI::Matrix< T >::operator*().

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

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

Reimplemented in TBCI::Matrix< T >.

Definition at line 816 of file matrix.h.

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

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

Set to unit matrix (optionally scaled).

Reimplemented from TBCI::Matrix_Sig< T >.

Reimplemented in TBCI::Matrix< T >.

Definition at line 561 of file matrix.h.

References BCHK, TBCI::TMatrix< T >::col, TBCI::TMatrix< T >::dim, LIKELY, TBCI::TMatrix< T >::mat, MIN, TBCI::TMatrix< T >::row, T, TBCICLEAR, and TBCI::TMatrix< T >::vec.

template<typename T>
TMatrix< T > & TBCI::TMatrix< T >::row_expand ( const unsigned int  r  )  [inline]

template<typename T>
TMatrix< T > & TBCI::TMatrix< T >::row_expand ( const TMatrix< T > &  m  )  [inline]

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

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

Sum over all squared elements.

Reimplemented in TBCI::Matrix< T >.

Definition at line 1044 of file matrix.h.

References TBCI::Matrix< T >::fabssqr().

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

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

Reimplemented in TBCI::Matrix< T >.

Definition at line 383 of file matrix.h.

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


Friends And Related Function Documentation

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

Definition at line 130 of file matrix.h.

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

Reimplemented in TBCI::Matrix< T >.

Definition at line 131 of file matrix.h.

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

Definition at line 132 of file matrix.h.

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

Definition at line 133 of file matrix.h.

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

Definition at line 134 of file matrix.h.

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

Definition at line 135 of file matrix.h.

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

Definition at line 136 of file matrix.h.

template<typename T>
friend class Matrix [friend]

Definition at line 184 of file matrix.h.

template<typename T>
friend class TMatrix [friend]

Definition at line 185 of file matrix.h.

template<typename T>
TMatrix<T> LU_solve ( const BdMatrix< T > &  lu,
const Matrix< T > &  b 
) [friend]

Definition at line 279 of file bd_lu_solver.h.

template<typename T>
TMatrix<T> lu_solve ( BdMatrix< T > &  mat,
const Matrix< T > &  b 
) [friend]

Definition at line 295 of file bd_lu_solver.h.

template<typename T>
TMatrix<T> LU_invert ( const BdMatrix< T > &  lu  )  [friend]

return the inverse Matrix for an already LU decomposed BdMatrix

Definition at line 338 of file bd_lu_solver.h.

template<typename T>
TMatrix<T> lu_invert ( BdMatrix< T > &  mat  )  [friend]

return the inverse Matrix for a BdMatrix by doing an LU decomposition

Definition at line 355 of file bd_lu_solver.h.

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

Referenced by TBCI::job_mat_vec_mult().

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

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

template<typename T>
TMatrix<T> operator+ ( const T &  a,
TMatrix< T >  b 
) [friend]

Definition at line 997 of file matrix.h.

template<typename T>
TMatrix<T> operator- ( const T &  a,
TMatrix< T >  b 
) [friend]

Definition at line 1004 of file matrix.h.

template<typename T>
TMatrix<T> operator+ ( const T &  a,
const Matrix< T > &  b 
) [friend]

Definition at line 1020 of file matrix.h.

template<typename T>
TMatrix<T> operator- ( const T &  a,
const Matrix< T > &  b 
) [friend]

Definition at line 1028 of file matrix.h.

template<typename T>
TSMatrix<T> operator* ( const T &  a,
TMatrix< T >  b 
) [friend]

Definition at line 1012 of file matrix.h.

template<typename T>
TSMatrix<T> operator* ( const T &  a,
const Matrix< T > &  b 
) [friend]

Definition at line 1037 of file matrix.h.


Member Data Documentation

template<typename T>
unsigned long TBCI::TMatrix< T >::dim [protected]

template<typename T>
unsigned int TBCI::TMatrix< T >::row [protected]

template<typename T>
unsigned int TBCI::TMatrix< T >::col [protected]

template<typename T>
unsigned int TBCI::TMatrix< T >::freeable [mutable, protected]

template<typename T>
T** TBCI::TMatrix< T >::mat [protected]

template<typename T>
T * TBCI::TMatrix< T >::vec [protected]

template<typename T>
T * TBCI::TMatrix< T >::endvec [protected]


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

Generated on Wed Nov 20 09:29:37 2013 for TBCI Numerical high perf. C++ Library by  doxygen 1.5.6