|
|
| TDiagMatrix () |
| | Creates a diagonal matrix of dimension 0 x 0.
|
| |
| | TDiagMatrix (int r, int c, const MT v=(MT) 0) |
| | Creates a diagonal matrix of dimension r x c. More...
|
| |
| | TDiagMatrix (const TDiagMatrix< MT > &mat) |
| | Creates a diagonal matrix as a copy of another. More...
|
| |
|
virtual | ~TDiagMatrix () |
| | Matrix destructor.
|
| |
| MatrixStorage | StorageType () const |
| | Returns the matrix storage type. More...
|
| |
| void | New (int nrows, int ncols) |
| | Resizes and resets the matrix. More...
|
| |
| virtual MT | Get (int r, int c) const |
| | Retrieves a matrix element. More...
|
| |
| TVector< MT > | Row (int r) const |
| | Returns a vector containing a copy of row 'r'. More...
|
| |
| TVector< MT > | Col (int c) const |
| | Returns a vector containing a copy of column 'c'. More...
|
| |
| int | SparseRow (int r, idxtype *colidx, MT *val) const |
| | Returns a row of the matrix in sparse format. More...
|
| |
| void | ColScale (const TVector< MT > &scale) |
| | Scales the matrix columns. More...
|
| |
| void | RowScale (const TVector< MT > &scale) |
| | Scales the matrix rows. More...
|
| |
| TDiagMatrix & | operator= (const TDiagMatrix< MT > &mat) |
| | Matrix assignment. More...
|
| |
| TDiagMatrix & | operator= (const MT &v) |
| | Constant diagonal assignment. More...
|
| |
| void | Copy (const TDiagMatrix< MT > &mat) |
| | Matrix copy operation. More...
|
| |
| | operator TDenseMatrix< MT > () |
| | Cast to full matrix. More...
|
| |
| MT & | operator() (int r, int c) |
| | Element access. More...
|
| |
| TDiagMatrix | operator+ (const TDiagMatrix &mat) const |
| | Matrix addition. More...
|
| |
| TDiagMatrix | operator- (const TDiagMatrix &mat) const |
| | Matrix subtraction. More...
|
| |
| bool | Exists (int r, int c) const |
| | Checks allocation of a matrix element. More...
|
| |
| int | Get_index (int r, int c) const |
| | Returns data array index for an element. More...
|
| |
| MT | GetNext (int &r, int &c) const |
| | Element iterator. More...
|
| |
| void | Ax (const TVector< MT > &x, TVector< MT > &b) const |
| | Matrix-vector multiplication. More...
|
| |
| void | Ax (const TVector< MT > &x, TVector< MT > &b, int r1, int r2) const |
| | Partial matrix-vector multiplication. More...
|
| |
| void | ATx (const TVector< MT > &x, TVector< MT > &b) const |
| | Transpose matrix-vector multiplication. More...
|
| |
|
| TGenericSparseMatrix () |
| | Create a sparse matrix of size 0 x 0.
|
| |
| | TGenericSparseMatrix (int rows, int cols, int nv=0, const MT *data=0) |
| | Create a sparse matrix of logical size rows x cols. More...
|
| |
|
| TGenericSparseMatrix (int rows, int cols, int nv, MT *data, CopyMode cmode=DEEP_COPY) |
| |
|
| TGenericSparseMatrix (const TGenericSparseMatrix< MT > &m) |
| | Constructs a matrix as a copy of 'm'.
|
| |
|
virtual | ~TGenericSparseMatrix () |
| | Destructor.
|
| |
|
virtual void | Unlink () |
| |
|
void | Initialise (int nv, const MT *data) |
| |
|
void | Initialise (int nv, MT *data, CopyMode cmode) |
| |
|
void | Zero () |
| |
|
int | nVal () const |
| |
|
MT & | Val (int i) |
| |
|
MT * | ValPtr () |
| |
|
const MT * | ValPtr () const |
| |
|
virtual void | Add (int r, int c, const MT &val) |
| |
|
TGenericSparseMatrix & | operator*= (const MT &sc) |
| |
|
TVector< MT > | operator* (const TVector< MT > &x) const |
| |
|
TVector< MT > | ATx (const TVector< MT > &x) const |
| |
|
double | FillFraction () const |
| |
|
virtual void | Display (std::ostream &os) const |
| |
|
virtual void | PrintFillinGraph (const char *fname, int maxdim=600, bool binary=true, bool antialias=true) |
| |
| virtual void | ExportRCV (std::ostream &os) |
| | Write sparse matrix to ASCII output stream. More...
|
| |
|
| TMatrix () |
| | Create a matrix of size 0 x 0.
|
| |
| | TMatrix (int nrows, int ncols) |
| | Create a matrix of logical size nrows x ncols. More...
|
| |
| | TMatrix (const TMatrix< MT > &m) |
| | Create a matrix as a copy of another matrix. More...
|
| |
| virtual | ~TMatrix () |
| | Destroy the matrix. More...
|
| |
| int | Dim (RC rc) const |
| | Return a matrix dimension. More...
|
| |
| int | nRows () const |
| | Return number of rows of the matrix. More...
|
| |
| int | nCols () const |
| | Return number of columns of the matrix. More...
|
| |
| bool | isSparse () const |
| | Return sparse storage flag. More...
|
| |
| bool | isFull () const |
| | Return dense storage flag. More...
|
| |
| MT | operator() (int r, int c) const |
| | Matrix element access (read only) More...
|
| |
| virtual void | SetRow (int r, const TVector< MT > &row) |
| | Substitute a row of the matrix. More...
|
| |
| virtual TVector< MT > | Diag () const |
| | Returns the matrix diagonal as a vector. More...
|
| |
| virtual TVector< MT > | ColNorm () const |
| | Returns vector of column norms. More...
|
| |
|
TVector< MT > | operator* (const TVector< MT > &x) const |
| |
|
TVector< MT > | ATx (const TVector< MT > &x) const |
| |
|
virtual void | Transpone () |
| |
|
virtual MT | RowMult (int r, MT *x) const |
| |
| void | Export (std::ostream &os) const |
| | Write matrix to ASCII stream. More...
|
| |
|
void | Print (std::ostream &os=std::cout, int n=80) const |
| |
|
void | PrintNzeroGraph (char *fname) |
| |
|
virtual int | pcg (const TVector< MT > &b, TVector< MT > &x, double &tol, TPreconditioner< MT > *precon=0, int maxit=0) const |
| |
|
virtual void | pcg (const TVector< MT > *b, TVector< MT > *x, int nrhs, double tol, int maxit=0, TPreconditioner< MT > *precon=0, IterativeSolverResult *res=0) const |
| |
|
virtual int | bicgstab (const TVector< MT > &b, TVector< MT > &x, double &tol, TPreconditioner< MT > *precon=0, int maxit=0) const |
| |
|
virtual void | bicgstab (const TVector< MT > *b, TVector< MT > *x, int nrhs, double tol, int maxit=0, TPreconditioner< MT > *precon=0, IterativeSolverResult *res=0) const |
| |
|
template<> |
| int | pcg (const FVector &b, FVector &x, double &tol, TPreconditioner< float > *precon, int maxit) const |
| |
|
template<> |
| void | pcg (const FVector *b, FVector *x, int nrhs, double tol, int maxit, TPreconditioner< float > *precon, IterativeSolverResult *res) const |
| |
|
template<> |
| int | bicgstab (const FVector &b, FVector &x, double &tol, TPreconditioner< float > *precon, int maxit) const |
| |
|
template<> |
| void | bicgstab (const FVector *b, FVector *x, int nrhs, double tol, int maxit, TPreconditioner< float > *precon, IterativeSolverResult *res) const |
| |
template<class MT>
class TDiagMatrix< MT >
Diagonal matrix class.
A sparse matrix class which has nonzeros only on the diagonal. Also supports non-square matrices. Diagonal elements are always allocated, even if they are zero. The following template types have been instantiated: