using System; using C=Science.Mathematics.Calculus; namespace ScienceTest.MathematicsTest.CalculusTest { /// /// MapTest /// public class MapTest { public MapTest() { } private string result; public string Result { get{return result;} } public void Compute() { Science.Mathematics.Function.DoubleAToDoubleA fa = new Science.Mathematics.Function.DoubleAToDoubleA(funca); C.Map map = new C.Map(fa); map.SetDimension(3); double[] y = new Double[2]; y[0] = 1.0; y[1] = 1.0; map.SetInitialPoint(y); for (int i = 0; i < 50; i++) { foreach (double ele in map.NextPoint) result += Convert.ToString(ele) + "\t"; result += "\r\n"; } } private double[] funca(double[] x) { double[] res = new double[2]; res[1] = Math.Atan(x[1]/x[0]); if(res[1] < 0.0) res[1] = res[1]+Math.PI; res[0] = 0.5*Math.Log(x[0]*x[0]+x[1]*x[1]); return res; } } }