aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--unsupported/Eigen/src/Splines/SplineFitting.h5
-rw-r--r--unsupported/test/splines.cpp2
2 files changed, 4 insertions, 3 deletions
diff --git a/unsupported/Eigen/src/Splines/SplineFitting.h b/unsupported/Eigen/src/Splines/SplineFitting.h
index c30129983..3b8e70a18 100644
--- a/unsupported/Eigen/src/Splines/SplineFitting.h
+++ b/unsupported/Eigen/src/Splines/SplineFitting.h
@@ -17,6 +17,7 @@
#include "SplineFwd.h"
+#include <Eigen/LU>
#include <Eigen/QR>
namespace Eigen
@@ -404,8 +405,8 @@ namespace Eigen
A(n - 1, n - 1) = 1;
// Solve
- HouseholderQR<MatrixType> qr(A);
- ControlPointVectorType controlPoints = qr.solve(MatrixType(b.transpose())).transpose();
+ FullPivLU<MatrixType> lu(A);
+ ControlPointVectorType controlPoints = lu.solve(MatrixType(b.transpose())).transpose();
SplineType spline(knots, controlPoints);
diff --git a/unsupported/test/splines.cpp b/unsupported/test/splines.cpp
index 1f3856143..755a21ece 100644
--- a/unsupported/test/splines.cpp
+++ b/unsupported/test/splines.cpp
@@ -261,7 +261,7 @@ void check_global_interpolation_with_derivatives2d()
{
PointType point = spline(knots(i));
PointType referencePoint = points.col(i);
- VERIFY((point - referencePoint).matrix().norm() < 1e-12);
+ VERIFY((point - referencePoint).matrix().norm() < 1e-10);
PointType derivative = spline.derivatives(knots(i), 1).col(1);
PointType referenceDerivative = derivatives.col(i);
VERIFY((derivative - referenceDerivative).matrix().norm() < 1e-10);