26 #ifndef SPARSE_MATRIX2D_H_ 27 #define SPARSE_MATRIX2D_H_ 44 return ( _x.
i < _y.
i) || (( _x.
i== _y.
i) && ( _x.
j< _y.
j));
108 SparseMatrix2D(std::vector<SparseElement> &_elements,
int _Nelements);
111 void sparseMatrix2DFromVector(std::vector<SparseElement> &_elements);
116 void multMv(
double*
x,
double*
y);
132 double getElemIJ(
int row,
int col)
const;
145 void loadMatrix(
const FileName &fn);
MultidimArray< double > values
List of values.
int ncols() const
X size of the matrix.
std::ostream & operator<<(std::ostream &os, const Message &sb)
MultidimArray< int > iIdx
List of i positions.
int nrows() const
Y size of the matrix.
MultidimArray< int > jIdx
List of j positions.
bool operator<(const SparseElement &_x, const SparseElement &_y)