From 3411146984316c97f56543333a46f47aeb7f9d35 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 21 Mar 2014 16:04:53 +0600 Subject: Update Eigen to version 3.2.1 Main purpose of this is to have SparseLU solver which we can use now as a replacement to opennl library. --- extern/Eigen3/Eigen/src/Geometry/Hyperplane.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'extern/Eigen3/Eigen/src/Geometry/Hyperplane.h') diff --git a/extern/Eigen3/Eigen/src/Geometry/Hyperplane.h b/extern/Eigen3/Eigen/src/Geometry/Hyperplane.h index 1b7c7c78c80..aeff43fefa6 100644 --- a/extern/Eigen3/Eigen/src/Geometry/Hyperplane.h +++ b/extern/Eigen3/Eigen/src/Geometry/Hyperplane.h @@ -50,7 +50,7 @@ public: typedef const Block ConstNormalReturnType; /** Default constructor without initialization */ - inline explicit Hyperplane() {} + inline Hyperplane() {} template Hyperplane(const Hyperplane& other) @@ -75,7 +75,7 @@ public: * such that the algebraic equation of the plane is \f$ n \cdot x + d = 0 \f$. * \warning the vector normal is assumed to be normalized. */ - inline Hyperplane(const VectorType& n, Scalar d) + inline Hyperplane(const VectorType& n, const Scalar& d) : m_coeffs(n.size()+1) { normal() = n; @@ -135,7 +135,7 @@ public: /** \returns the absolute distance between the plane \c *this and a point \a p. * \sa signedDistance() */ - inline Scalar absDistance(const VectorType& p) const { return internal::abs(signedDistance(p)); } + inline Scalar absDistance(const VectorType& p) const { using std::abs; return abs(signedDistance(p)); } /** \returns the projection of a point \a p onto the plane \c *this. */ @@ -178,13 +178,14 @@ public: */ VectorType intersection(const Hyperplane& other) const { + using std::abs; EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(VectorType, 2) Scalar det = coeffs().coeff(0) * other.coeffs().coeff(1) - coeffs().coeff(1) * other.coeffs().coeff(0); // since the line equations ax+by=c are normalized with a^2+b^2=1, the following tests // whether the two lines are approximately parallel. if(internal::isMuchSmallerThan(det, Scalar(1))) { // special case where the two lines are approximately parallel. Pick any point on the first line. - if(internal::abs(coeffs().coeff(1))>internal::abs(coeffs().coeff(0))) + if(abs(coeffs().coeff(1))>abs(coeffs().coeff(0))) return VectorType(coeffs().coeff(1), -coeffs().coeff(2)/coeffs().coeff(1)-coeffs().coeff(0)); else return VectorType(-coeffs().coeff(2)/coeffs().coeff(0)-coeffs().coeff(1), coeffs().coeff(0)); @@ -256,7 +257,7 @@ public: * * \sa MatrixBase::isApprox() */ template - bool isApprox(const Hyperplane& other, typename NumTraits::Real prec = NumTraits::dummy_precision()) const + bool isApprox(const Hyperplane& other, const typename NumTraits::Real& prec = NumTraits::dummy_precision()) const { return m_coeffs.isApprox(other.m_coeffs, prec); } protected: -- cgit v1.2.3