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

C++ class for banded matrices using band storage in a one-dimensional array. More...

#include <f_bandmatrix.h>

Inheritance diagram for F_BandMatrix< T >:
Inheritance graph
[legend]
Collaboration diagram for F_BandMatrix< 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

 F_BandMatrix ()
 
 F_BandMatrix (unsigned int dimension, unsigned int superDiags=0, unsigned int subDiags=0)
 
 F_BandMatrix (const F_BandMatrix< T > &m)
 
 F_BandMatrix (const Matrix< T > &m)
 
 ~F_BandMatrix ()
 
void clear ()
 
T operator() (unsigned int row, unsigned int column) const
 
Toperator() (unsigned int row, unsigned int column)
 
void setval (const T z, unsigned int row, unsigned int column)
 
Tsetval (unsigned r, unsigned c)
 
TVector< Tget_col (unsigned int column) const
 
void set_col (const Vector< T > &v, unsigned int column)
 
void set_col (const TVector< T > &tv, unsigned int column)
 
void set_col (const TSVector< T > &tsv, unsigned int column)
 
unsigned int rows () const
 
unsigned int columns () const
 
unsigned int size () const
 
unsigned int numSuper () const
 
unsigned int numSub () const
 
unsigned int ldab () const
 
void resize (unsigned int newDim, unsigned int newSuper, unsigned int newSub)
 
F_BandMatrix< T > & operator= (const F_BandMatrix< T > &m)
 
TVector< TtransMult (const Vector< T > &v) const
 
TVector< TtransMult (const TVector< T > &tv) const
 
TVector< TtransMult (const TSVector< T > &tsv) const
 
F_BandMatrix< T > & operator*= (const T z)
 
F_BandMatrix< T > & operator/= (const T z)
 
F_BandMatrix< Ttransposed_copy () const
 
F_BandMatrix< T > & transpose ()
 transpose() does change the object! More...
 
T *const & get_fortran_matrix () const
 
F_BandMatrix< T > & swap (F_BandMatrix< T > &m)
 
- 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
 

Protected Member Functions

void allocate (unsigned int dimension, unsigned int superDiags, unsigned int subDiags)
 
void destroy ()
 
void copy (const F_BandMatrix< T > &m)
 
void find_super (const Matrix< T > &m)
 Find number of super diagonals. More...
 
void find_sub (const Matrix< T > &m)
 Find number of sub diagonals. More...
 

Protected Attributes

unsigned int dim
 
unsigned int super
 
unsigned int sub
 
Tcomp
 
T dummy
 

Friends

bool operator==FGD (const F_BandMatrix< T > &, const F_BandMatrix< T > &)
 
bool operator!=FGD (const F_BandMatrix< T > &, const F_BandMatrix< T > &)
 
F_BandMatrix< Toperator-FGD (const F_BandMatrix< T > &m)
 
TVector< T > do_fbdmat_vec_mul FGD (const F_BandMatrix< T > &m, const Vector< T > &v)
 
F_BandMatrix< T > do_fbdmat_scale FGD (const F_BandMatrix< T > &m, const T z)
 
F_BandMatrix< T > do_fbdmat_scale FGD (const T z, const F_BandMatrix< T > &m)
 
F_BandMatrix< Toperator/FGD (const F_BandMatrix< T > &m, T const z)
 
F_BandMatrix< Toperator+FGD (const F_BandMatrix< T > &, const F_BandMatrix< T > &)
 
F_BandMatrix< Toperator-FGD (const F_BandMatrix< T > &, const F_BandMatrix< T > &)
 
STD__ ostream & operator<< FGD (STD__ ostream &stream, const F_BandMatrix< T > &m)
 

Additional Inherited Members

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

Detailed Description

template<typename T>
class F_BandMatrix< T >

C++ class for banded matrices using band storage in a one-dimensional array.

Definition at line 46 of file f_bandmatrix.h.

Member Typedef Documentation

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

Definition at line 63 of file f_bandmatrix.h.

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

Definition at line 64 of file f_bandmatrix.h.

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

Definition at line 62 of file f_bandmatrix.h.

Constructor & Destructor Documentation

template<typename T>
F_BandMatrix< T >::F_BandMatrix ( )
inline

Definition at line 66 of file f_bandmatrix.h.

References F_BandMatrix< T >::allocate().

template<typename T>
F_BandMatrix< T >::F_BandMatrix ( unsigned int  dimension,
unsigned int  superDiags = 0,
unsigned int  subDiags = 0 
)
inline

Definition at line 68 of file f_bandmatrix.h.

References F_BandMatrix< T >::allocate().

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

Definition at line 73 of file f_bandmatrix.h.

References F_BandMatrix< T >::copy().

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

Definition at line 462 of file f_bandmatrix.h.

References BCHKNR, c, TMatrix< T >::columns(), MAX, MIN, and TMatrix< T >::rows().

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

Definition at line 76 of file f_bandmatrix.h.

References F_BandMatrix< T >::destroy().

Member Function Documentation

template<typename T >
void F_BandMatrix< T >::allocate ( unsigned int  dimension,
unsigned int  superDiags,
unsigned int  subDiags 
)
protected

Definition at line 481 of file f_bandmatrix.h.

References BCHKNR, NULL, and T.

Referenced by F_BandMatrix< T >::F_BandMatrix().

template<typename T >
void F_BandMatrix< T >::clear ( )

Definition at line 600 of file f_bandmatrix.h.

References T.

Referenced by lu_solve().

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

Definition at line 95 of file f_bandmatrix.h.

References F_BandMatrix< T >::dim.

Referenced by eig(), lu_solve(), and lu_solve_expert().

template<typename T >
void F_BandMatrix< T >::copy ( const F_BandMatrix< T > &  m)
protected
template<typename T >
void F_BandMatrix< T >::destroy ( )
inlineprotected

Definition at line 499 of file f_bandmatrix.h.

References NULL.

Referenced by F_BandMatrix< T >::~F_BandMatrix().

template<typename T >
void F_BandMatrix< T >::find_sub ( const Matrix< T > &  m)
inlineprotected

Find number of sub diagonals.

Definition at line 453 of file f_bandmatrix.h.

References c, and T.

template<typename T >
void F_BandMatrix< T >::find_super ( const Matrix< T > &  m)
inlineprotected

Find number of super diagonals.

Definition at line 443 of file f_bandmatrix.h.

References T.

template<typename T >
TVector< T > F_BandMatrix< T >::get_col ( unsigned int  column) const

Definition at line 212 of file f_bandmatrix.h.

References BCHK, i, index, and TVector< T >::set().

template<typename T>
T* const& F_BandMatrix< T >::get_fortran_matrix ( ) const
inline

Definition at line 141 of file f_bandmatrix.h.

References F_BandMatrix< T >::comp.

Referenced by eig(), lu_solve(), and lu_solve_expert().

template<typename T>
unsigned int F_BandMatrix< T >::ldab ( ) const
inline

Definition at line 99 of file f_bandmatrix.h.

References F_BandMatrix< T >::sub, and F_BandMatrix< T >::super.

Referenced by lu_solve(), and lu_solve_expert().

template<typename T>
unsigned int F_BandMatrix< T >::numSub ( ) const
inline

Definition at line 98 of file f_bandmatrix.h.

References F_BandMatrix< T >::sub.

Referenced by eig(), lu_solve(), lu_solve_expert(), operator+(), and operator-().

template<typename T>
unsigned int F_BandMatrix< T >::numSuper ( ) const
inline

Definition at line 97 of file f_bandmatrix.h.

References F_BandMatrix< T >::super.

Referenced by eig(), lu_solve(), lu_solve_expert(), operator+(), and operator-().

template<typename T >
T F_BandMatrix< T >::operator() ( unsigned int  row,
unsigned int  column 
) const
inline

Definition at line 168 of file f_bandmatrix.h.

References BCHK, and index.

Referenced by F_BandMatrix< T >::setval().

template<typename T >
T & F_BandMatrix< T >::operator() ( unsigned int  row,
unsigned int  column 
)
inline

Definition at line 182 of file f_bandmatrix.h.

References BCHK, index, and T.

template<typename T >
F_BandMatrix< T > & F_BandMatrix< T >::operator*= ( const T  z)

Definition at line 413 of file f_bandmatrix.h.

template<typename T >
F_BandMatrix< T > & F_BandMatrix< T >::operator/= ( const T  z)

Definition at line 433 of file f_bandmatrix.h.

template<typename T >
F_BandMatrix< T > & F_BandMatrix< T >::operator= ( const F_BandMatrix< T > &  m)
template<typename T >
void F_BandMatrix< T >::resize ( unsigned int  newDim,
unsigned int  newSuper,
unsigned int  newSub 
)
inline

Definition at line 203 of file f_bandmatrix.h.

template<typename T>
unsigned int F_BandMatrix< T >::rows ( ) const
inline

Definition at line 94 of file f_bandmatrix.h.

References F_BandMatrix< T >::dim.

template<typename T >
void F_BandMatrix< T >::set_col ( const Vector< T > &  v,
unsigned int  column 
)

Definition at line 223 of file f_bandmatrix.h.

References BCHKNR, i, index, and v.

template<typename T >
void F_BandMatrix< T >::set_col ( const TVector< T > &  tv,
unsigned int  column 
)
inline

Definition at line 238 of file f_bandmatrix.h.

References v.

template<typename T >
void F_BandMatrix< T >::set_col ( const TSVector< T > &  tsv,
unsigned int  column 
)
inline

Definition at line 245 of file f_bandmatrix.h.

References v.

template<typename T >
void F_BandMatrix< T >::setval ( const T  z,
unsigned int  row,
unsigned int  column 
)
inline

Definition at line 193 of file f_bandmatrix.h.

References BCHKNR, and index.

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

Definition at line 85 of file f_bandmatrix.h.

References F_BandMatrix< T >::operator()().

template<typename T>
unsigned int F_BandMatrix< T >::size ( ) const
inline

Definition at line 96 of file f_bandmatrix.h.

References F_BandMatrix< T >::dim.

Referenced by operator+(), and operator-().

template<typename T >
F_BandMatrix< T > & F_BandMatrix< T >::swap ( F_BandMatrix< T > &  m)
template<typename T >
TVector< T > F_BandMatrix< T >::transMult ( const Vector< T > &  v) const

Definition at line 345 of file f_bandmatrix.h.

References BCHK, i, MIN, res, right, TVector< T >::set(), TVector< T >::size(), sum(), T, and v.

template<typename T >
TVector< T > F_BandMatrix< T >::transMult ( const TVector< T > &  tv) const
inline

Definition at line 364 of file f_bandmatrix.h.

References v.

template<typename T >
TVector< T > F_BandMatrix< T >::transMult ( const TSVector< T > &  tsv) const
inline

Definition at line 372 of file f_bandmatrix.h.

References v.

template<typename T >
F_BandMatrix< T > & F_BandMatrix< T >::transpose ( )
inline

transpose() does change the object!

Definition at line 619 of file f_bandmatrix.h.

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

Definition at line 608 of file f_bandmatrix.h.

References c, MAX, and MIN.

Referenced by transpose().

Friends And Related Function Documentation

template<typename T>
TVector<T> do_fbdmat_vec_mul FGD ( const F_BandMatrix< T > &  m,
const Vector< T > &  v 
)
friend
template<typename T>
F_BandMatrix<T> do_fbdmat_scale FGD ( const F_BandMatrix< T > &  m,
const T  z 
)
friend
template<typename T>
F_BandMatrix<T> do_fbdmat_scale FGD ( const T  z,
const F_BandMatrix< T > &  m 
)
friend
template<typename T>
bool operator!=FGD ( const F_BandMatrix< T > &  ,
const F_BandMatrix< T > &   
)
friend
template<typename T>
F_BandMatrix<T> operator+FGD ( const F_BandMatrix< T > &  ,
const F_BandMatrix< T > &   
)
friend
template<typename T>
F_BandMatrix<T> operator-FGD ( const F_BandMatrix< T > &  m)
friend
template<typename T>
F_BandMatrix<T> operator-FGD ( const F_BandMatrix< T > &  ,
const F_BandMatrix< T > &   
)
friend
template<typename T>
F_BandMatrix<T> operator/FGD ( const F_BandMatrix< T > &  m,
T const  z 
)
friend
template<typename T>
STD__ ostream& operator<< FGD ( STD__ ostream &  stream,
const F_BandMatrix< T > &  m 
)
friend
template<typename T>
bool operator==FGD ( const F_BandMatrix< T > &  ,
const F_BandMatrix< T > &   
)
friend

Member Data Documentation

template<typename T>
T* F_BandMatrix< T >::comp
protected
template<typename T>
unsigned int F_BandMatrix< T >::dim
protected
template<typename T>
T F_BandMatrix< T >::dummy
mutableprotected

Definition at line 148 of file f_bandmatrix.h.

template<typename T>
unsigned int F_BandMatrix< T >::sub
protected
template<typename T>
unsigned int F_BandMatrix< T >::super
protected

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