#include "nr.h" DP NR::amotry(Mat_IO_DP &p, Vec_O_DP &y, Vec_IO_DP &psum, DP funk(Vec_I_DP &), const int ihi, const DP fac) { int j; DP fac1,fac2,ytry; int ndim=p.ncols(); Vec_DP ptry(ndim); fac1=(1.0-fac)/ndim; fac2=fac1-fac; for (j=0;j