#include #include #include #define NRANSI #include "nrutil.h" #define ITMAX 900 #define EPS 1.0e-10 #define FREEALL free_nrvector(xi,0,n-1);free_nrvector(h,0,n-1);free_nrvector(g,0,n-1); void frprmn(float p[], int n, float ftol, int *iter, float *fret, float (*func)(float []), void (*dfunc)(float [], float [])) { void linmin(float p[], float xi[], int n, float *fret, float (*func)(float [])); int j,its; float gg,gam,fp,dgg; float *g,*h,*xi; // Debug //cout << "frprmn 0 : p="; //for(int i=0;i