#include #include "nr.h" using namespace std; void NR::gauher(Vec_O_DP &x, Vec_O_DP &w) { const DP EPS=1.0e-14,PIM4=0.7511255444649425; const int MAXIT=10; int i,its,j,m; DP p1,p2,p3,pp,z,z1; int n=x.size(); m=(n+1)/2; for (i=0;i= MAXIT) nrerror("too many iterations in gauher"); x[i]=z; x[n-1-i] = -z; w[i]=2.0/(pp*pp); w[n-1-i]=w[i]; } }