MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
fiff_sparse_matrix.h
Go to the documentation of this file.
1//=============================================================================================================
37#ifndef FIFFSPARSEMATRIX_H
38#define FIFFSPARSEMATRIX_H
39
40//=============================================================================================================
41// INCLUDES
42//=============================================================================================================
43
44#include "../fiff_global.h"
45#include "../fiff_types.h"
46#include "../fiff_tag.h"
47
48//=============================================================================================================
49// EIGEN INCLUDES
50//=============================================================================================================
51
52#include <Eigen/Core>
53
54//=============================================================================================================
55// QT INCLUDES
56//=============================================================================================================
57
58#include <QSharedPointer>
59#include <QDebug>
60
61//=============================================================================================================
62// DEFINE NAMESPACE FIFFLIB
63//=============================================================================================================
64
65namespace FIFFLIB
66{
67
68//=============================================================================================================
75{
76public:
77 typedef QSharedPointer<FiffSparseMatrix> SPtr;
78 typedef QSharedPointer<const FiffSparseMatrix> ConstSPtr;
80 //=========================================================================================================
85
86 //=========================================================================================================
94
95 //=========================================================================================================
101
102 //============================= fiff_sparse.c =============================
103 /*
104 * Interpret dimensions and nz from matrix data
105 */
106 static FIFFLIB::fiff_int_t *fiff_get_matrix_sparse_dims(FIFFLIB::FiffTag::SPtr& tag);
107
108 /*
109 * Conversion into the standard representation
110 */
111 static FIFFLIB::FiffSparseMatrix* fiff_get_float_sparse_matrix(FIFFLIB::FiffTag::SPtr& tag);
112
113 //============================= mne_sparse_matop.c =============================
114
115 //Refactored: mne_create_sparse_rcs
116 static FIFFLIB::FiffSparseMatrix* create_sparse_rcs( int nrow, /* Number of rows */
117 int ncol, /* Number of columns */
118 int *nnz, /* Number of non-zero elements on each row */
119 int **colindex, /* Column indices of non-zero elements on each row */
120 float **vals);
121
122 FIFFLIB::FiffSparseMatrix* mne_add_upper_triangle_rcs();
123
124public:
125 FIFFLIB::fiff_int_t coding;
126 FIFFLIB::fiff_int_t m;
127 FIFFLIB::fiff_int_t n;
128 FIFFLIB::fiff_int_t nz;
129 FIFFLIB::fiff_float_t *data;
130 FIFFLIB::fiff_int_t *inds;
131 FIFFLIB::fiff_int_t *ptrs;
133// ### OLD STRUCT ###
135//typedef struct _fiff_sparse_matrix {
136// fiff_int_t coding; /**< coding (storage) type of the sparse matrix. */
137// fiff_int_t m; /**< m rows. */
138// fiff_int_t n; /**< n columns. */
139// fiff_int_t nz; /**< nz nonzeros. */
140// fiff_float_t *data; /**< owns the data. */
141// fiff_int_t *inds; /**< index list, points into data, no dealloc!. */
142// fiff_int_t *ptrs; /**< pointer list, points into data, no dealloc!. */
143//} *fiffSparseMatrix, fiffSparseMatrixRec;
144};
145
146//=============================================================================================================
147// INLINE DEFINITIONS
148//=============================================================================================================
149} // NAMESPACE FIFFLIB
150
151#endif // FIFFSPARSEMATRIX_H
#define FIFFSHARED_EXPORT
Definition fiff_global.h:56
Data associated with MNE computations for each mneMeasDataSet.
QSharedPointer< FiffSparseMatrix > SPtr
FIFFLIB::fiff_int_t * inds
FIFFLIB::fiff_int_t * ptrs
FIFFLIB::fiff_float_t * data
QSharedPointer< const FiffSparseMatrix > ConstSPtr
QSharedPointer< FiffTag > SPtr
Definition fiff_tag.h:152