mptensor
v0.3.0
Parallel Library for Tensor Network Methods
|
Nameclass for Matrix inteface. More...
Classes | |
class | Matrix |
Inteface of Matrix class. More... | |
Functions | |
template<typename C > | |
void | replace_matrix_data (const Matrix< C > &M, const std::vector< int > &dest_rank, const std::vector< size_t > &local_position, Matrix< C > &M_new) |
template<typename C > | |
void | replace_matrix_data (const std::vector< C > &V, const std::vector< int > &dest_rank, const std::vector< size_t > &local_position, Matrix< C > &M_new) |
template<typename C > | |
void | sum_matrix_data (const Matrix< C > &M, const std::vector< int > &dest_rank, const std::vector< size_t > &local_position, Matrix< C > &M_new) |
template<typename C > | |
C | matrix_trace (const Matrix< C > &a) |
template<typename C > | |
void | matrix_product (const Matrix< C > &a, const Matrix< C > &b, Matrix< C > &c) |
template<typename C > | |
int | matrix_svd (Matrix< C > &a, Matrix< C > &u, std::vector< double > &s, Matrix< C > &v) |
template<typename C > | |
int | matrix_svd (Matrix< C > &a, std::vector< double > &s) |
template<typename C > | |
int | matrix_qr (Matrix< C > &a, Matrix< C > &r) |
template<typename C > | |
int | matrix_eigh (Matrix< C > &a, std::vector< double > &s, Matrix< C > &u) |
template<typename C > | |
int | matrix_eigh (Matrix< C > &a, std::vector< double > &s) |
Eigenvalues of a hermite (symmetric) matrix. More... | |
template<typename C > | |
int | matrix_eigh (Matrix< C > &a, Matrix< C > &b, std::vector< double > &s, Matrix< C > &u) |
template<typename C > | |
int | matrix_eig (Matrix< C > &a, std::vector< complex > &s, Matrix< complex > &u) |
template<typename C > | |
int | matrix_eig (Matrix< C > &a, std::vector< complex > &s) |
template<typename C > | |
int | matrix_solve (Matrix< C > &a, Matrix< C > &b) |
Solve linear equation \( AX=B\). More... | |
template<typename C > | |
double | max (const Matrix< C > &a) |
Return the maximum element. More... | |
template<typename C > | |
double | min (const Matrix< C > &a) |
Return the minimum element. More... | |
template<typename C > | |
double | max_abs (const Matrix< C > &a) |
Return the maximum of the absolute value of elements. More... | |
template<typename C > | |
double | min_abs (const Matrix< C > &a) |
Return the minimum of the absolute value of elements. More... | |
Nameclass for Matrix inteface.
The list of member functions and non-member functions, which should be implemented in a Matrix class.
int mptensor::matrix_interface::matrix_eig | ( | Matrix< C > & | a, |
std::vector< complex > & | s | ||
) |
int mptensor::matrix_interface::matrix_eig | ( | Matrix< C > & | a, |
std::vector< complex > & | s, | ||
Matrix< complex > & | u | ||
) |
int mptensor::matrix_interface::matrix_eigh | ( | Matrix< C > & | a, |
Matrix< C > & | b, | ||
std::vector< double > & | s, | ||
Matrix< C > & | u | ||
) |
int matrix_eigh | ( | Matrix< C > & | a, |
std::vector< double > & | s | ||
) |
Eigenvalues of a hermite (symmetric) matrix.
[in] | a | The hermite or symmetric matrix. On exit, it may be destroyed. |
[out] | s | The eigenvalues in ascending order. |
int mptensor::matrix_interface::matrix_eigh | ( | Matrix< C > & | a, |
std::vector< double > & | s, | ||
Matrix< C > & | u | ||
) |
void mptensor::matrix_interface::matrix_product | ( | const Matrix< C > & | a, |
const Matrix< C > & | b, | ||
Matrix< C > & | c | ||
) |
int mptensor::matrix_interface::matrix_qr | ( | Matrix< C > & | a, |
Matrix< C > & | r | ||
) |
int mptensor::matrix_interface::matrix_solve | ( | Matrix< C > & | a, |
Matrix< C > & | b | ||
) |
Solve linear equation \( AX=B\).
[in] | a | The \( N\times N\) coefficient matrix A. On exit, it may be destroyed. |
[in,out] | b | On entry, the \( N\times K\) right-hand side matrix B. On exit, the \( N\times K\) solution matrix X. |
int mptensor::matrix_interface::matrix_svd | ( | Matrix< C > & | a, |
Matrix< C > & | u, | ||
std::vector< double > & | s, | ||
Matrix< C > & | v | ||
) |
int mptensor::matrix_interface::matrix_svd | ( | Matrix< C > & | a, |
std::vector< double > & | s | ||
) |
C mptensor::matrix_interface::matrix_trace | ( | const Matrix< C > & | a | ) |
double mptensor::matrix_interface::max | ( | const Matrix< C > & | a | ) |
Return the maximum element.
For complex-valued matrix, this function is the same as max_abs();
[in] | a | A matrix |
double mptensor::matrix_interface::max_abs | ( | const Matrix< C > & | a | ) |
Return the maximum of the absolute value of elements.
[in] | a | A matrix |
double mptensor::matrix_interface::min | ( | const Matrix< C > & | a | ) |
Return the minimum element.
For complex-valued matrix, this function is the same as min_abs();
[in] | a | A matrix |
double mptensor::matrix_interface::min_abs | ( | const Matrix< C > & | a | ) |
Return the minimum of the absolute value of elements.
[in] | a | A matrix |
void mptensor::matrix_interface::replace_matrix_data | ( | const Matrix< C > & | M, |
const std::vector< int > & | dest_rank, | ||
const std::vector< size_t > & | local_position, | ||
Matrix< C > & | M_new | ||
) |
void mptensor::matrix_interface::replace_matrix_data | ( | const std::vector< C > & | V, |
const std::vector< int > & | dest_rank, | ||
const std::vector< size_t > & | local_position, | ||
Matrix< C > & | M_new | ||
) |