FMatrix

Full matrix of T

[ deal | Source | Keywords | Summary | Ancestors | All Members | Descendants ]

Quick Index


Class Summary

template<class T,int M, int N> class FMatrix
{
public:
int m() const ;
int n() const ;
FMatrix(int m ,int n ) ;
~FMatrix() ;
void reinit() ;
void reinit(int m, int n) ;
void reinit(int n) ;
void reinit(const FMatrix& A) ;
T operator() (int i, int j) const ;
T& operator() (int i, int j) ;
// Copying from other matrices
FMatrix& operator = (const FMatrix&);
void add(double s, const FMatrix& src);
void add_diag(double s, const FMatrix& src);
void Tadd(double s, const FMatrix& src);
// Manipulation of rows and columns
void add_row(int i, double s, int j);
void add_row(int i, double s, int j, double t, int k);
void add_col(int i, double s, int j);
void add_col(int i, double s, int j, double t, int k);
void swap_row(int i, int j);
void swap_col(int i, int j);
// Multiplication Routines
void mmult(FMatrix& dst, const FMatrix& src) const;
void vmult(dVector& dst, const dVector& src,const int adding ) const;
void gsmult(dVector& dst, const dVector& src,const iVector& gl) const;
void Tvmult(dVector& dst,const dVector& src,const int adding ) const;
double residual(dVector& dst, const dVector& src, const dVector& right) const;
void forward(dVector& dst, const dVector& src) const;
// Solvers
void backward(dVector& dst, const dVector& src) const;
// Inversion Techniques
void gauss_jordan();
void householder(dVector& y);
double least_squares(dVector& dst, dVector& src);
// I/O
void print(FILE* fp, const char* format ) const;
protected:
}; // FMatrix

Back to the top of FMatrix


int m() const ;

Number of rows

  int m() const              
;

Function is currently defined inline.


Back to the top of FMatrix


int n() const ;

Number of columns

  int n() const              
;

Function is currently defined inline.


Back to the top of FMatrix


FMatrix(int m ,int n ) ;

Constructor for rectangular matrices with m rows and n columns.

  FMatrix(int m=M,int n=N)            
;

Function is currently defined inline.


Back to the top of FMatrix


~FMatrix() ;

Destructor.

  ~FMatrix()  
;

Function is currently defined inline.


Back to the top of FMatrix


void reinit() ;

Reinitialization of rectangular matrix.

  void reinit()            
;

Function is currently defined inline.


Back to the top of FMatrix


void reinit(int m, int n) ;

Reinitialization of rectangular matrix.

  void reinit(int m, int n)            
;

Function is currently defined inline.


Back to the top of FMatrix


void reinit(int n) ;

Reinitialization of quadratic matrix

  void reinit(int n)            
;

Function is currently defined inline.


Back to the top of FMatrix


void reinit(const FMatrix& A) ;

Reinitialization to the same dimensions of another matrix.

  void reinit(const FMatrix& A)                          
;

Function is currently defined inline.


Back to the top of FMatrix


T operator() (int i, int j) const ;

Read access to matrix elements.

  T operator() (int i, int j) const
                                                  ;

Function is currently defined inline.


Back to the top of FMatrix


T& operator() (int i, int j) ;

Read-Write access to matrix elements

  T& operator() (int i, int j)
                                                  ;

Function is currently defined inline.


Back to the top of FMatrix


FMatrix& operator = (const FMatrix&);

Assignment operator

  FMatrix& operator = (const FMatrix&);

Back to the top of FMatrix


void add(double s, const FMatrix& src);

  void add(double s, const FMatrix& src);

Back to the top of FMatrix


void add_diag(double s, const FMatrix& src);

  void add_diag(double s, const FMatrix& src);

Back to the top of FMatrix


void Tadd(double s, const FMatrix& src);

  void Tadd(double s, const FMatrix& src);

Back to the top of FMatrix


void add_row(int i, double s, int j);

Add different rows of a matrix

a(i,.) += s * a(j,.)

  void add_row(int i, double s, int j);

Back to the top of FMatrix


void add_row(int i, double s, int j, double t, int k);

Add different rows of a matrix

a(i,.) += s * a(j,.) + t * a(k,.)

  void add_row(int i, double s, int j, double t, int k);

Back to the top of FMatrix


void add_col(int i, double s, int j);

Add different columns of a matrix

a(.,i) += s * a(.,j)

  void add_col(int i, double s, int j);

Back to the top of FMatrix


void add_col(int i, double s, int j, double t, int k);

Add different columns of a matrix

a(.,i) += s * a(.,j) + t * a(.,k)

  void add_col(int i, double s, int j, double t, int k);

Back to the top of FMatrix


void swap_row(int i, int j);

Exchange contents of rows i and j

  void swap_row(int i, int j);

Back to the top of FMatrix


void swap_col(int i, int j);

Exchange contents of columns i and j

  void swap_col(int i, int j);

Back to the top of FMatrix


void mmult(FMatrix& dst, const FMatrix& src) const;

Matrix-matrix-multiplication

dst = this * src

  void mmult(FMatrix& dst, const FMatrix& src) const;

Back to the top of FMatrix


void vmult(dVector& dst, const dVector& src,const int adding ) const;

Application of a matrix to a vector.

flag adding
determines if the result is copied to dst or added.

dst (+)= this * src

  void vmult(dVector& dst, const dVector& src,const int adding = 0) const;

Back to the top of FMatrix


void gsmult(dVector& dst, const dVector& src,const iVector& gl) const;

  void gsmult(dVector& dst, const dVector& src,const iVector& gl) const;

Back to the top of FMatrix


void Tvmult(dVector& dst,const dVector& src,const int adding ) const;

Application of the transpose matrix to a vector.

flag adding
determines if the result is copied to dst or added.

dst (+)= src * this

  void Tvmult(dVector& dst,const dVector& src,const int adding=0) const;

Back to the top of FMatrix


double residual(dVector& dst, const dVector& src, const dVector& right) const;

Calculation of the residual
dst = right - this * src
and return of its norm.

  double residual(dVector& dst, const dVector& src, const dVector& right) const;

Back to the top of FMatrix


void forward(dVector& dst, const dVector& src) const;

Inversion of lower triangle

  void forward(dVector& dst, const dVector& src) const;

Back to the top of FMatrix


void backward(dVector& dst, const dVector& src) const;

Inversion of upper triangle

  void backward(dVector& dst, const dVector& src) const;

Back to the top of FMatrix


void gauss_jordan();

Replace this by its inverse matrix calculated with Gauß-Jordan algorithm.

  void gauss_jordan();

Back to the top of FMatrix


void householder(dVector& y);

QR - factorization of a matrix. The orthogonal transformation Q is applied to the vector y and the matrix. After execution of householder, the upper triangle contains the resulting matrix R, the lower the incomplete factorization matrices.

  void householder(dVector& y);

Back to the top of FMatrix


double least_squares(dVector& dst, dVector& src);

Least - Squares - Approximation by QR-factorization.

  double least_squares(dVector& dst, dVector& src);

Back to the top of FMatrix


void print(FILE* fp, const char* format ) const;

Output of the matrix in user-defined format.

  void print(FILE* fp, const char* format = 0) const;

Back to the top of FMatrix


All Members

public:
int m() const ;
int n() const ;
void reinit() ;
void reinit(int m, int n) ;
void reinit(int n) ;
void reinit(const FMatrix& A) ;
T operator() (int i, int j) const ;
T& operator() (int i, int j) ;
// Copying from other matrices
FMatrix& operator = (const FMatrix&);
void add(double s, const FMatrix& src);
void add_diag(double s, const FMatrix& src);
void Tadd(double s, const FMatrix& src);
// Manipulation of rows and columns
void add_row(int i, double s, int j);
void add_row(int i, double s, int j, double t, int k);
void add_col(int i, double s, int j);
void add_col(int i, double s, int j, double t, int k);
void swap_row(int i, int j);
void swap_col(int i, int j);
// Multiplication Routines
void mmult(FMatrix& dst, const FMatrix& src) const;
void vmult(dVector& dst, const dVector& src,const int adding ) const;
void gsmult(dVector& dst, const dVector& src,const iVector& gl) const;
void Tvmult(dVector& dst,const dVector& src,const int adding ) const;
double residual(dVector& dst, const dVector& src, const dVector& right) const;
void forward(dVector& dst, const dVector& src) const;
// Solvers
void backward(dVector& dst, const dVector& src) const;
// Inversion Techniques
void gauss_jordan();
void householder(dVector& y);
double least_squares(dVector& dst, dVector& src);
// I/O
void print(FILE* fp, const char* format ) const;
protected:

Back to the top of FMatrix


Ancestors

Class does not inherit from any other class.

Back to the top of FMatrix


Descendants

Class is not inherited by any others.

Back to the top of FMatrix


Generated from source by the Cocoon utilities on Tue Dec 17 13:39:02 2002 .

Report problems to jkotula@vitalimages.com