#include <MatTri_Type.h>
Inheritance diagram for MatTri(Type)::

Public Methods | |
| MatTri(Type) () | |
| MatTri(Type) (int n) | |
| MatTri(Type) (int nrows, int ncolumns) | |
| MatTri(Type) (const MatTri(Type) &X) | |
| MatTri(Type) (const Matrix(prm_Type) &pm) | |
| virtual | ~MatTri(Type) () |
| virtual int | getNoRows () const |
| virtual int | getNoColumns () const |
| virtual int | getNoNonzeroes () const |
| virtual void | size (int &m, int &n) const |
| int | size () const |
| virtual real | getStorage () const |
| virtual bool | makeItSimilar (Handle(Matrix(Type)) &M) const |
| virtual bool | redim (const Matrix(prm_Type) &pm) |
| bool | redim (int n) |
| bool | redim (int nrows, int ncolumns) |
| virtual bool | redim (const VecSimple(int) &ivec, const VecSimple(int) &jvec, int new_nrows, int new_ncolumns) |
| virtual void | getIndexSet (VecSimple(int) &ivec, VecSimple(int) &jvec) const |
| virtual bool | validIndexSet (const VecSimple(int) &ivec, const VecSimple(int) &jvec, const int new_nrows, const int new_ncolumns) |
| virtual Type& | elm (int i, int j) |
| Type& | operator() (int i, int j) |
| const Type& | operator() (int i, int j) const |
| const Type& | a (int i) const |
| const Type& | b (int i) const |
| const Type& | c (int i) const |
| Type& | a (int i) |
| Type& | b (int i) |
| Type& | c (int i) |
| Vec(Type)* | getaPtr () |
| Vec(Type)* | getbPtr () |
| Vec(Type)* | getcPtr () |
| Vec(Type)& | getaRef () |
| Vec(Type)& | getbRef () |
| Vec(Type)& | getcRef () |
| virtual void | fill (const Matrix(Type) &X) |
| virtual void | fill (Type a) |
| MatTri(Type)& | operator= (const MatTri(Type) &X) |
| MatTri(Type)& | operator= (Type a) |
| virtual void | assemble (const Mat(Type) &em, const VecSimple(int) &idx_row_trans, const VecSimple(int) &idx_col_trans, int elm_no) |
| virtual void | add (Matrix(Type) &bb, Matrix(Type) &cb) |
| virtual void | add (Matrix(Type) &bb, char s, Matrix(Type) &cb) |
| virtual void | add (Matrix(Type) &bb, Type b, Matrix(Type) &cb) |
| virtual void | add (Type a, Matrix(Type) &bb, Type b, Matrix(Type) &cb) |
| virtual void | mult (Type value) |
| virtual void | prod (const Vector(Type) &xb, Vector(Type) &yb, TransposeMode tpmode=NOT_TRANSPOSED, bool add_to_yb=false) const |
| virtual bool | factChol (bool zero_upper_part=true) |
| virtual void | forwBackChol (Vec(Type) &b, Vec(Type) &x) |
| virtual bool | factLU () |
| virtual void | forwBackLU (Vec(Type) &b, Vec(Type) &x) |
| virtual bool | factRILU (real omega=0.0, int level=0) |
| virtual void | forwBackRILU (Vec(Type) &b, Vec(Type) &x) |
| virtual bool | factorize (const FactStrategy &fstrategy) |
| virtual void | forwBack (Vector(Type) &bb, Vector(Type) &xb) |
| virtual void | inverse (Mat(Type) &inv) |
| virtual void | inverse (Mat(Type) &inv, Vec(Type) &scratch) |
| virtual Type | det () |
| virtual void | SSOR1it (Vector(Type) &xnew, const Vector(Type) &xold, const Vector(Type) &b, real omega, TransposeMode tpmode=NOT_TRANSPOSED) const |
| virtual void | SSORsolve (Vector(Type) &y, const Vector(Type) &c, real omega, TransposeMode tpmode=NOT_TRANSPOSED) const |
| virtual void | SOR1it (Vector(Type) &xnew, const Vector(Type) &xold, const Vector(Type) &b, real omega, TransposeMode tpmode=NOT_TRANSPOSED) const |
| virtual void | SORsolve (Vector(Type) &y, const Vector(Type) &c, real omega, TransposeMode tpmode=NOT_TRANSPOSED) const |
| virtual void | Jacobi1it (Vector(Type) &xnew, const Vector(Type) &xold, const Vector(Type) &b, TransposeMode tpmode=NOT_TRANSPOSED) const |
| virtual void | Jacobisolve (Vector(Type) &y, const Vector(Type) &c, TransposeMode tpmode=NOT_TRANSPOSED) const |
| virtual void | print (Os os, const char *header=NULL, int nentries_per_line=3) const |
| virtual void | printAscii (Os os, const char *header=NULL) const |
| virtual void | scan (Is is) |
| virtual void | save (const char *filename, const char *name="X") const |
| virtual void | load (const char *filename, const char *name="X") |
Friends | |
| Os& | operator<< (Os &os, const MatTri(Type) &X) |
| Is& | operator>> (Is &is, MatTri(Type) &X) |
NAME: MatTri(Type) - tridiagonal matrix
DESCRIPTION:
The class implements a tridiagonal matrix on the form $\[ \left(\begin{array}{ccccccc} a`_{`1`}&` b`_{`1`}&` 0 `&` ... `&` ... `&` ... `&` 0 `\` c`_{`2`}&` a`_{`2`}&` b`_{`2`}&` 0 `&` ... `&` ... `&` 0 `\` `\mbox{}` 0 `&` c`_{`3`}&` a`_{`3`}&` b`_{`3`}&` 0 `&` ... `&` 0 `\` `\mbox{}` ... `&` ... `&` ... `&` ...`&` ... `&` ... `&` ...`\` `\mbox{}` 0 `&` ... `&` 0 `&` c`_{`n-1`}&` a`_{`n-2`}&` b`_{`n-2`}&` 0 `\` `\mbox{}` 0 `&` ... `&` ... `&` 0 `&` c`_{`n-1`}&` a`_{`n-1`}&` b`_{`n-1`}\` `\mbox{}` 0 `&` ... `&` ... `&` ... `&` 0 `&` c`_{`n`}&` a`_{`n`}\` $ \end{array} \right),\] i.e., the vectors "a", "b" and "c" denote the main diagonal, superdiagonal and subdiagonal, respectively.
|
|
There are several constructors, see class "Mat(Type)". However, since the tridiagonal matrices are assumed to be square, one specialized constructor accepts a single integer argument "n" giving the matrix dimensions. Some constructors still accept both row and column dimensions in order to provide compatibility with other matrix formats. If these parameters have different values, an error message is given. Please note that there is not yet support for a symmetric storage scheme. |
|
|
See documentation of one of the overloaded constructor. |
|
|
See documentation of one of the overloaded constructor. |
|
|
See documentation of one of the overloaded constructor. |
|
|
See documentation of one of the overloaded constructor. |
|
|
|
|
|
Reimplemented from Matrix(Type). |
|
|
Reimplemented from Matrix(Type). |
|
|
Reimplemented from Matrix(Type). |
|
|
Reimplemented from Matrix(Type). |
|
|
Reimplemented from Matrix(Type). |
|
|
Reimplemented from Matrix(Type). |
|
|
See documentation of one of the overloaded functions. |
|
|
gives access to the entries "a(i)" in the main diagonal of the matrix. If the size of the matrix is large, this mechanism for indexing will more efficient than using the operator"()" or the function "elm". |
|
|
Reimplemented from Matrix(Type). |
|
|
Reimplemented from Matrix(Type). |
|
|
Reimplemented from Matrix(Type). |
|
|
Reimplemented from Matrix(Type). |
|
|
Reimplemented from Matrix(Type). |
|
|
See documentation of one of the overloaded functions. |
|
|
gives access to the entries "b(i)" in the superdiagonal of the matrix. If the size of the matrix is large, this mechanism for indexing will more efficient than using the operator"()" or the function "elm". |
|
|
See documentation of one of the overloaded functions. |
|
|
|
|
|
|
|
|
As usual, this function permits matrix adressing using the logical index spaces for "(i,j)" ranging from 1 to "nrows" and "ncolumns", respectively. (Note that for "MatTri(Type)" we have "n" = "nrows" = "ncolumns"). Reimplemented from Matrix(Type). |
|
|
|
|
|
|
|
|
Since there is no fill-in when factorizing a tridiagonal matrix, the arguments to this function are of no use. However, they are included in order to maintain compatibility with the corresponding functionality implemented for other matrix formats. |
|
|
Reimplemented from Matrix(Type). |
|
|
Reimplemented from Matrix(Type). |
|
|
Reimplemented from Matrix(Type). |
|
|
Reimplemented from Matrix(Type). |
|
|
For the Cholesky factorization, the contents of the input vector "rhs" is not touched and can safely be reused afterwards. |
|
|
In contrast to the "forwBackLU" function implemented for other matrix formats, the version for "MatTri" objects will destroy the contents of the right-hand side vector "rhs" deliverd as input. This is necessary to achieve maximum efficiency. If one would like to keep the right-hand side unchanged, the application programmer has to make a local copy that can be sent to "forwBackLU". Exactly the same behavious applied to "forwBackRILU" since a RILU factorization of a tridiagonal matrix is identical to its LU factorization. |
|
|
See comments for "forwBackLU". |
|
|
Reimplemented from Matrix(Type). |
|
|
returns the number of columns in the current object when viewed (logically) as a full matrix. Reimplemented from Matrix(Type). |
|
|
returns the number of nonzero entries represented in the current object. Note that this function does not take symmetric storage formats into account. That is, it also counts entry "a(j,i)" even if this value is not stored due to symmetry properties. This function does not check for stored zero entries, but counts all entries represented by the chosen matrix format. Reimplemented from Matrix(Type). |
|
|
returns the number of rows in the current object when viewed (logically) as a full matrix. Reimplemented from Matrix(Type). |
|
|
Reimplemented from Matrix(Type). |
|
|
returns the base adresse of the vector "a" used for storing the main diagonal. Use this function at your own risk. |
|
|
|
|
|
returns the base adresse of the vector "b" used for storing the superdiagonal. Use this function at your own risk. |
|
|
|
|
|
returns the base adresse of the vector "c" used for storing the subdiagonal. Use this function at your own risk. |
|
|
|
|
|
|
|
|
|
|
|
quite similar to "save", this function permits Matlab data files to be entered into the current vector object. If available, the binary format is used, otherwise it reads plain ASCII files. The version implemented in this base class is dummy, stating that the described functionality is not available. To overrule this behaviour, the "load" function should be implemented for the specific format(s). Reimplemented from Matrix(Type). |
|
|
Reimplemented from Matrix(Type). |
|
|
Reimplemented from Matrix(Type). |
|
|
|
|
|
|
|
|
Reimplemented from Matrix(Type). |
|
|
|
|
|
Reimplemented from Matrix(Type). |
|
|
Reimplemented from Matrix(Type). |
|
|
Reimplemented from Matrix(Type). |
|
|
See documentation of one of the overloaded functions. Reimplemented from Matrix(Type). |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
There is a local variant of "redim" that accepts a single integer argument "n" indicating the number of rows and columns in the matrix. Reimplemented from Matrix(Type). |
|
|
saves the current vector object in a file that is readable for Matlab. If available, the utilities for Matlab's internal binary data file format is used. Otherwise, the output is given as a plain ASCII file that can be loaded in Matlab. The version implemented in this base class is dummy, stating that the described functionality is not available. To overrule this behaviour, the "save" function should be implemented for the specific format(s). Reimplemented from Matrix(Type). |
|
|
Reimplemented from Matrix(Type). |
|
|
|
|
|
Reimplemented from Matrix(Type). |
|
|
Reimplemented from Matrix(Type). |
|
|
|
|
|
|