Mentions légales du service

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

Add MatDense::adjoint().

parent c49a46ec
No related branches found
No related tags found
No related merge requests found
......@@ -366,6 +366,9 @@ void spgemm(const Faust::MatSparse<FPP,Cpu> & A,const Faust::MatDense<FPP,Cpu> &
void conjugate();
void conjugate(const bool eval);
//! \brief Replaces the matrix by its transconjugate.
void adjoint();
//! \brief Replace this by (this) * A
void multiplyRight(MatDense<FPP,Cpu> const& A);
......
......@@ -327,7 +327,7 @@ void Faust::MatDense<FPP,Cpu>::transpose()
return;
}
mat = mat.transpose().eval();
mat = mat.transpose().eval(); // equiv. to transposeInPlace() https://eigen.tuxfamily.org/dox/classEigen_1_1DenseBase.html#ac501bd942994af7a95d95bee7a16ad2a
faust_unsigned_int dim1_copy = this->dim1;
this->dim1 = this->dim2;
this->dim2 = dim1_copy;
......@@ -384,6 +384,22 @@ void Faust::MatDense<FPP,Cpu>::conjugate(const bool eval)
}
template<typename FPP>
void Faust::MatDense<FPP,Cpu>::adjoint()
{
if(isZeros)
{
this->resize(this->dim2, this->dim1);
return;
}
mat.adjointInPlace();
faust_unsigned_int dim1_copy = this->dim1;
this->dim1 = this->dim2;
this->dim2 = dim1_copy;
}
template<typename FPP>
void Faust::MatDense<FPP,Cpu>::real()
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment