This module contains some experimental features extending the sparse module:
- A RandomSetter which is a wrapper object allowing to set/update a sparse matrix with random access.
- A SparseInverse which calculates a sparse subset of the inverse of a sparse matrix corresponding to nonzeros of the input
- MatrixMarket format(https://math.nist.gov/MatrixMarket/formats.html) readers and writers for sparse and dense matrices.
#include <unsupported/Eigen/SparseExtra>
|
| bool | Eigen::getMarketHeader (const std::string &filename, int &sym, bool &iscomplex, bool &isdense) |
| | Reads the header of a matrixmarket file and determines the properties of a matrix.
|
| |
| template<typename SparseMatrixType> |
| bool | Eigen::loadMarket (SparseMatrixType &mat, const std::string &filename) |
| | Loads a sparse matrix from a matrixmarket format file.
|
| |
| template<typename DenseType> |
| bool | Eigen::loadMarketDense (DenseType &mat, const std::string &filename) |
| | Loads a dense Matrix or Vector from a matrixmarket file. If a statically sized matrix has to be parsed and the file contains the wrong dimensions it is undefined behaviour.
|
| |
|
template<typename VectorType> |
| bool | Eigen::loadMarketVector (VectorType &vec, const std::string &filename) |
| | Same functionality as loadMarketDense, deprecated.
|
| |
| template<typename SparseMatrixType> |
| bool | Eigen::saveMarket (const SparseMatrixType &mat, const std::string &filename, int sym=0) |
| | writes a sparse Matrix to a marketmarket format file
|
| |
| template<typename DenseType> |
| bool | Eigen::saveMarketDense (const DenseType &mat, const std::string &filename) |
| | writes a dense Matrix or vector to a marketmarket format file
|
| |
|
template<typename VectorType> |
| bool | Eigen::saveMarketVector (const VectorType &vec, const std::string &filename) |
| | Same functionality as saveMarketDense, deprecated.
|
| |
◆ getMarketHeader()
| bool Eigen::getMarketHeader |
( |
const std::string & | filename, |
|
|
int & | sym, |
|
|
bool & | iscomplex, |
|
|
bool & | isdense ) |
|
inline |
Reads the header of a matrixmarket file and determines the properties of a matrix.
- Parameters
-
| filename | of the file |
| sym | if the matrix is hermitian,symmetric or none of the latter (sym=0) |
| iscomplex | if the matrix has complex or real coefficients |
| isdense | if the matrix is dense or sparse |
- Returns
- true if the file was found
◆ loadMarket()
template<typename SparseMatrixType>
| bool Eigen::loadMarket |
( |
SparseMatrixType & | mat, |
|
|
const std::string & | filename ) |
Loads a sparse matrix from a matrixmarket format file.
- Template Parameters
-
| SparseMatrixType | to read into, symmetries are not supported |
- Parameters
-
| mat | SparseMatrix to read into, current values are overwritten |
| filename | to parse matrix from |
- Returns
- returns true if file exists. Returns false if the parsing did not succeed.
◆ loadMarketDense()
template<typename DenseType>
| bool Eigen::loadMarketDense |
( |
DenseType & | mat, |
|
|
const std::string & | filename ) |
Loads a dense Matrix or Vector from a matrixmarket file. If a statically sized matrix has to be parsed and the file contains the wrong dimensions it is undefined behaviour.
- Template Parameters
-
| DenseMatrixType | to read into |
- Parameters
-
| mat | DenseMatrix to read into, current values are overwritten, symmetries are not supported |
| filename | to parse matrix from |
- Returns
- true if parsing was successful. Returns false if the parsing did not succeed.
◆ saveMarket()
template<typename SparseMatrixType>
| bool Eigen::saveMarket |
( |
const SparseMatrixType & | mat, |
|
|
const std::string & | filename, |
|
|
int | sym = 0 ) |
writes a sparse Matrix to a marketmarket format file
- Template Parameters
-
| SparseMatrixType | to write to file |
- Parameters
-
| mat | matrix to write to file |
| filename | filename to write to |
| sym | at the moment no symmetry operations are supported |
- Returns
- true if writing succeeded
◆ saveMarketDense()
template<typename DenseType>
| bool Eigen::saveMarketDense |
( |
const DenseType & | mat, |
|
|
const std::string & | filename ) |
writes a dense Matrix or vector to a marketmarket format file
- Template Parameters
-
| DenseMatrixType | to write to file |
- Parameters
-
| mat | matrix to write to file |
| filename | filename to write to |
- Returns
- true if writing succeeded