|
| TDenseMatrix () |
| Create a dense matrix of size 0 x 0.
|
|
| TDenseMatrix (int r, int c) |
| Create a dense matrix of size r x c. More...
|
|
| TDenseMatrix (int n) |
| Create a dense square matrix of size n x n. More...
|
|
| TDenseMatrix (const TDenseMatrix< MT > &m) |
| Create a dense matrix as a copy of another dense matrix. More...
|
|
| TDenseMatrix (const TDenseMatrix< MT > &m, int i0, int j0, int i1, int j1) |
| Construct a matrix by copying a sub-block of another matrix. More...
|
|
| TDenseMatrix (int r, int c, MT *values) |
| Create a dense r x c matrix with a list of values. More...
|
|
| TDenseMatrix (int r, int c, const char *valstr) |
| Create a dense r x c matrix with a string of values. More...
|
|
| TDenseMatrix (const TSymMatrix< MT > &A) |
| Create a dense square matrix from a symmetric matrix. More...
|
|
| TDenseMatrix (const TCompRowMatrix< MT > &A) |
| Create a dense matrix from a compressed row matrix. More...
|
|
| ~TDenseMatrix () |
| Destructor. De-allocates the matrix.
|
|
MatrixStorage | StorageType () const |
| Matrix storage class. More...
|
|
void | New (int r, int c) |
| Resize and reset the matrix. More...
|
|
void | Zero () |
|
void | Zero (int n) |
|
void | Zero (int r, int c) |
|
void | Identity () |
|
void | Identity (int n) |
|
void | Identity (int r, int c) |
|
MT | Get (int r, int c) const |
| Retrieve a matrix element. More...
|
|
void | Set (int r, int c, MT v) |
|
MT | operator() (int r, int c) const |
|
MT & | operator() (int r, int c) |
|
MT * | ValPtr () |
|
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 *ci, MT *rv) const |
| Returns a row of the matrix in sparse format. More...
|
|
void | SetRow (int r, const TVector< MT > &rval) |
| Substitute a row of the matrix. More...
|
|
void | ColScale (const TVector< MT > &scale) |
|
void | RowScale (const TVector< MT > &scale) |
|
TVector< MT > | RowSum () const |
| Returns a vector of row sums. More...
|
|
TVector< MT > | RowSumSq () const |
| Returns a vector of sum of squares for each row. More...
|
|
TVector< MT > | ColSum () const |
| Returns a vector of column sums. More...
|
|
TVector< MT > | ColSumSq () const |
| Returns a vector of sum of squares for each column. More...
|
|
void | Ax (const TVector< MT > &x, TVector< MT > &b) const |
|
void | ATx (const TVector< MT > &x, TVector< MT > &b) const |
|
void | AB (const TDenseMatrix< MT > &A, const TDenseMatrix< MT > &B) |
|
MT | colmult (int c1, int c2) |
|
TDenseMatrix< MT > & | operator= (const TDenseMatrix< MT > &m) |
|
TDenseMatrix< MT > & | operator= (MT v) |
|
TDenseMatrix< MT > | operator+ (const TDenseMatrix< MT > &m) const |
|
TDenseMatrix< MT > | operator- (const TDenseMatrix< MT > &m) const |
|
TDenseMatrix< MT > | operator* (const TDenseMatrix< MT > &m) const |
|
TVector< MT > | operator* (const TVector< MT > &x) const |
|
TDenseMatrix< MT > | operator* (const MT &mt) const |
|
TDenseMatrix< MT > | operator/ (const MT &mt) const |
|
TDenseMatrix< MT > & | operator*= (const MT &mt) |
|
TDenseMatrix< MT > & | operator/= (const MT &mt) |
|
MT * | data_buffer () |
|
const MT * | data_buffer () const |
|
| 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 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 |
|
|
TDenseMatrix< MT > | transpose (const TDenseMatrix< MT > &A) |
|
TDenseMatrix< MT > | cath (const TDenseMatrix< MT > &A, const TDenseMatrix< MT > &B) |
| Concatenate two matrices horizontally. More...
|
|
TDenseMatrix< MT > | catv (const TDenseMatrix< MT > &A, const TDenseMatrix< MT > &B) |
| Concatenate two matrices vertically. More...
|
|
TSymMatrix< MT > | ATA (const TDenseMatrix< MT > &A) |
|
TSymMatrix< MT > | AAT (const TDenseMatrix< MT > &A) |
|
TDenseMatrix< MT > | kron (const TDenseMatrix< MT > &A, const TDenseMatrix< MT > &B) |
|
MT | det (const TDenseMatrix< MT > &A, TDenseMatrix< MT > *Ai) |
|
TDenseMatrix< MT > | inverse (const TDenseMatrix< MT > &A) |
|
int | QRFactorize (TDenseMatrix< MT > &A, TVector< MT > &c, TVector< MT > &d) |
|
void | RSolve (const TDenseMatrix< MT > &A, const TVector< MT > &d, TVector< MT > &b) |
|
void | QRSolve (const TDenseMatrix< MT > &A, const TVector< MT > &c, const TVector< MT > &d, const TVector< MT > &b, TVector< MT > &x) |
|
void | LUFactorize (TDenseMatrix< MT > &a, IVector &indx, double &d) |
|
void | LUSolve (const TDenseMatrix< MT > &a, const IVector &indx, TVector< MT > &b) |
|
std::istream & | operator>> (std::istream &is, TDenseMatrix< MT > &m) |
|
std::ostream & | operator<< (std::ostream &os, const TDenseMatrix< MT > &m) |
|
template<class MT>
class TDenseMatrix< MT >
Dense matrix class.
A fully populated matrix type that stores its elements in row order. Supports all operations inherited from the matrix base class interface, such as row and column norms, row and column scaling, matrix x vector operations, and various direct and iterative linear solvers.