From 5e4dda8a1201ada051fba9fc3cd0e645595238d5 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 20 Jul 2016 15:19:17 +0200 Subject: Enable custom scalar types in some unit tests. --- test/svd_fill.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/svd_fill.h') diff --git a/test/svd_fill.h b/test/svd_fill.h index 500954d47..e0951ca57 100644 --- a/test/svd_fill.h +++ b/test/svd_fill.h @@ -10,6 +10,7 @@ template void svd_fill_random(MatrixType &m, int Option = 0) { + using std::pow; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; typedef typename MatrixType::Index Index; @@ -18,7 +19,7 @@ void svd_fill_random(MatrixType &m, int Option = 0) s = internal::random(1,s); Matrix d = Matrix::Random(diagSize); for(Index k=0; k(-s,s)); + d(k) = d(k)*pow(RealScalar(10),internal::random(-s,s)); bool dup = internal::random(0,10) < 3; bool unit_uv = internal::random(0,10) < (dup?7:3); // if we duplicate some diagonal entries, then increase the chance to preserve them using unitary U and V factors -- cgit v1.2.3