[ARITHMETIC][FUNCTIONS] modified teh transpose and adjoint implementations to use the in place version and avoid having a redundant copy
This commit is contained in:
parent
2cb2724bcd
commit
b206f40372
1 changed files with 5 additions and 3 deletions
|
|
@ -79,8 +79,9 @@ namespace rotgen
|
|||
matrix_impl64 matrix_impl64::transpose() const
|
||||
{
|
||||
matrix_impl64 result(*this);
|
||||
result.storage_->data = storage_->data.transpose();
|
||||
result.storage_->data.transposeInPlace();
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
matrix_impl64 matrix_impl64::conjugate() const
|
||||
|
|
@ -93,7 +94,7 @@ namespace rotgen
|
|||
matrix_impl64 matrix_impl64::adjoint() const
|
||||
{
|
||||
matrix_impl64 result(*this);
|
||||
result.storage_->data = storage_->data.adjoint();
|
||||
result.storage_->data.adjointInPlace();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -144,7 +145,8 @@ namespace rotgen
|
|||
return *this;
|
||||
}
|
||||
|
||||
matrix_impl64 matrix_impl64::operator-() const {
|
||||
matrix_impl64 matrix_impl64::operator-() const
|
||||
{
|
||||
matrix_impl64 result(*this);
|
||||
result.storage_->data = -result.storage_->data;
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue