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; }
static VALUE rb_gsl_min_fminimizer_f_upper(VALUE obj) { gsl_min_fminimizer *gmf = NULL; Data_Get_Struct(obj, gsl_min_fminimizer, gmf); return rb_float_new(gsl_min_fminimizer_f_upper(gmf)); }