struct my_f_params {int a; int b;}; gsl_function F1; struct my_f_params alpha = {2,2}; F1.function = &f1; F1.params = & alpha; struct my_f_params * params = (struct my_f_params *)p; int n = (params->a); int m = (params->b); ---------- double params[] = { y, z }; F.params = params; double y = ((double *)params)[0]; double z = *((double *)p+1);
No comments:
Post a Comment