public void Interpolate2d_Facts() { Assert.Equal("2d interpolator blah not found in cache", InterpolatorFunctions.Interpolate2d("blah", 0, 0)); InterpolatorFunctions.Create2dInterpolator("pwah", new[] { 1.0 }, new[] { 1.0 }, new[, ] { { 1.0 } }, "Bilinear"); Assert.Equal(1.0, InterpolatorFunctions.Interpolate2d("pwah", 0, 0)); }
public void Create2dInterpolator_Facts() { Assert.Equal("Could not parse 2d interpolator type - blah", InterpolatorFunctions.Create2dInterpolator("pwah", new[] { 1.0 }, new[] { 1.0 }, new[, ] { { 1.0 } }, "blah")); Assert.Equal("pwah¬0", InterpolatorFunctions.Create2dInterpolator("pwah", new[] { 1.0 }, new[] { 1.0 }, new[, ] { { 1.0 } }, "Bilinear")); }
public void Interpolate1dAverage_Facts() { Assert.Equal("1d interpolator blah not found in cache", InterpolatorFunctions.Interpolate1dAverage("blah", new[] { 0.0 })); InterpolatorFunctions.Create1dInterpolator("pwah", new[] { 1.0 }, new[] { 1.0 }, "Linear"); Assert.Equal(1.0, InterpolatorFunctions.Interpolate1dAverage("pwah", new[] { 0.0 })); }
public void Create1dInterpolatorSafe_Facts() { Assert.Equal("Could not parse 1d interpolator type - blah", InterpolatorFunctions.Create1dInterpolatorSafe("pwahg", new object[] { 1.0 }, new object[] { 1.0 }, "blah")); Assert.Equal("Input vectors must be same length", InterpolatorFunctions.Create1dInterpolatorSafe("pwahg", new object[] { 1.0 }, new object[] { 1.0, 2.0 }, "Linear")); Assert.Equal("pwahg¬0", InterpolatorFunctions.Create1dInterpolatorSafe("pwahg", new object[] { 1.0 }, new object[] { 1.0 }, "Linear")); }