37 #ifndef MNECOVMATRIX_H
38 #define MNECOVMATRIX_H
44 #include "../mne_global.h"
56 #include <QSharedPointer>
57 #include <QStringList>
62 #define MNE_COV_CH_UNKNOWN -1
63 #define MNE_COV_CH_MEG_MAG 0
64 #define MNE_COV_CH_MEG_GRAD 1
65 #define MNE_COV_CH_EEG 2
73 class FiffSparseMatrix;
99 typedef QSharedPointer<MneCovMatrix>
SPtr;
120 const QStringList& names,
128 const QStringList& names,
131 return new MneCovMatrix(kind,ncov,names,NULL,cov_diag,NULL);
134 static MneCovMatrix* mne_new_cov_sparse(
int kind,
136 const QStringList& names,
139 return new MneCovMatrix(kind,ncov,names,NULL,NULL,cov_sparse);
142 static MneCovMatrix* mne_new_cov(
int kind,
144 const QStringList& names,
148 return new MneCovMatrix(kind,ncov,names,cov,cov_diag,NULL);
151 static int mne_is_diag_cov(MneCovMatrix* c);
153 static int mne_add_inv_cov(MneCovMatrix* c);
155 static int condition_cov(MneCovMatrix* c,
float rank_threshold,
int use_rank);
157 static int mne_decompose_eigen_cov_small(MneCovMatrix* c,
float p_small,
int use_rank);
159 static int mne_decompose_eigen_cov(MneCovMatrix* c);
163 static int mne_lt_packed_index(
int j,
int k);
213 #endif // MNECOVMATRIX_H