ParGeMSLR
|
Class of dense matrix. More...
#include <dense_matrix.hpp>
Public Member Functions | |
DenseMatrixClass () | |
The constructor of DenseMatrixClass. More... | |
DenseMatrixClass (const DenseMatrixClass< T > &mat) | |
The copy constructor of DenseMatrixClass. More... | |
DenseMatrixClass (DenseMatrixClass< T > &&mat) | |
The move constructor of DenseMatrixClass. More... | |
DenseMatrixClass< T > & | operator= (const DenseMatrixClass< T > &mat) |
The = operator of DenseMatrixClass. More... | |
DenseMatrixClass< T > & | operator= (DenseMatrixClass< T > &&mat) |
The = operator of DenseMatrixClass. More... | |
virtual | ~DenseMatrixClass () |
The destructor of DenseMatrixClass. More... | |
int | Setup (int nrows, int ncols) |
Free the current matrix, and malloc memory to create a new matrix on the host. More... | |
int | Setup (int nrows, int ncols, bool setzero) |
Free the current matrix, and malloc memory to create a new matrix. More... | |
int | Setup (int nrows, int ncols, int location, bool setzero) |
Free the current matrix, and malloc memory to create a new matrix. More... | |
int | SetupPtr (T *data, int nrows, int ncols, int ldim, int location) |
Free the current matrix, and point the matrix to data. More... | |
int | SetupPtr (const DenseMatrixClass< T > &mat_in, int row_start, int col_start, int num_rows, int num_cols) |
Free the current matrix, and point the matrix to a submatrix of another matrix. More... | |
int | SubMatrix (int row_start, int col_start, int num_rows, int num_cols, int location, DenseMatrixClass< T > &mat_out) |
Copy data to extract a submatrix of the current matrix. More... | |
T & | operator() (int row, int col) |
Get the reference of a value in the matrix based on the index. More... | |
virtual int | Clear () |
Free the current matrix. More... | |
virtual int | GetDataLocation () const |
Get the data location of the matrix. More... | |
virtual int | GetNumRowsLocal () const |
Get the local number of rows of the matrix. More... | |
virtual int | GetNumColsLocal () const |
Get the local number of columns of the matrix. More... | |
virtual long int | GetNumNonzeros () const |
Get the number of nonzeros in this matrix. More... | |
T * | GetData () const |
Get the data pointer of the matrix. More... | |
SequentialVectorClass< T > & | GetDataVector () |
Get the reference to the data vector. More... | |
const SequentialVectorClass< T > & | GetDataVector () const |
Get the reference to the data vector. More... | |
int | GetLeadingDimension () const |
Get the leading dimension of the matrix. More... | |
bool | IsHoldingData () const |
Check if the matrix holding its own data. More... | |
virtual int | Eye () |
Create an indentity matrix. More... | |
int | Rand () |
Create an random matrix, real value in between (0, 1), complex value real and imag part in between (0, 1). More... | |
virtual int | Fill (const T &v) |
Fill the matrix with constant value. More... | |
virtual int | MoveData (const int &location) |
Move the data to another memory location. More... | |
virtual int | Scale (const T &alpha) |
Scale the current . More... | |
virtual int | MatVec (char trans, const T &alpha, const VectorClass< T > &x, const T &beta, VectorClass< T > &y) |
In place dense Matrix-Vector product ==> y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y. More... | |
virtual int | MatVec (char trans, const T &alpha, const VectorClass< T > &x, const T &beta, const VectorClass< T > &y, VectorClass< T > &z) |
In place Matrix-Vector product ==> z := alpha*A*x + beta*y, or z := alpha*A'*x + beta*y. More... | |
int | MatMat (const T &alpha, const DenseMatrixClass< T > &A, char transa, const DenseMatrixClass< T > &B, char transb, const T &beta) |
Dense Matrix-Matrix multiplication, C = alpha*transa(A)*transb(B)+beta*C where C is this matrix. More... | |
int | Invert () |
Invert the matrix. More... | |
int | InvertUpperTriangular () |
Invert the matrix. Only works when current matrix is upper triangular. More... | |
int | Hess (DenseMatrixClass< T > &Q) |
Transform this matrix A into hessenberg matrix Q^HAQ = Hess. More... | |
int | Hess (DenseMatrixClass< T > &Q, int start, int end) |
Transform this matrix A into hessenberg matrix Q^HAQ = Hess. More... | |
int | HessSchur (DenseMatrixClass< T > &Q, SequentialVectorClass< T > &wr, SequentialVectorClass< T > &wi) |
Transform this Hess matrix A into the schur form matrix U = Q^HAQ. More... | |
int | HessSchur (DenseMatrixClass< T > &Q, int start, int end, SequentialVectorClass< T > &wr, SequentialVectorClass< T > &wi) |
Transform this Hess matrix A into the schur form matrix U = Q^HAQ. More... | |
int | HessSchur (DenseMatrixClass< T > &Q, SequentialVectorClass< T > &w) |
Transform this matrix A into the schur form matrix U = Q^HAQ. More... | |
int | HessSchur (DenseMatrixClass< T > &Q, int start, int end, SequentialVectorClass< T > &w) |
Transform this matrix A into the schur form matrix U = Q^HAQ. More... | |
int | Schur (DenseMatrixClass< T > &Q, SequentialVectorClass< T > &wr, SequentialVectorClass< T > &wi) |
Transform this matrix A (real) into the schur form matrix U = Q^HAQ. More... | |
int | Schur (DenseMatrixClass< T > &Q, int start, int end, SequentialVectorClass< T > &wr, SequentialVectorClass< T > &wi) |
Transform this matrix A (real) into the schur form matrix U = Q^HAQ. More... | |
int | Schur (DenseMatrixClass< T > &Q, SequentialVectorClass< T > &w) |
Transform this matrix A (complex) into the schur form matrix U = Q^HAQ. More... | |
int | Schur (DenseMatrixClass< T > &Q, int start, int end, SequentialVectorClass< T > &w) |
Transform this matrix A (complex) into the schur form matrix U = Q^HAQ. More... | |
int | HessEig (DenseMatrixClass< T > &Q, SequentialVectorClass< T > &wr, SequentialVectorClass< T > &wi) |
Compute the Eigen decomposition of real dense hessenberg matrix A, AQ = QD. A is this matrix and is not modified. More... | |
int | HessEig (DenseMatrixClass< T > &Q, SequentialVectorClass< T > &w) |
Compute the Eigen decomposition of complex dense hessenberg matrix A, AQ = QD. A is this matrix and is not modified. More... | |
int | Eig (DenseMatrixClass< T > &QS, DenseMatrixClass< T > &QE, SequentialVectorClass< T > &wr, SequentialVectorClass< T > &wi) |
Compute the Schur decomposition of real dense matrix A, U = QS^HAQS, and the Eigen decomposition UQE = QED. A is this matrix and on return be set to U. More... | |
int | Eig (DenseMatrixClass< T > &QS, DenseMatrixClass< T > &QE, SequentialVectorClass< T > &w) |
Compute the Schur decomposition of complex dense matrix A, U = QS^HAQS, and the Eigen decomposition UQE = QED. A is this matrix and on return be set to U. More... | |
int | OrdSchur (DenseMatrixClass< T > &Q, SequentialVectorClass< T > &wr, SequentialVectorClass< T > &wi, vector_int &select) |
Reorder the this real schur decomposition, puch selected eigenvalues to the leading part. More... | |
int | OrdSchur (DenseMatrixClass< T > &Q, SequentialVectorClass< T > &w, vector_int &select) |
Reorder the this complex schur decomposition, puch selected eigenvalues to the leading part. More... | |
int | OrdSchurClusters (DenseMatrixClass< T > &Q, SequentialVectorClass< T > &wr, SequentialVectorClass< T > &wi, vector_int &clusters) |
Reorder the this real schur decomposition, puch selected eigenvalues to the leading part. More... | |
int | OrdSchurClusters (DenseMatrixClass< T > &Q, SequentialVectorClass< T > &w, vector_int &clusters) |
Reorder the this complex schur decomposition, puch selected eigenvalues to the leading part. More... | |
int | Plot (int conditiona, int conditionb, int width) |
Plot the dense matrix to the terminal output. Function for testing purpose. More... | |
![]() | |
MatrixClass () | |
The constructor of MatrixClass. More... | |
MatrixClass (const MatrixClass< T > &mat) | |
The copy constructor of MatrixClass. More... | |
MatrixClass (MatrixClass< T > &&mat) | |
The move constructor of MatrixClass. More... | |
virtual | ~MatrixClass () |
The destructor of MatrixClass. More... | |
PrecisionEnum | GetPrecision () const |
Return the precision of the matrix. More... | |
Class of dense matrix.
template pargemslr::DenseMatrixClass< T >::DenseMatrixClass | ( | ) |
The constructor of DenseMatrixClass. The default memory location is the host memory.
pargemslr::DenseMatrixClass< T >::DenseMatrixClass | ( | const DenseMatrixClass< T > & | mat | ) |
The copy constructor of DenseMatrixClass.
[in] | mat | The target matrix. |
pargemslr::DenseMatrixClass< T >::DenseMatrixClass | ( | DenseMatrixClass< T > && | mat | ) |
The move constructor of DenseMatrixClass.
[in] | mat | The target matrix. |
|
virtual |
The destructor of DenseMatrixClass. Simply a call to the free function.
|
virtual |
Free the current matrix.
Reimplemented from pargemslr::MatrixClass< T >.
int pargemslr::DenseMatrixClass< T >::Eig | ( | DenseMatrixClass< T > & | QS, |
DenseMatrixClass< T > & | QE, | ||
SequentialVectorClass< T > & | w | ||
) |
Compute the Schur decomposition of complex dense matrix A, U = QS^HAQS, and the Eigen decomposition UQE = QED. A is this matrix and on return be set to U.
[out] | QS | the SQ matrix U = QS^HAQS. |
[out] | QE | the QE matrix UQE = QED. |
[in,out] | w | Array of eigenvalues. |
int pargemslr::DenseMatrixClass< T >::Eig | ( | DenseMatrixClass< T > & | QS, |
DenseMatrixClass< T > & | QE, | ||
SequentialVectorClass< T > & | wr, | ||
SequentialVectorClass< T > & | wi | ||
) |
Compute the Schur decomposition of real dense matrix A, U = QS^HAQS, and the Eigen decomposition UQE = QED. A is this matrix and on return be set to U.
[out] | QS | the SQ matrix U = QS^HAQS. |
[out] | QE | the QE matrix UQE = QED. |
[in,out] | wr | Array of real part of eigenvalues. |
[in] | wi | Array of imag part of eigenvalues. |
|
virtual |
Create an indentity matrix.
Reimplemented from pargemslr::MatrixClass< T >.
|
virtual |
Fill the matrix with constant value.
[in] | v | The value to be filled. |
Reimplemented from pargemslr::MatrixClass< T >.
template complexd * pargemslr::DenseMatrixClass< T >::GetData | ( | ) | const |
Get the data pointer of the matrix.
|
virtual |
Get the data location of the matrix.
Reimplemented from pargemslr::MatrixClass< T >.
template SequentialVectorClass< complexd > & pargemslr::DenseMatrixClass< T >::GetDataVector | ( | ) |
Get the reference to the data vector.
template const SequentialVectorClass< complexd > & pargemslr::DenseMatrixClass< T >::GetDataVector | ( | ) | const |
Get the reference to the data vector.
template int pargemslr::DenseMatrixClass< T >::GetLeadingDimension | ( | ) | const |
Get the leading dimension of the matrix.
|
virtual |
Get the local number of columns of the matrix.
Implements pargemslr::MatrixClass< T >.
|
virtual |
Get the number of nonzeros in this matrix.
Reimplemented from pargemslr::MatrixClass< T >.
|
virtual |
Get the local number of rows of the matrix.
Implements pargemslr::MatrixClass< T >.
int pargemslr::DenseMatrixClass< T >::Hess | ( | DenseMatrixClass< T > & | Q | ) |
Transform this matrix A into hessenberg matrix Q^HAQ = Hess.
[out] | Q | the Q matrix. |
int pargemslr::DenseMatrixClass< T >::Hess | ( | DenseMatrixClass< T > & | Q, |
int | start, | ||
int | end | ||
) |
Transform this matrix A into hessenberg matrix Q^HAQ = Hess.
[out] | Q | the Q matrix. |
[in] | start | |
[in] | end | Outside [start, end) the matrix is already hessenberg. |
int pargemslr::DenseMatrixClass< T >::HessEig | ( | DenseMatrixClass< T > & | Q, |
SequentialVectorClass< T > & | w | ||
) |
Compute the Eigen decomposition of complex dense hessenberg matrix A, AQ = QD. A is this matrix and is not modified.
[out] | Q | the Q matrix AQ = QD. |
[in,out] | w | Array of eigenvalues. |
int pargemslr::DenseMatrixClass< T >::HessEig | ( | DenseMatrixClass< T > & | Q, |
SequentialVectorClass< T > & | wr, | ||
SequentialVectorClass< T > & | wi | ||
) |
Compute the Eigen decomposition of real dense hessenberg matrix A, AQ = QD. A is this matrix and is not modified.
[out] | Q | the Q matrix AQ = QD. |
[in,out] | wr | Array of real part of eigenvalues. |
[in] | wi | Array of imag part of eigenvalues. |
int pargemslr::DenseMatrixClass< T >::HessSchur | ( | DenseMatrixClass< T > & | Q, |
int | start, | ||
int | end, | ||
SequentialVectorClass< T > & | w | ||
) |
Transform this matrix A into the schur form matrix U = Q^HAQ.
Only works if the current matrix is a hessenberg matrix, otherwise please call the Schur function.
[out] | Q | The Q matrix. |
[in] | start | |
[in] | end | Outside [start, end) the matrix is already upper triangular. |
[out] | w | The vector of eignelvalues. |
int pargemslr::DenseMatrixClass< T >::HessSchur | ( | DenseMatrixClass< T > & | Q, |
int | start, | ||
int | end, | ||
SequentialVectorClass< T > & | wr, | ||
SequentialVectorClass< T > & | wi | ||
) |
Transform this Hess matrix A into the schur form matrix U = Q^HAQ.
Only works if the current matrix is a hessenberg matrix, otherwise please call the Schur function.
[out] | Q | The Q matrix. |
[in] | start | |
[in] | end | Outside [start, end) the matrix is already upper triangular. |
[out] | wr | The vector of the real part of the eignelvalues. |
[out] | wi | The vector of the imag part of the eignelvalues. |
int pargemslr::DenseMatrixClass< T >::HessSchur | ( | DenseMatrixClass< T > & | Q, |
SequentialVectorClass< T > & | w | ||
) |
Transform this matrix A into the schur form matrix U = Q^HAQ.
Only works if the current matrix is a hessenberg matrix, otherwise please call the Schur function.
[out] | Q | The Q matrix. |
[out] | w | The vector of eignelvalues. |
int pargemslr::DenseMatrixClass< T >::HessSchur | ( | DenseMatrixClass< T > & | Q, |
SequentialVectorClass< T > & | wr, | ||
SequentialVectorClass< T > & | wi | ||
) |
Transform this Hess matrix A into the schur form matrix U = Q^HAQ.
Only works if the current matrix is a hessenberg matrix, otherwise please call the Schur function.
[out] | Q | The Q matrix. |
[out] | wr | The vector of the real part of the eignelvalues. |
[out] | wi | The vector of the imag part of the eignelvalues. |
template int pargemslr::DenseMatrixClass< T >::Invert | ( | ) |
Invert the matrix. Only work on the host.
template int pargemslr::DenseMatrixClass< T >::InvertUpperTriangular | ( | ) |
Invert the matrix. Only works when current matrix is upper triangular. Only work on the host.
template bool pargemslr::DenseMatrixClass< T >::IsHoldingData | ( | ) | const |
Check if the matrix holding its own data.
template int pargemslr::DenseMatrixClass< T >::MatMat | ( | const T & | alpha, |
const DenseMatrixClass< T > & | A, | ||
char | transa, | ||
const DenseMatrixClass< T > & | B, | ||
char | transb, | ||
const T & | beta | ||
) |
Dense Matrix-Matrix multiplication, C = alpha*transa(A)*transb(B)+beta*C where C is this matrix.
If C is not pre-allocated, C will be allocated such that it has the same location as A.
[in] | alpha | The alpha value. |
[in] | A | The first dense matrix. |
[in] | transa | Whether we transpose A or not. |
[in] | beta | The beta value. |
[in] | B | The second dense matrix. |
[in] | transb | Whether we transpose B or not. |
|
virtual |
In place Matrix-Vector product ==> z := alpha*A*x + beta*y, or z := alpha*A'*x + beta*y.
[in] | trans | Whether or not transpose matrix A. |
[in] | alpha | The alpha value. |
[in] | x | The first vector. |
[in] | beta | The beta value. |
[in] | y | The second vector. |
[out] | z | The output vector. |
Reimplemented from pargemslr::MatrixClass< T >.
|
virtual |
In place dense Matrix-Vector product ==> y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y.
[in] | trans | Whether or not transpose matrix A. |
[in] | alpha | The alpha value. |
[in] | x | The left vector. |
[in] | beta | The beta value. |
[in,out] | y | The product vector. |
Reimplemented from pargemslr::MatrixClass< T >.
|
virtual |
Move the data to another memory location.
[in] | location | The location move to. |
Reimplemented from pargemslr::MatrixClass< T >.
template complexd & pargemslr::DenseMatrixClass< T >::operator() | ( | int | row, |
int | col | ||
) |
Get the reference of a value in the matrix based on the index.
[in] | row | The row index. |
[in] | col | The column index. |
DenseMatrixClass< T > & pargemslr::DenseMatrixClass< T >::operator= | ( | const DenseMatrixClass< T > & | mat | ) |
DenseMatrixClass< T > & pargemslr::DenseMatrixClass< T >::operator= | ( | DenseMatrixClass< T > && | mat | ) |
int pargemslr::DenseMatrixClass< T >::OrdSchur | ( | DenseMatrixClass< T > & | Q, |
SequentialVectorClass< T > & | w, | ||
vector_int & | select | ||
) |
Reorder the this complex schur decomposition, puch selected eigenvalues to the leading part.
[in,out] | Q | This matrix and Q are the original schur decomposition, on return, the new decomposition. |
[out] | w | Array of eigenvalues. |
[in] | select | Eigenvalues corresponting to positive entries in select vector will be put in the leading part. |
int pargemslr::DenseMatrixClass< T >::OrdSchur | ( | DenseMatrixClass< T > & | Q, |
SequentialVectorClass< T > & | wr, | ||
SequentialVectorClass< T > & | wi, | ||
vector_int & | select | ||
) |
Reorder the this real schur decomposition, puch selected eigenvalues to the leading part. A 2x2 block on the diagonal of Q need to be in the same cluster.
[in,out] | Q | This matrix and Q are the original schur decomposition, on return, the new decomposition. |
[out] | wr | Array of real part of eigenvalues. |
[out] | wi | Array of imag part of eigenvalues. |
[in] | select | Eigenvalues corresponting to positive entries in select vector will be put in the leading part. |
int pargemslr::DenseMatrixClass< T >::OrdSchurClusters | ( | DenseMatrixClass< T > & | Q, |
SequentialVectorClass< T > & | w, | ||
vector_int & | clusters | ||
) |
Reorder the this complex schur decomposition, puch selected eigenvalues to the leading part.
[in,out] | Q | This matrix and Q are the original schur decomposition, on return, the new decomposition. |
[out] | w | Array of eigenvalues. |
[in] | clusters | Eigenvalues corresponding to positive entries in the clusters vector will be put in the leading part. The order of those eigenvalues are based on the values in the cluster vector in descending order. |
int pargemslr::DenseMatrixClass< T >::OrdSchurClusters | ( | DenseMatrixClass< T > & | Q, |
SequentialVectorClass< T > & | wr, | ||
SequentialVectorClass< T > & | wi, | ||
vector_int & | clusters | ||
) |
Reorder the this real schur decomposition, puch selected eigenvalues to the leading part. A 2x2 block on the diagonal of Q need to be in the same cluster.
[in,out] | Q | This matrix and Q are the original schur decomposition, on return, the new decomposition. |
[out] | wr | Array of real part of eigenvalues. |
[out] | wi | Array of imag part of eigenvalues. |
[in] | clusters | Eigenvalues corresponding to positive entries in the clusters vector will be put in the leading part. The order of those eigenvalues are based on the values in the cluster vector in descending order. |
template int pargemslr::DenseMatrixClass< T >::Plot | ( | int | conditiona, |
int | conditionb, | ||
int | width | ||
) |
Plot the dense matrix to the terminal output. Function for testing purpose.
[in] | conditiona | First condition. |
[in] | conditionb | Secend condition, only spy when conditiona == conditionb. |
[in] | width | The plot width. |
template int pargemslr::DenseMatrixClass< T >::Rand | ( | ) |
Create an random matrix, real value in between (0, 1), complex value real and imag part in between (0, 1).
|
virtual |
Scale the current .
[in] | alpha | The scale. |
Reimplemented from pargemslr::MatrixClass< T >.
int pargemslr::DenseMatrixClass< T >::Schur | ( | DenseMatrixClass< T > & | Q, |
int | start, | ||
int | end, | ||
SequentialVectorClass< T > & | w | ||
) |
Transform this matrix A (complex) into the schur form matrix U = Q^HAQ.
[out] | Q | The Q matrix. |
[in] | start | |
[in] | end | Outside [start, end) the matrix is already upper triangular. |
[out] | w | The vector of eignelvalues. |
int pargemslr::DenseMatrixClass< T >::Schur | ( | DenseMatrixClass< T > & | Q, |
int | start, | ||
int | end, | ||
SequentialVectorClass< T > & | wr, | ||
SequentialVectorClass< T > & | wi | ||
) |
Transform this matrix A (real) into the schur form matrix U = Q^HAQ.
Only works if the current matrix is a hessenberg matrix, otherwise please call the Schur function.
[out] | Q | The Q matrix. |
[in] | start | |
[in] | end | Outside [start, end) the matrix is already hessenberg. |
[out] | wr | The vector of the real part of the eignelvalues. |
[out] | wi | The vector of the imag part of the eignelvalues. |
int pargemslr::DenseMatrixClass< T >::Schur | ( | DenseMatrixClass< T > & | Q, |
SequentialVectorClass< T > & | w | ||
) |
Transform this matrix A (complex) into the schur form matrix U = Q^HAQ.
[out] | Q | The Q matrix. |
[out] | w | The vector of eignelvalues. |
int pargemslr::DenseMatrixClass< T >::Schur | ( | DenseMatrixClass< T > & | Q, |
SequentialVectorClass< T > & | wr, | ||
SequentialVectorClass< T > & | wi | ||
) |
Transform this matrix A (real) into the schur form matrix U = Q^HAQ.
Only works if the current matrix is a hessenberg matrix, otherwise please call the Schur function.
[out] | Q | The Q matrix. |
[out] | wr | The vector of the real part of the eignelvalues. |
[out] | wi | The vector of the imag part of the eignelvalues. |
template int pargemslr::DenseMatrixClass< T >::Setup | ( | int | nrows, |
int | ncols | ||
) |
Free the current matrix, and malloc memory to create a new matrix on the host. The memory location is controlled by _location.
The _ldim is set to be equal to nrow.
[in] | nrows | The number of rows. |
[in] | ncols | The number fo columns. |
template int pargemslr::DenseMatrixClass< T >::Setup | ( | int | nrows, |
int | ncols, | ||
bool | setzero | ||
) |
Free the current matrix, and malloc memory to create a new matrix. The memory location is controlled by _location.
The _ldim is set to be equal to nrow.
[in] | nrows | The number of rows. |
[in] | ncols | The number fo columns. |
[in] | setzero | Set to true to use calloc instead of malloc. |
template int pargemslr::DenseMatrixClass< T >::Setup | ( | int | nrows, |
int | ncols, | ||
int | location, | ||
bool | setzero | ||
) |
Free the current matrix, and malloc memory to create a new matrix. The memory location is controlled by _location.
The _ldim is set to be equal to nrow.
[in] | nrows | The number of rows. |
[in] | ncols | The number fo columns. |
[in] | location | The location of the data. |
[in] | setzero | Set to true to use calloc instead of malloc. |
int pargemslr::DenseMatrixClass< T >::SetupPtr | ( | const DenseMatrixClass< T > & | mat_in, |
int | row_start, | ||
int | col_start, | ||
int | num_rows, | ||
int | num_cols | ||
) |
Free the current matrix, and point the matrix to a submatrix of another matrix.
[in] | mat_in | The matrix holding data. |
[in] | row_start | The starting row of that submatrix. |
[in] | col_start | The starting column of that submatrix. |
[in] | num_rows | The number of rows. |
[in] | num_cols | The number fo cols. |
int pargemslr::DenseMatrixClass< T >::SetupPtr | ( | T * | data, |
int | nrows, | ||
int | ncols, | ||
int | ldim, | ||
int | location | ||
) |
Free the current matrix, and point the matrix to data.
[in] | data | Pointer to the data. |
[in] | nrows | The number of rows. |
[in] | ncols | The number fo columns. |
[in] | ldim | The leading dimension of the matrix. |
[in] | location | The location of the data. |
template int pargemslr::DenseMatrixClass< T >::SubMatrix | ( | int | row_start, |
int | col_start, | ||
int | num_rows, | ||
int | num_cols, | ||
int | location, | ||
DenseMatrixClass< T > & | mat_out | ||
) |
Copy data to extract a submatrix of the current matrix.
[in] | row_start | The starting row of that submatrix. |
[in] | col_start | The starting column of that submatrix. |
[in] | num_rows | The number of rows. |
[in] | num_cols | The number fo cols. |
[in] | location | The location of the submatrix. |
[in] | mat_out | The submatrix. |