#include #include "nr.h" using namespace std; void NR::frprmn(Vec_IO_DP &p, const DP ftol, int &iter, DP &fret, DP func(Vec_I_DP &), void dfunc(Vec_I_DP &, Vec_O_DP &)) { const int ITMAX=200; const DP EPS=1.0e-18; int j,its; DP gg,gam,fp,dgg; int n=p.size(); Vec_DP g(n),h(n),xi(n); fp=func(p); dfunc(p,xi); for (j=0;j