- for(vector< vector<int> >::iterator measIt = meas->begin(); measIt != meas->end(); ++measIt)
- computations[compid].val += (*measIt)[ival];
- computations[compid].val /= nmeas;
-
- for(vector< vector<int> >::iterator measIt = meas->begin(); measIt != meas->end(); ++measIt)
- computations[compid].err += pow( (*measIt)[ival] - computations[compid].val, 2 );
- computations[compid].err = sqrt( computations[compid].err ) / nmeas;
-}
-
-template <typename obstype>
-void obstat<obstype>::computeJack(const string& compid, double (*func)(vector< vector<obstype> > *vals, void *para), void *para)
+ return computations.size()-1;
+}
+
+template <typename meastype, typename restype>
+int obstat<meastype,restype>::computeJack(restype (*func)(vector< vector<meastype> > *vals, void *para), void *para)