Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 0e58cde7 authored by hhakim's avatar hhakim
Browse files

Fix reference return issue in MatSparse::operator().

The function prototype is imposed by the MatGeneric parent which was in its turn imposed by MatDense first function to move up in hierarchy, so we have to return a ref without having access to the buffer directly (fortunately Eigen provides the function coeffRef for that).
parent 7bacdd70
No related branches found
No related tags found
No related merge requests found
......@@ -296,7 +296,7 @@ namespace Faust
matvar_t* toMatIOVarDense(bool transpose, bool conjugate) const;
FPP normL1(const bool transpose=false) const;
FPP normL1(faust_unsigned_int&, const bool transpose=false) const;
const FPP& operator()(faust_unsigned_int i, faust_unsigned_int j)const{return mat.coeff(i,j);}
const FPP& operator()(faust_unsigned_int i, faust_unsigned_int j)const{return const_cast<Eigen::SparseMatrix<FPP,Eigen::RowMajor>*>(&mat)->coeffRef(i,j);}
Faust::Vect<FPP,Cpu> get_col(faust_unsigned_int id) const;
Faust::MatSparse<FPP,Cpu>* get_cols(faust_unsigned_int col_id_start, faust_unsigned_int num_cols) const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment