Mentions légales du service

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

Set optional MatButterfly::normL1 transpose argument and fix a bug on...

Set optional MatButterfly::normL1 transpose argument and fix a bug on MatSparse size of MatButterfly::toMatSparse.
parent f35a7f4d
No related branches found
No related tags found
No related merge requests found
......@@ -79,7 +79,7 @@ namespace Faust
MatType getType() const;
void operator*=(const FPP alpha);
matvar_t* toMatIOVar(bool transpose, bool conjugate, const char *var_name=nullptr) const;
Real<FPP> normL1(const bool transpose) const;
Real<FPP> normL1(const bool transpose=false) const;
Real<FPP> norm() const;
Real<FPP> normL1(faust_unsigned_int& col_id, const bool transpose) const;
Vect<FPP,Cpu> get_col(faust_unsigned_int id) const;
......
......@@ -296,7 +296,7 @@ namespace Faust
}
template<typename FPP>
Real<FPP> MatButterfly<FPP, Cpu>::normL1(const bool transpose) const
Real<FPP> MatButterfly<FPP, Cpu>::normL1(const bool transpose/*=false*/) const
{
return toMatSparse().normL1(transpose);
}
......@@ -423,7 +423,9 @@ namespace Faust
tripletList.push_back(Eigen::Triplet<FPP>(i, i + k, d2_ptr[i]));
}
}
return MatSparse<FPP, Cpu>(tripletList, s, s);
auto sp = MatSparse<FPP, Cpu>(tripletList, s, s);
sp.conservativeResize(s, s);
return sp;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment