예제 #1
0
Minimiser::Solution Minimiser::solution() {
    Solution sol;
    sol.x.lower = gsl_min_fminimizer_x_lower(s);
    sol.x.upper = gsl_min_fminimizer_x_upper(s);
    sol.x.minimum = gsl_min_fminimizer_x_minimum(s);
    sol.f.lower = gsl_min_fminimizer_f_lower(s);
    sol.f.upper = gsl_min_fminimizer_f_upper(s);
    sol.f.minimum = gsl_min_fminimizer_f_minimum(s);
    sol.iterations = iterations;
    sol.converged = (status == GSL_SUCCESS);
    sol.statusCode = status;
    return sol;
}
예제 #2
0
파일: min.c 프로젝트: engineyard/rb-gsl
static VALUE rb_gsl_min_fminimizer_f_lower(VALUE obj)
{
  gsl_min_fminimizer *gmf = NULL;
  Data_Get_Struct(obj, gsl_min_fminimizer, gmf);
  return rb_float_new(gsl_min_fminimizer_f_lower(gmf));
}