FIFF sparse matrix storage. More...
#include <fiff_sparse_matrix.h>
Public Types | |
| typedef QSharedPointer< FiffSparseMatrix > | SPtr |
| typedef QSharedPointer< const FiffSparseMatrix > | ConstSPtr |
| typedef std::unique_ptr< FiffSparseMatrix > | UPtr |
Public Member Functions | |
| FiffSparseMatrix () | |
| FiffSparseMatrix (const FiffSparseMatrix &mat)=default | |
| FiffSparseMatrix (FiffSparseMatrix &&mat)=default | |
| FiffSparseMatrix & | operator= (const FiffSparseMatrix &)=default |
| FiffSparseMatrix & | operator= (FiffSparseMatrix &&)=default |
| ~FiffSparseMatrix ()=default | |
| FiffSparseMatrix::UPtr | mne_add_upper_triangle_rcs () |
| bool | is_empty () const |
| Eigen::SparseMatrix< double > | toEigenSparse () const |
Static Public Member Functions | |
| static std::vector< int > | fiff_get_matrix_sparse_dims (FIFFLIB::FiffTag::SPtr &tag) |
| static FiffSparseMatrix::UPtr | fiff_get_float_sparse_matrix (FIFFLIB::FiffTag::SPtr &tag) |
| static FiffSparseMatrix::UPtr | create_sparse_rcs (int nrow, int ncol, int *nnz, int **colindex, float **vals) |
| static FiffSparseMatrix | fromEigenSparse (const Eigen::SparseMatrix< double > &mat) |
Public Attributes | |
| FIFFLIB::fiff_int_t | coding |
| FIFFLIB::fiff_int_t | m |
| FIFFLIB::fiff_int_t | n |
| FIFFLIB::fiff_int_t | nz |
| Eigen::VectorXf | data |
| Eigen::VectorXi | inds |
| Eigen::VectorXi | ptrs |
FIFF sparse matrix storage.
Implements a FIFF sparse matrix.
Definition at line 81 of file fiff_sparse_matrix.h.
| typedef QSharedPointer<const FiffSparseMatrix> FIFFLIB::FiffSparseMatrix::ConstSPtr |
Const shared pointer type for FiffSparseMatrix.
Definition at line 85 of file fiff_sparse_matrix.h.
| typedef QSharedPointer<FiffSparseMatrix> FIFFLIB::FiffSparseMatrix::SPtr |
Shared pointer type for FiffSparseMatrix.
Definition at line 84 of file fiff_sparse_matrix.h.
| typedef std::unique_ptr<FiffSparseMatrix> FIFFLIB::FiffSparseMatrix::UPtr |
Unique pointer type for FiffSparseMatrix.
Definition at line 86 of file fiff_sparse_matrix.h.
| FiffSparseMatrix::FiffSparseMatrix | ( | ) |
Constructs the FiffSparseMatrix
Definition at line 144 of file fiff_sparse_matrix.cpp.
|
default |
Copies a FiffSparseMatrix (default — Eigen vectors handle deep copy).
|
default |
Default move constructor.
|
default |
Destroys the FiffSparseMatrix (default — Eigen vectors clean up automatically).
|
static |
Create a sparse RCS matrix from row-based data.
| [in] | nrow | Number of rows. |
| [in] | ncol | Number of columns. |
| [in] | nnz | Number of non-zero elements on each row. |
| [in] | colindex | Column indices of non-zero elements on each row. |
| [in] | vals | Values of non-zero elements on each row. |
Definition at line 225 of file fiff_sparse_matrix.cpp.
|
static |
Conversion of tag data into the standard sparse representation.
| [in] | tag | The tag containing sparse matrix data. |
Definition at line 161 of file fiff_sparse_matrix.cpp.
|
static |
Interpret dimensions and nz from matrix data.
| [in] | tag | The tag containing sparse matrix data. |
Definition at line 154 of file fiff_sparse_matrix.cpp.
|
static |
Create a FiffSparseMatrix from an Eigen::SparseMatrix. Stores in RCS (row-compressed) format.
| [in] | mat | The Eigen sparse matrix to convert. |
Definition at line 369 of file fiff_sparse_matrix.cpp.
|
inline |
Check whether this sparse matrix is empty (no non-zero elements).
Definition at line 210 of file fiff_sparse_matrix.h.
| FiffSparseMatrix::UPtr FiffSparseMatrix::mne_add_upper_triangle_rcs | ( | ) |
Add the upper triangle to a lower-triangular sparse RCS matrix.
Definition at line 273 of file fiff_sparse_matrix.cpp.
|
default |
Default copy-assignment operator.
|
default |
Default move-assignment operator.
| Eigen::SparseMatrix< double > FiffSparseMatrix::toEigenSparse | ( | ) | const |
Convert this FiffSparseMatrix to an Eigen::SparseMatrix<double>. Supports both RCS and CCS coding.
Definition at line 336 of file fiff_sparse_matrix.cpp.
| FIFFLIB::fiff_int_t FIFFLIB::FiffSparseMatrix::coding |
coding (storage) type of the sparse matrix.
Definition at line 196 of file fiff_sparse_matrix.h.
| Eigen::VectorXf FIFFLIB::FiffSparseMatrix::data |
Non-zero values (nz elements).
Definition at line 200 of file fiff_sparse_matrix.h.
| Eigen::VectorXi FIFFLIB::FiffSparseMatrix::inds |
Index array (nz elements).
Definition at line 201 of file fiff_sparse_matrix.h.
| FIFFLIB::fiff_int_t FIFFLIB::FiffSparseMatrix::m |
m rows.
Definition at line 197 of file fiff_sparse_matrix.h.
| FIFFLIB::fiff_int_t FIFFLIB::FiffSparseMatrix::n |
n columns.
Definition at line 198 of file fiff_sparse_matrix.h.
| FIFFLIB::fiff_int_t FIFFLIB::FiffSparseMatrix::nz |
nz nonzeros.
Definition at line 199 of file fiff_sparse_matrix.h.
| Eigen::VectorXi FIFFLIB::FiffSparseMatrix::ptrs |
Pointer array (m+1 for RCS, n+1 for CCS).
Definition at line 202 of file fiff_sparse_matrix.h.