mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-16 05:35:57 +08:00
Fixed eigensolver warning.
This commit is contained in:
parent
f3a568c81d
commit
04274f6793
@ -33,12 +33,14 @@
|
|||||||
template<typename VectorType>
|
template<typename VectorType>
|
||||||
void verify_is_approx_upto_permutation(const VectorType& vec1, const VectorType& vec2)
|
void verify_is_approx_upto_permutation(const VectorType& vec1, const VectorType& vec2)
|
||||||
{
|
{
|
||||||
|
typedef typename NumTraits<VectorType::Scalar>::Real RealScalar;
|
||||||
|
|
||||||
VERIFY(vec1.cols() == 1);
|
VERIFY(vec1.cols() == 1);
|
||||||
VERIFY(vec2.cols() == 1);
|
VERIFY(vec2.cols() == 1);
|
||||||
VERIFY(vec1.rows() == vec2.rows());
|
VERIFY(vec1.rows() == vec2.rows());
|
||||||
for (int k = 1; k <= vec1.rows(); ++k)
|
for (int k = 1; k <= vec1.rows(); ++k)
|
||||||
{
|
{
|
||||||
VERIFY_IS_APPROX(vec1.array().pow(k).sum(), vec2.array().pow(k).sum());
|
VERIFY_IS_APPROX(vec1.array().pow(RealScalar(k)).sum(), vec2.array().pow(RealScalar(k)).sum());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user