#include <Epetra_IntSerialDenseMatrix.h>
Inheritance diagram for Epetra_IntSerialDenseMatrix:
Public Member Functions | |
Constructor/Destructor Methods | |
| Epetra_IntSerialDenseMatrix () | |
| Default constructor; defines a zero size object. | |
| Epetra_IntSerialDenseMatrix (int NumRows, int NumCols) | |
| Shaped constructor; defines a variable-sized object. | |
| Epetra_IntSerialDenseMatrix (Epetra_DataAccess CV, int *A, int LDA, int NumRows, int NumCols) | |
| Set object values from two-dimensional array. | |
| Epetra_IntSerialDenseMatrix (const Epetra_IntSerialDenseMatrix &Source) | |
| Epetra_IntSerialDenseMatrix copy constructor. | |
| virtual | ~Epetra_IntSerialDenseMatrix () |
| Epetra_IntSerialDenseMatrix destructor. | |
Shaping/sizing Methods | |
| int | Shape (int NumRows, int NumCols) |
| Set dimensions of a Epetra_IntSerialDenseMatrix object; init values to zero. | |
| int | Reshape (int NumRows, int NumCols) |
| Reshape a Epetra_IntSerialDenseMatrix object. | |
Data Accessor methods | |
| virtual int | OneNorm () |
| Computes the 1-Norm of the this matrix. | |
| virtual int | InfNorm () |
| Computes the Infinity-Norm of the this matrix. | |
| Epetra_IntSerialDenseMatrix & | operator= (const Epetra_IntSerialDenseMatrix &Source) |
| Copy from one matrix to another. | |
| int & | operator() (int RowIndex, int ColIndex) |
| Element access function. | |
| const int & | operator() (int RowIndex, int ColIndex) const |
| Element access function. | |
| int * | operator[] (int ColIndex) |
| Column access function. | |
| const int * | 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. | |
| const int * | A () const |
| Returns const pointer to the this matrix. | |
| int * | 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. | |
Expert-only unsupported methods | |
| int | MakeViewOf (const Epetra_IntSerialDenseMatrix &Source) |
| Reset an existing IntSerialDenseMatrix to point to another Matrix. | |
Protected Member Functions | |
| void | CopyMat (int *Source, int Source_LDA, int NumRows, int NumCols, int *Target, int Target_LDA) |
| void | CleanupData () |
Protected Attributes | |
| Epetra_DataAccess | CV_ |
| bool | A_Copied_ |
| int | M_ |
| int | N_ |
| int | LDA_ |
| int * | A_ |
The Epetra_IntSerialDenseMatrix class enables the construction and use of integer-valued, general dense matrices.
The Epetra_IntSerialDenseMatrix class is intended to provide very basic support for dense rectangular matrices.
Constructing Epetra_IntSerialDenseMatrix Objects
There are four Epetra_IntSerialDenseMatrix 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):
Other Epetra_IntSerialDenseMatrix functions that do not return an integer error code (such as operators () and [] ) will throw an exception if an error occurrs. These exceptions will be integer values as follows:
bExtracting Data from Epetra_IntSerialDenseMatrix Objects
Once a Epetra_IntSerialDenseMatrix is constructed, it is possible to view the data via access functions.
Once a Epetra_IntSerialDenseMatrix is constructed, several mathematical functions can be applied to the object. Specifically:
|
|
Default constructor; defines a zero size object. Epetra_IntSerialDenseMatrix 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.
|
|
|
Epetra_IntSerialDenseMatrix copy constructor. This matrix will take on the data access mode of the Source matrix. |
|
|
Reset an existing IntSerialDenseMatrix to point to another Matrix. Allows an existing IntSerialDenseMatrix to become a View of another matrix's data, regardless of the DataAccess mode of the Source matrix. It is assumed that the Source matrix is an independent matrix, and no checking is done to verify this. This is used by Epetra_CrsGraph in the OptimizeStorage method. It is used so that an existing (Copy) matrix can be converted to a View. This frees up memory that CrsGraph no longer needs.
|
|
|
Computes the 1-Norm of the this matrix.
|
|
||||||||||||
|
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.
|
|
|
Copy from one matrix to another. The operator= allows one to copy the values from one existing IntSerialDenseMatrix to another. The left hand side matrix will take on the data access mode of the right hand side matrix.
|
|
|
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_IntSerialDenseVector. |
|
|
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_IntSerialDenseVector. |
|
|
Set matrix values to random numbers. IntSerialDenseMatrix uses the random number generator provided by Epetra_Util. The matrix values will be set to random values on the interval (0, 2^31 - 1).
Reimplemented in Epetra_IntSerialDenseVector. |
|
||||||||||||
|
Reshape a Epetra_IntSerialDenseMatrix object.
|
|
||||||||||||
|
Set dimensions of a Epetra_IntSerialDenseMatrix object; init values to zero.
|
1.3.9.1