Eigen-unsupported  3.4.90 (git rev 67eeba6e720c5745abc77ae6c92ce0a44aa7b7ae)
SparseExtra module

Detailed Description

This module contains some experimental features extending the sparse module:

#include <unsupported/Eigen/SparseExtra>

Classes

class  Eigen::RandomSetter< SparseMatrixType, MapTraits, OuterPacketBits >
 The RandomSetter is a wrapper object allowing to set/update a sparse matrix with random access. More...
 

Functions

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. More...
 
template<typename SparseMatrixType >
bool Eigen::loadMarket (SparseMatrixType &mat, const std::string &filename)
 Loads a sparse matrix from a matrixmarket format file. More...
 
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. More...
 
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 More...
 
template<typename DenseType >
bool Eigen::saveMarketDense (const DenseType &mat, const std::string &filename)
 writes a dense Matrix or vector to a marketmarket format file More...
 
template<typename VectorType >
bool Eigen::saveMarketVector (const VectorType &vec, const std::string &filename)
 Same functionality as saveMarketDense, deprecated.
 

Function Documentation

◆ 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
filenameof the file
symif the matrix is hermitian,symmetric or none of the latter (sym=0)
iscomplexif the matrix has complex or real coefficients
isdenseif 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
SparseMatrixTypeto read into, symmetries are not supported
Parameters
matSparseMatrix to read into, current values are overwritten
filenameto 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
DenseMatrixTypeto read into
Parameters
matDenseMatrix to read into, current values are overwritten, symmetries are not supported
filenameto 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
SparseMatrixTypeto write to file
Parameters
matmatrix to write to file
filenamefilename to write to
symat 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
DenseMatrixTypeto write to file
Parameters
matmatrix to write to file
filenamefilename to write to
Returns
true if writing succeeded