From fcb1b7abc591589fb5e5b1b0c0a1cd8f8bd3487c Mon Sep 17 00:00:00 2001 From: cureos Date: Tue, 17 Apr 2012 08:44:30 +0200 Subject: [PATCH] Corrected distinct comparison --- src/.gitignore | 2 ++ .../Interpolation/Algorithms/NevillePolynomialInterpolation.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/.gitignore b/src/.gitignore index f47d9820..44ac5396 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -8,3 +8,5 @@ obj TestResults *.sdf Version.cs + +*.ReSharper \ No newline at end of file diff --git a/src/Numerics/Interpolation/Algorithms/NevillePolynomialInterpolation.cs b/src/Numerics/Interpolation/Algorithms/NevillePolynomialInterpolation.cs index 755b525a..8000afe2 100644 --- a/src/Numerics/Interpolation/Algorithms/NevillePolynomialInterpolation.cs +++ b/src/Numerics/Interpolation/Algorithms/NevillePolynomialInterpolation.cs @@ -127,7 +127,7 @@ namespace MathNet.Numerics.Interpolation.Algorithms } for (var i = 1; i < samplePoints.Count; ++i) - if (samplePoints[i] <= samplePoints[i - 1]) + if (samplePoints[i] == samplePoints[i - 1]) throw new ArgumentException(Resources.Interpolation_Initialize_SamplePointsNotUnique, "samplePoints"); _points = samplePoints;