hi Christoph
I finally got on to coding this task :)
There is 1 more case:
4a) old code:
_"Create a polynomial (neville) interpolation based on arbitrary points."
note: I tried to take the unit tests for NevillePolynomialInterpolation and apply them to the old code Interpolation.CreatePolynomial() to check that the results would be the same. However, these tests are failing:
Does this replacement look correct ? ( using NevillePolynomialInterpolation to replace Interpolation.CreatePolynomial() )
thanks !
Sean
I finally got on to coding this task :)
There is 1 more case:
4a) old code:
points = new List<double> { start.XValue, middle.XValue, end.XValue };
values = new List<double> { start.YValues[0], middle.YValues[0], end.YValues[0] };
var method = Interpolation.CreatePolynomial(points, values);
var result = method.Interpolate(verticalX);
4b) replace with:points = new List<double> { start.XValue, middle.XValue, end.XValue };
values = new List<double> { start.YValues[0], middle.YValues[0], end.YValues[0] };
var interpolate = new NevillePolynomialInterpolation(points, values);
var result = interpolate.Interpolate(verticalX);
note: I chose NevillePolynomialInterpolation to replace Interpolation.CreatePolynomial() because of a comment on Interpolation.CreatePolynomial() mentions 'Neville':_"Create a polynomial (neville) interpolation based on arbitrary points."
note: I tried to take the unit tests for NevillePolynomialInterpolation and apply them to the old code Interpolation.CreatePolynomial() to check that the results would be the same. However, these tests are failing:
Constructor_SamplePointsNotUnique_Throws
InterpolationFitsAtArbitraryPointsWithMapleTest
InterpolationFitsAtSamplePointsTest
so when I saw the tests failing - I thought I better double check on this forum, if this replacement makes sense.Does this replacement look correct ? ( using NevillePolynomialInterpolation to replace Interpolation.CreatePolynomial() )
thanks !
Sean