Esempio n. 1
0
 public ShorMethod(double epcilon, List<double> x, int N, double alfa, List<double> ksi, int iterations)
 {
     this.iteration = iterations;
     this.N = N;
     this.epcilon = epcilon;
     this.x = x;
     this.alfa = alfa;
     f = new Rosenbrock(N, ksi);
     fg = new RosenbrockGrad(N, ksi);
     if (alfa == 0)
         return;
     B = new List<double>(N * N);
     g = new List<double>(N);
     prevr = new List<double>(N);
     mu = 0.0001; eta = 0.0005; sigma = 0.0001;
     w = (1 / alfa - 1);
     midlineX = new List<List<double>>();
 }
Esempio n. 2
0
 public ShorMethod(double epcilon, List <double> x, int N, double alfa, List <double> ksi, int iterations)
 {
     this.iteration = iterations;
     this.N         = N;
     this.epcilon   = epcilon;
     this.x         = x;
     this.alfa      = alfa;
     f  = new Rosenbrock(N, ksi);
     fg = new RosenbrockGrad(N, ksi);
     if (alfa == 0)
     {
         return;
     }
     B        = new List <double>(N * N);
     g        = new List <double>(N);
     prevr    = new List <double>(N);
     mu       = 0.0001; eta = 0.0005; sigma = 0.0001;
     w        = (1 / alfa - 1);
     midlineX = new List <List <double> >();
 }