FMatrix[ deal | Source | Keywords | Summary | Ancestors | All Members | Descendants ]
| 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: |
Back to the top of FMatrix
Number of rows
int m() const ;
Function is currently defined inline.
Back to the top of FMatrix
Number of columns
int n() const ;
Function is currently defined inline.
Back to the top of FMatrix
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
Destructor.
~FMatrix() ;
Function is currently defined inline.
Back to the top of FMatrix
Reinitialization of rectangular matrix.
void reinit() ;
Function is currently defined inline.
Back to the top of FMatrix
Reinitialization of rectangular matrix.
void reinit(int m, int n) ;
Function is currently defined inline.
Back to the top of FMatrix
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
Exchange contents of rows i and j
void swap_row(int i, int j);
Back to the top of FMatrix
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.
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.
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
Replace this by its inverse matrix calculated with Gauß-Jordan algorithm.
void gauss_jordan();
Back to the top of FMatrix
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
| 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
Back to the top of FMatrix
Back to the top of FMatrix
Report problems to jkotula@vitalimages.com