mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
improve/fix stable_norm unit test
This commit is contained in:
@@ -51,8 +51,8 @@ void testVectorType(const VectorType& base)
|
||||
{
|
||||
typedef typename ei_traits<VectorType>::Scalar Scalar;
|
||||
Scalar low = ei_random<Scalar>(-500,500);
|
||||
Scalar high = ei_random<Scalar>(-500,500);
|
||||
if (low>high) std::swap(low,high);
|
||||
Scalar high = ei_random<Scalar>(-500,500);
|
||||
if (low>high) std::swap(low,high);
|
||||
const int size = base.size();
|
||||
const Scalar step = (high-low)/(size-1);
|
||||
|
||||
@@ -91,7 +91,7 @@ void testVectorType(const VectorType& base)
|
||||
|
||||
Matrix<Scalar,Dynamic,1> size_changer(size+50);
|
||||
size_changer.setLinSpaced(low,high,size);
|
||||
VERIFY( size_changer.size() == size );
|
||||
VERIFY( size_changer.size() == size );
|
||||
}
|
||||
|
||||
template<typename MatrixType>
|
||||
|
||||
Reference in New Issue
Block a user