Go to the documentation of this file.
46 #include "Eigen/SparseCore"
115 explicit operator Matrix()
const;
141 Eigen::SparseMatrix<Numeric, Eigen::RowMajor>
matrix;
Sparse & operator-=(const Sparse &x)
Subtract sparse matrix.
Index ncols() const
Returns the number of columns.
void add(Sparse &A, const Sparse &B, const Sparse &C)
Sparse - Sparse addition.
int * get_column_index_pointer()
friend void abs(Sparse &A, const Sparse &B)
Absolute value of sparse matrix elements.
int * get_row_start_pointer()
friend void add(Sparse &A, const Sparse &B, const Sparse &C)
Sparse - Sparse addition.
invlib::Matrix< ArtsMatrix > Matrix
invlib wrapper type for ARTS matrices.
friend void sub(Sparse &A, const Sparse &B, const Sparse &C)
Sparse - Sparse subtraction.
void transpose(Sparse &A, const Sparse &B)
Transpose of sparse matrix.
friend void id_mat(Sparse &A)
Sparse identity matrix.
Vector y(Workspace &ws) noexcept
G0 G2 FVC Y DV Numeric Numeric Numeric Zeeman LowerQuantumNumbers void * data
Sparse()
Default constructor.
Numeric ro(Index r, Index c) const
Read only index operator.
friend std::ostream & operator<<(std::ostream &os, const Sparse &v)
Output operator for Sparse.
void list_elements(Vector &values, ArrayOfIndex &row_indices, ArrayOfIndex &column_indices) const
List elements in matrix.
This file contains the definition of Array.
void insert_row(Index r, Vector v)
Insert row function.
Implementation of Matrix, Vector, and such stuff.
void insert_elements(Index nnz, const ArrayOfIndex &rowind, const ArrayOfIndex &colind, ConstVectorView data)
Insert vector of elements with given row and column indices.
void sub(Sparse &A, const Sparse &B, const Sparse &C)
Sparse - Sparse subtraction.
bool empty() const
Returns true if variable size is zero.
Index nnz() const
Returns the number of nonzero elements.
Sparse & operator*=(Numeric x)
Scale matrix.
Numeric operator()(Index r, Index c) const
Plain index operator.
Numeric * get_element_pointer()
NUMERIC Numeric
The type to use for all floating point numbers.
void abs(Sparse &A, const Sparse &B)
Absolute value of sparse matrix elements.
A constant view of a Matrix.
Vector diagonal() const
Diagonal elements as vector.
void resize(Index r, Index c)
Resize function.
friend void transpose(Sparse &A, const Sparse &B)
Transpose of sparse matrix.
Sparse & operator/=(Numeric x)
Scale matrix by reciprocal.
void split(Index offset, Index nrows)
Reduce matrix to the row range [offset, offset + nrows].
friend void mult(VectorView y, const Sparse &M, ConstVectorView x)
Sparse matrix - Vector multiplication.
Index nrows() const
Returns the number of rows.
Numeric & rw(Index r, Index c)
Read and write index operator.
Eigen::SparseMatrix< Numeric, Eigen::RowMajor > matrix
The actual matrix.
void id_mat(Sparse &A)
Sparse identity matrix.
friend void transpose_mult(VectorView y, const Sparse &M, ConstVectorView x)
Sparse matrix - Vector multiplication.
Sparse & operator+=(const Sparse &x)
Add sparse matrix.
Vector x(Workspace &ws) noexcept
INDEX Index
The type to use for all integer numbers and indices.
void transpose_mult(VectorView y, const Sparse &M, ConstVectorView x)
Sparse matrix - Vector multiplication.
void mult(VectorView y, const Sparse &M, ConstVectorView x)
Sparse matrix - Vector multiplication.
A constant view of a Vector.