public void PolynomialInterpolationDoublePrecisionException3() { // Error: 2 identical x values. var points = new[] { new Vector2D(0, 1), new Vector2D(0, 4), new Vector2D(5, -1) }; InterpolationHelper.PolynomialInterpolation(points, 0); }
public void PolynomialInterpolationDoublePrecision() { var points = new[] { new Vector2D(0, 1), new Vector2D(3, 4), new Vector2D(5, -1) }; Assert.IsTrue(Numeric.AreEqual(points[0].Y, InterpolationHelper.PolynomialInterpolation(points, points[0].X))); Assert.IsTrue(Numeric.AreEqual(points[1].Y, InterpolationHelper.PolynomialInterpolation(points, points[1].X))); Assert.IsTrue(Numeric.AreEqual(points[2].Y, InterpolationHelper.PolynomialInterpolation(points, points[2].X))); }
public void PolynomialInterpolationDoublePrecisionException2() { InterpolationHelper.PolynomialInterpolation(new List <Vector2D>(), 0); }
public void PolynomialInterpolationDoublePrecisionException() { InterpolationHelper.PolynomialInterpolation(null, 0); }