[ARITHMETIC][FUNCTIONS] implemented and tested the unary operations transpose, adjoint, conjugate and transposeInPlace and adjointInPlace

This commit is contained in:
kallore 2025-05-20 10:23:57 +02:00
parent 8759c7381a
commit 8aea305ad3
4 changed files with 119 additions and 0 deletions

View file

@ -76,6 +76,36 @@ namespace rotgen
const double* matrix_impl64::data() const { return storage_->data.data(); }
matrix_impl64 matrix_impl64::transpose() const
{
matrix_impl64 result(*this);
result.storage_->data = storage_->data.transpose();
return result;
}
matrix_impl64 matrix_impl64::conjugate() const
{
matrix_impl64 result(*this);
result.storage_->data = storage_->data.conjugate();
return result;
}
matrix_impl64 matrix_impl64::adjoint() const
{
matrix_impl64 result(*this);
result.storage_->data = storage_->data.adjoint();
return result;
}
void matrix_impl64::transposeInPlace()
{
storage_->data.transposeInPlace();
}
void matrix_impl64::adjointInPlace()
{
storage_->data.adjointInPlace();
}
//==================================================================================================
// Operators
//==================================================================================================