#include <Epetra_SerialDenseMatrix.h>
Inheritance diagram for Epetra_SerialDenseMatrix:
Public Member Functions | |
Constructor/Destructor Methods | |
| Epetra_SerialDenseMatrix (bool set_object_label=true) | |
| Default constructor; defines a zero size object. | |
| Epetra_SerialDenseMatrix (int NumRows, int NumCols, bool set_object_label=true) | |
| Shaped constructor; defines a variable-sized object. | |
| Epetra_SerialDenseMatrix (Epetra_DataAccess CV, double *A, int LDA, int NumRows, int NumCols, bool set_object_label=true) | |
| Set object values from two-dimensional array. | |
| Epetra_SerialDenseMatrix (const Epetra_SerialDenseMatrix &Source) | |
| Epetra_SerialDenseMatrix copy constructor. | |
| virtual | ~Epetra_SerialDenseMatrix () |
| Epetra_SerialDenseMatrix destructor. | |
Shaping/sizing Methods | |
| int | Shape (int NumRows, int NumCols) |
| Set dimensions of a Epetra_SerialDenseMatrix object; init values to zero. | |
| int | Reshape (int NumRows, int NumCols) |
| Reshape a Epetra_SerialDenseMatrix object. | |
Mathematical methods | |
| int | Multiply (char TransA, char TransB, double ScalarAB, const Epetra_SerialDenseMatrix &A, const Epetra_SerialDenseMatrix &B, double ScalarThis) |
| Matrix-Matrix multiplication, this = ScalarThis*this + ScalarAB*A*B. | |
| int | Multiply (char SideA, double ScalarAB, const Epetra_SerialSymDenseMatrix &A, const Epetra_SerialDenseMatrix &B, double ScalarThis) |
| Matrix-Matrix multiplication with a symmetric matrix A. | |
| int | Scale (double ScalarA) |
| Inplace scalar-matrix product A = a A. | |
| virtual double | NormOne () const |
| Computes the 1-Norm of the this matrix. | |
| virtual double | NormInf () const |
| Computes the Infinity-Norm of the this matrix. | |
Data Accessor methods | |
| Epetra_SerialDenseMatrix & | operator= (const Epetra_SerialDenseMatrix &Source) |
| Value copy from one matrix to another. | |
| Epetra_SerialDenseMatrix & | operator+= (const Epetra_SerialDenseMatrix &Source) |
| Add one matrix to another. | |
| double & | operator() (int RowIndex, int ColIndex) |
| Element access function. | |
| const double & | operator() (int RowIndex, int ColIndex) const |
| Element access function. | |
| double * | operator[] (int ColIndex) |
| Column access function. | |
| const double * | operator[] (int ColIndex) const |
| Column access function. | |
| int | Random () |
| Set matrix values to random numbers. | |
| int | M () const |
| Returns row dimension of system. | |
| int | N () const |
| Returns column dimension of system. | |
| double * | A () const |
| Returns pointer to the this matrix. | |
| double * | A () |
| Returns pointer to the this matrix. | |
| int | LDA () const |
| Returns the leading dimension of the this matrix. | |
| Epetra_DataAccess | CV () const |
| Returns the data access mode of the this matrix. | |
I/O methods | |
| virtual void | Print (ostream &os) const |
| Print service methods; defines behavior of ostream << operator. | |
Deprecated methods (will be removed in later versions of this class). | |
| virtual double | OneNorm () const |
| Computes the 1-Norm of the this matrix (identical to NormOne() method). | |
| virtual double | InfNorm () const |
| Computes the Infinity-Norm of the this matrix (identical to NormInf() method). | |
Additional methods to support Epetra_SerialDenseOperator interface | |
| virtual int | SetUseTranspose (bool UseTranspose) |
| If set true, transpose of this operator will be applied. | |
| virtual int | Apply (const Epetra_SerialDenseMatrix &X, Epetra_SerialDenseMatrix &Y) |
| Returns the result of a Epetra_SerialDenseOperator applied to a Epetra_SerialDenseMatrix X in Y. | |
| virtual int | ApplyInverse (const Epetra_SerialDenseMatrix &X, Epetra_SerialDenseMatrix &Y) |
| Returns the result of a Epetra_SerialDenseOperator inverse applied to an Epetra_SerialDenseMatrix X in Y. | |
| virtual const char * | Label () const |
| Returns a character string describing the operator. | |
| virtual bool | UseTranspose () const |
| Returns the current UseTranspose setting. | |
| virtual bool | HasNormInf () const |
| Returns true if the this object can provide an approximate Inf-norm, false otherwise. | |
| virtual int | RowDim () const |
| Returns the row dimension of operator. | |
| virtual int | ColDim () const |
| Returns the column dimension of operator. | |
Protected Member Functions | |
| void | CopyMat (double *Source, int Source_LDA, int NumRows, int NumCols, double *Target, int Target_LDA, bool add=false) |
| void | CleanupData () |
Protected Attributes | |
| int | M_ |
| int | N_ |
| bool | A_Copied_ |
| Epetra_DataAccess | CV_ |
| int | LDA_ |
| double * | A_ |
| bool | UseTranspose_ |
Friends | |
| class | Epetra_VbrMatrix |
The Epetra_SerialDenseMatrix class enables the construction and use of real-valued, general, double-precision dense matrices. It is built on the BLAS, and derives from the Epetra_BLAS.
The Epetra_SerialDenseMatrix class is intended to provide very basic support for dense rectangular matrices.
Constructing Epetra_SerialDenseMatrix Objects
There are four Epetra_SerialDenseMatrix constructors. The first constructs a zero-sized object which should be made to appropriate length using the Shape() or Reshape() functions and then filled with the [] or () operators. The second constructs an object sized to the dimensions specified, which should be filled with the [] or () operators. The third is a constructor that accepts user data as a 2D array, and the fourth is a copy constructor. The third constructor has two data access modes (specified by the Epetra_DataAccess argument):
Once a Epetra_SerialDenseMatrix is constructed, it is possible to view the data via access functions.
Once a Epetra_SerialDenseMatrix is constructed, several mathematical functions can be applied to the object. Specifically:
Counting floating point operations The Epetra_SerialDenseMatrix class has Epetra_CompObject as a base class. Thus, floating point operations are counted and accumulated in the Epetra_Flop object (if any) that was set using the SetFlopCounter() method in the Epetra_CompObject base class.
|
|
Default constructor; defines a zero size object. Epetra_SerialDenseMatrix objects defined by the default constructor should be sized with the Shape() or Reshape functions. Values should be defined by using the [] or () operators. |
|
||||||||||||||||
|
Shaped constructor; defines a variable-sized object.
|
|
||||||||||||||||||||||||||||
|
Set object values from two-dimensional array.
|
|
||||||||||||
|
Returns the result of a Epetra_SerialDenseOperator applied to a Epetra_SerialDenseMatrix X in Y.
Implements Epetra_SerialDenseOperator. |
|
||||||||||||
|
Returns the result of a Epetra_SerialDenseOperator inverse applied to an Epetra_SerialDenseMatrix X in Y.
Implements Epetra_SerialDenseOperator. |
|
||||||||||||||||||||||||
|
Matrix-Matrix multiplication with a symmetric matrix A. If SideA = 'L', compute this = ScalarThis*this + ScalarAB*A*B. If SideA = 'R', compute this = ScalarThis*this + ScalarAB*B*A. This function performs a variety of matrix-matrix multiply operations.
|
|
||||||||||||||||||||||||||||
|
Matrix-Matrix multiplication, this = ScalarThis*this + ScalarAB*A*B. This function performs a variety of matrix-matrix multiply operations.
|
|
|
Computes the 1-Norm of the this matrix.
Reimplemented in Epetra_SerialSymDenseMatrix. |
|
|
Computes the 1-Norm of the this matrix (identical to NormOne() method).
Reimplemented in Epetra_SerialSymDenseMatrix. |
|
||||||||||||
|
Element access function. The parentheses operator returns the element in the ith row and jth column if A(i,j) is specified, the expression A[j][i] (note that i and j are reversed) will return the same element. Thus, A(i,j) = A[j][i] for all valid i and j.
|
|
||||||||||||
|
Element access function. The parentheses operator returns the element in the ith row and jth column if A(i,j) is specified, the expression A[j][i] (note that i and j are reversed) will return the same element. Thus, A(i,j) = A[j][i] for all valid i and j.
|
|
|
Add one matrix to another. The operator+= allows one to add the values from one existin SerialDenseMatrix to another, as long as there is enough room in the target to hold the source.
|
|
|
Value copy from one matrix to another. The operator= allows one to copy the values from one existing SerialDenseMatrix to another, as long as there is enough room in the target to hold the source.
|
|
|
Column access function. The parentheses operator returns the element in the ith row and jth column if A(i,j) is specified, the expression A[j][i] (note that i and j are reversed) will return the same element. Thus, A(i,j) = A[j][i] for all valid i and j.
Reimplemented in Epetra_SerialDenseVector. |
|
|
Column access function. The parentheses operator returns the element in the ith row and jth column if A(i,j) is specified, the expression A[j][i] (note that i and j are reversed) will return the same element. Thus, A(i,j) = A[j][i] for all valid i and j.
Reimplemented in Epetra_SerialDenseVector. |
|
|
Set matrix values to random numbers. SerialDenseMatrix uses the random number generator provided by Epetra_Util. The matrix values will be set to random values on the interval (-1.0, 1.0).
Reimplemented in Epetra_SerialDenseVector. |
|
||||||||||||
|
Reshape a Epetra_SerialDenseMatrix object.
|
|
|
Inplace scalar-matrix product A = a A. Scale a matrix, entry-by-entry using the value ScalarA.
Reimplemented in Epetra_SerialSymDenseMatrix. |
|
|
If set true, transpose of this operator will be applied. This flag allows the transpose of the given operator to be used implicitly. Setting this flag affects only the Apply() and ApplyInverse() methods. If the implementation of this interface does not support transpose use, this method should return a value of -1.
Implements Epetra_SerialDenseOperator. |
|
||||||||||||
|
Set dimensions of a Epetra_SerialDenseMatrix object; init values to zero.
|
1.3.9.1