Пример #1
0
 public void TestToString()
 {
     double[] ps = { 5, 0, 0, 0 };
     var funct = new MultiquadricFunction(3, ps, 0);
     double[] x = { -1, 0, 1 };
     funct.Evaluate(x);
     Assert.AreEqual("[MultiquadricFunction:width=5.00,center=0.00,0.00,0.00]", funct.ToString());
 }
Пример #2
0
 public void TestEvaluate()
 {
     double[] ps = { 5, 0, 0, 0 };
     var funct = new MultiquadricFunction(3, ps, 0);
     double[] x = { -1, 0, 1 };
     double y = funct.Evaluate(x);
     Assert.AreEqual(8.774964387392123, y, AIFH.DefaultPrecision);
 }
Пример #3
0
 public void TestOther()
 {
     double[] ps = { 5, 0, 0, 0 };
     var funct = new MultiquadricFunction(3, ps, 0);
     Assert.AreEqual(3, funct.Dimensions);
     funct.SetCenter(0, 100);
     Assert.AreEqual(100, funct.GetCenter(0), AIFH.DefaultPrecision);
     funct.Width = 5;
     Assert.AreEqual(5, funct.Width, AIFH.DefaultPrecision);
 }