|
|
int | global2Local (const int &row, const int &col) |
| |
| | SerialMatrix (const int &numRows, const int &numCols, const int &numBlasRows=0, const int &numBlasCols=0, const int &numBlocksRows=0, const int &numBlocksCols=0) |
| | Default SMatrix constructor. More...
|
| |
|
| SerialMatrix () |
| | Default constructor.
|
| |
|
| ~SerialMatrix () |
| | Destructor, to delete raw buffer.
|
| |
|
| SerialMatrix (const SerialMatrix< T > &that) |
| | Copy constructor.
|
| |
|
SerialMatrix< T > & | operator= (const SerialMatrix< T > &that) |
| | Copy constructor.
|
| |
|
std::vector< std::tuple< int, int > > | getAllLocalStates () |
| | Find the global indices of the matrix elements that are stored locally by the current MPI process.
|
| |
|
bool | indicesAreLocal (const int &row, const int &col) |
| | Returns true if the global indices (row,col) identify a matrix element stored by the MPI process.
|
| |
|
int | rows () const |
| | Find global number of rows.
|
| |
|
int | localRows () const |
| | Return local number of rows.
|
| |
|
int | cols () const |
| | Find global number of columns.
|
| |
|
int | localCols () const |
| | Return local number of rows.
|
| |
|
size_t | size () const |
| | Find global number of matrix elements.
|
| |
|
T & | operator() (const int &row, const int &col) |
| | Get and set operator.
|
| |
|
const T & | operator() (const int &row, const int &col) const |
| | Const get and set operator.
|
| |
|
void | enforcePositiveSemiDefinite () |
| | A function to fix up a matrix with a bit of noise to be positive semi-definite, which currently does not have a SMatrix implementation, as it's only used by distributed scattering matrix calculations.
|
| |
| void | outputToHDF5 (const std::string &outFileName, const std::string &dataSetName) |
| | A dummy function not implemented, only for PMatrix currently. More...
|
| |
| SerialMatrix< T > | prod (const SerialMatrix< T > &that, const char &trans1=transN, const char &trans2=transN) |
| | Matrix-matrix multiplication. More...
|
| |
|
SerialMatrix< T > | operator+= (const SerialMatrix< T > &m1) |
| | Matrix-matrix addition.
|
| |
|
SerialMatrix< T > | operator-= (const SerialMatrix< T > &m1) |
| | Matrix-matrix subtraction.
|
| |
|
SerialMatrix< T > | operator*= (const T &that) |
| | Matrix-scalar multiplication.
|
| |
|
SerialMatrix< T > | operator/= (const T &that) |
| | Matrix-scalar division.
|
| |
| void | eye () |
| | Sets this matrix as the identity. More...
|
| |
| std::tuple< std::vector< double >, SerialMatrix< T > > | diagonalize () |
| | Diagonalize a complex-hermitian / real-symmetric matrix. More...
|
| |
| std::tuple< std::vector< double >, SerialMatrix< T > > | diagonalize (int numEigenvalues, bool checkNegativeEigenvalues=true) |
| | Diagonalize a complex-hermitian / real sym matrix for only some of its eigenvalues. More...
|
| |
|
double | squaredNorm () |
| | Computes the squared Frobenius norm of the matrix (or Euclidean norm, or L2 norm of the matrix)
|
| |
|
double | norm () |
| | Computes the Frobenius norm of the matrix (or Euclidean norm, or L2 norm of the matrix).
|
| |
| T | dot (const SerialMatrix< T > &that) |
| | Computes a "scalar product" between two matrices A and B, defined as \sum_ij A_ij * B_ij. More...
|
| |
|
SerialMatrix< T > | operator- () const |
| | Unary negation.
|
| |
|
void | symmetrize () |
| | Symmetrize the matrix.
|
| |
|
SerialMatrix< std::complex< double > > | prod (const SerialMatrix< std::complex< double >> &that, const char &trans1, const char &trans2) |
| |
|
std::tuple< std::vector< double >, SerialMatrix< std::complex< double > > > | diagonalize () |
| |
|
double | norm () |
| |
|
double | norm () |
| |
template<typename T>
class SerialMatrix< T >
It mirrors the functionality of ParallelMatrix, only that in this case it doesn't use the scalapack library and instead relies on BLAS. Data is NOT distributed across different MPI processes. At the moment is used for making the code compile without MPI.
Templated matrix class with specialization for double and complex<double>.