Template Struct CSR_hermitian¶
Defined in File CSR_hermitian.hpp
Struct Documentation¶
-
template<typename T>
struct CSR_hermitian¶ sparse matrix in compressed-sparse-row (CSR) format
template (type is expected to be double or complex<double>) Only the lower triangle and the diagonal are stored
Public Functions
-
inline void apply(const vector<T> &x, vector<T> &y)¶
Applies the matrix on a vector x and adds the result to vector y.
-
inline void apply(const vector<T> &x, vector<T> &y, T z)¶
Applies the matrix on a vector x and adds z times the result to vector y.
-
inline void clear()¶
Public Members
-
vector<int32_t> J¶
array of column indices
-
vector<int32_t> Iptr¶
array of indices of J where the row index changes
-
vector<double> diag¶
diagonal elements (stored separately)
Friends
-
inline friend std::ostream &operator<<(std::ostream &s, const CSR_hermitian &m)¶
Prints the matrix if of modest size.
-
inline void apply(const vector<T> &x, vector<T> &y)¶