Example #1
0
 public Rosenbrock(Func <double[], double> f, Vector startPoint, double epsilon)
 {
     if (startPoint.IsEmpty)
     {
         throw new ArgumentException("startPoint");
     }
     n            = startPoint.Length;
     this.f       = x => Direction == OptimizationDirection.ToMin ? f(x) : -f(x);
     this.epsilon = epsilon;
     y            = startPoint;
     d            = new Vector[n];
     for (int i = 0; i < n; i++)
     {
         d[i]    = new Vector(n);
         d[i][i] = 1;
     }
     SmartPoint.SetFunction(f);
 }
Example #2
0
 public IterationDetails(Vector startPoint, int i)
 {
     I       = i;
     point   = new SmartPoint(startPoint);
     details = new List <StepDetails>();
 }