コード例 #1
0
 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));
 }
コード例 #2
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"));
 }
コード例 #3
0
 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 }));
 }
コード例 #4
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"));
 }