aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/svd_common.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2015-03-27 12:07:14 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2015-03-27 12:07:14 +0100
commitad044008da82b8eaf4fff638582ba9b69db6e711 (patch)
tree76d1b44c9dfa03450ebef5303a6ea2cb5a023a2a /test/svd_common.h
parent79cb8752491cb37f2aa52aaeb687773e413468b5 (diff)
Fix transpose versus adjoint.
Diffstat (limited to 'test/svd_common.h')
-rw-r--r--test/svd_common.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/svd_common.h b/test/svd_common.h
index 2f6be6b2b..b44b79124 100644
--- a/test/svd_common.h
+++ b/test/svd_common.h
@@ -61,16 +61,16 @@ void svd_compare_to_full(const MatrixType& m,
if(computationOptions & (ComputeFullV|ComputeThinV))
{
- VERIFY( (svd.matrixV().transpose()*svd.matrixV()).isIdentity(prec) );
- VERIFY_IS_APPROX( svd.matrixV().leftCols(diagSize) * svd.singularValues().asDiagonal() * svd.matrixV().leftCols(diagSize).transpose(),
- referenceSvd.matrixV().leftCols(diagSize) * referenceSvd.singularValues().asDiagonal() * referenceSvd.matrixV().leftCols(diagSize).transpose());
+ VERIFY( (svd.matrixV().adjoint()*svd.matrixV()).isIdentity(prec) );
+ VERIFY_IS_APPROX( svd.matrixV().leftCols(diagSize) * svd.singularValues().asDiagonal() * svd.matrixV().leftCols(diagSize).adjoint(),
+ referenceSvd.matrixV().leftCols(diagSize) * referenceSvd.singularValues().asDiagonal() * referenceSvd.matrixV().leftCols(diagSize).adjoint());
}
if(computationOptions & (ComputeFullU|ComputeThinU))
{
- VERIFY( (svd.matrixU().transpose()*svd.matrixU()).isIdentity(prec) );
- VERIFY_IS_APPROX( svd.matrixU().leftCols(diagSize) * svd.singularValues().cwiseAbs2().asDiagonal() * svd.matrixU().leftCols(diagSize).transpose(),
- referenceSvd.matrixU().leftCols(diagSize) * referenceSvd.singularValues().cwiseAbs2().asDiagonal() * referenceSvd.matrixU().leftCols(diagSize).transpose());
+ VERIFY( (svd.matrixU().adjoint()*svd.matrixU()).isIdentity(prec) );
+ VERIFY_IS_APPROX( svd.matrixU().leftCols(diagSize) * svd.singularValues().cwiseAbs2().asDiagonal() * svd.matrixU().leftCols(diagSize).adjoint(),
+ referenceSvd.matrixU().leftCols(diagSize) * referenceSvd.singularValues().cwiseAbs2().asDiagonal() * referenceSvd.matrixU().leftCols(diagSize).adjoint());
}
// The following checks are not critical.