Feellgood
|
Read-mode square sparse matrix. More...
#include <sparseMat.h>
Classes | |
struct | SparseVector |
Public Member Functions | |
r_sparseMat (const w_sparseMat &source) | |
r_sparseMat (const MatrixShape &shape) | |
void | clear () |
void | add (int i, int j, double val) |
void | print (std::ostream &flux=std::cout) const |
double | operator() (const int i, const int j) const |
template<typename T > | |
void | mult (std::vector< T > const &X, std::vector< T > &Y) |
template<typename T > | |
void | build_diag_precond (std::vector< T > &D) const |
Private Attributes | |
std::vector< SparseVector > | rows |
Read-mode square sparse matrix.
This is the main sparse matrix class, meant for efficiently computing matrix-vector products.
|
inline |
Construct from a read-mode sparse matrix.
|
inline |
Construct from a matrix shape. Initialize all stored values to zero.
|
inline |
Add the provided value at position (i, j), which must belong to the shape. This method is thread-safe.
|
inline |
Build a diagonal preconditioner D from this matrix.
|
inline |
Zero-out all elements, while preserving the shape.
|
inline |
Y = this*X
|
inline |
Return the value at position (i, j).
|
inline |
Print to the provided stream.
|
private |
Container for the matrix rows. Since SparseVector is not movable, this container cannot be resized.