]> git.treefish.org Git - phys/latlib.git/commitdiff
...
authorAlex Schmidt <alex@treefish.org>
Thu, 27 Jun 2013 14:46:49 +0000 (16:46 +0200)
committerAlex Schmidt <alex@treefish.org>
Thu, 27 Jun 2013 14:46:49 +0000 (16:46 +0200)
obstat.hpp

index 6818792fc765335c0bbfcd6405391ebeae7564a5..2824e6925e958df2f803381b383bdb2c57ef6cc0 100644 (file)
@@ -19,7 +19,7 @@ public:
 
   int computeJack(restype (*func)(vector< vector <meastype> > *vals, void *para), void *para=NULL);
   int computeJack(void (*preMeasFunc)(vector< vector <meastype> > *allVals, vector <meastype> *preCalculated, void *para), 
 
   int computeJack(restype (*func)(vector< vector <meastype> > *vals, void *para), void *para=NULL);
   int computeJack(void (*preMeasFunc)(vector< vector <meastype> > *allVals, vector <meastype> *preCalculated, void *para), 
-                 restype (*measFunc)(vector <meastype> *preCalculated, vector <meastype> *excludedmeas, void *para), void *para=NULL);
+                 restype (*measFunc)(vector <meastype> *preCalculated, vector <meastype> *excludedmeas, int nmeas, void *para), void *para=NULL);
 
   restype getMean(int compid) { return computations[compid].val; }
   restype getErr(int compid) { return computations[compid].err; }
 
   restype getMean(int compid) { return computations[compid].val; }
   restype getErr(int compid) { return computations[compid].err; }
@@ -121,7 +121,7 @@ int obstat<meastype,restype>::computeJack(restype (*func)(vector< vector<meastyp
 
 template <typename meastype, typename restype>
 int obstat<meastype,restype>::computeJack(void (*preMeasFunc)(vector< vector <meastype> > *allVals, vector<meastype> *preCalculated, void *para), 
 
 template <typename meastype, typename restype>
 int obstat<meastype,restype>::computeJack(void (*preMeasFunc)(vector< vector <meastype> > *allVals, vector<meastype> *preCalculated, void *para), 
-                                         restype (*measFunc)(vector<meastype> *preCalculated, vector<meastype> *excludedmeas, void *para), 
+                                         restype (*measFunc)(vector<meastype> *preCalculated, vector<meastype> *excludedmeas, int nmeas, void *para),
                                          void *para) {
   int nmeas=measurements.size();
   restype manymeans[nmeas];
                                          void *para) {
   int nmeas=measurements.size();
   restype manymeans[nmeas];
@@ -135,7 +135,7 @@ int obstat<meastype,restype>::computeJack(void (*preMeasFunc)(vector< vector <me
 
   int imeas=0;
   for(typename vector< vector<meastype> >::iterator removedIt = measurements.begin(); removedIt != measurements.end(); ++removedIt, imeas++) {
 
   int imeas=0;
   for(typename vector< vector<meastype> >::iterator removedIt = measurements.begin(); removedIt != measurements.end(); ++removedIt, imeas++) {
-    manymeans[imeas] = measFunc(&preCalculated, &(*removedIt), para);
+    manymeans[imeas] = measFunc(&preCalculated, &(*removedIt), measurements.size(), para);
     jackres.val += manymeans[imeas]; 
   }
   jackres.val /= nmeas;
     jackres.val += manymeans[imeas]; 
   }
   jackres.val /= nmeas;