Beispiel #1
0
			public void FitDFP2()
			{
				double eps = 1e-5;
				double rEps = eps*10;
				double step = 3;
				double[] vector = {6,45,22};
				double[] expVector = {0,0,0};
				int itMax = 50;
				Parabola f = new Parabola();
				int dim = f.Dimension;
				DFP alg = new DFP(dim, vector, f, step, eps, itMax);
				alg.FindMinimum();
				Assert.IsTrue(Diff(expVector,alg.Minimum,dim)<rEps);
			}
Beispiel #2
0
			public void FitDFP1()
			{
				double eps = 1e-5;
				double rEps = eps*10;
				double step = 1;
				int itMax=50;
				double[] vector = {0,0,0};
				double[] expVector = {1,-2,3};
				TestFunction f = new TestFunction();
				int dim = f.Dimension;
				DFP alg = new DFP(dim, vector, f, step, eps, itMax);
				alg.FindMinimum();
				Assert.IsTrue(Diff(expVector,alg.Minimum,dim)<rEps);
			}
Beispiel #3
0
			public void FitDFP3()
			{
				double eps = 1e-5;
				double rEps = eps;
				int itMax = 200;
				double step=1;
				double[] vector = {6,-5};
				double[] expVector = {1,1};
				Banana f = new Banana();
				int dim = f.Dimension;
				DFP alg = new DFP(dim,vector,f,step,eps,itMax);
				alg.FindMinimum();
				Assert.IsTrue(Diff(expVector,alg.Minimum,dim)<rEps);
			}
Beispiel #4
0
 public void FitDFP1()
 {
     double eps = 1e-5;
         double rEps = eps*10;
         double step = 1;
         int itMax=50;
         double[] vector = {0,0,0};
         double[] expVector = {1,-2,3};
         TestFunction f = new TestFunction();
         int dim = f.Dimension;
         DFP alg = new DFP(dim, vector, f, step, eps, itMax);
         alg.FindMinimum();
         Assert.IsTrue(Diff(expVector,alg.Minimum,dim)<rEps);
 }
Beispiel #5
0
 public void FitDFP3()
 {
     double eps = 1e-5;
         double rEps = eps;
         int itMax = 200;
         double step=1;
         double[] vector = {6,-5};
         double[] expVector = {1,1};
         Banana f = new Banana();
         int dim = f.Dimension;
         DFP alg = new DFP(dim,vector,f,step,eps,itMax);
         alg.FindMinimum();
         Assert.IsTrue(Diff(expVector,alg.Minimum,dim)<rEps);
 }
Beispiel #6
0
 public void FitDFP2()
 {
     double eps = 1e-5;
         double rEps = eps*10;
         double step = 3;
         double[] vector = {6,45,22};
         double[] expVector = {0,0,0};
         int itMax = 50;
         Parabola f = new Parabola();
         int dim = f.Dimension;
         DFP alg = new DFP(dim, vector, f, step, eps, itMax);
         alg.FindMinimum();
         Assert.IsTrue(Diff(expVector,alg.Minimum,dim)<rEps);
 }