#include #include "nr.h" using namespace std; void NR::sprstm(Vec_I_DP &sa, Vec_I_INT &ija, Vec_I_DP &sb, Vec_I_INT &ijb, const DP thresh, Vec_O_DP &sc, Vec_O_INT &ijc) { int i,ijma,ijmb,j,k,ma,mb,mbb; DP sum; if (ija[0] != ijb[0]) nrerror("sprstm: sizes do not match"); int nmax=sc.size(); ijc[0]=k=ija[0]; for (i=0;i thresh) { if (k > nmax-1) nrerror("sprstm: sc and ijc too small"); sc[k]=sum; ijc[k++]=j; } } ijc[i+1]=k; } }