From: Alex Schmidt Date: Wed, 11 Sep 2013 13:08:19 +0000 (+0200) Subject: dynamically allocating manymeans in jackknife methods to allow for large number of... X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/commitdiff_plain/2918744d037d9254538dd84311aa346576e0fe04?ds=sidebyside dynamically allocating manymeans in jackknife methods to allow for large number of measurements. --- diff --git a/obstat.hpp b/obstat.hpp index 2824e69..57a3431 100644 --- a/obstat.hpp +++ b/obstat.hpp @@ -87,7 +87,7 @@ template int obstat::computeJack(restype (*func)(vector< vector > *vals, void *para), void *para) { int nmeas=measurements.size(); - restype manymeans[nmeas]; + restype *manymeans = new restype[nmeas]; result jackres; jackres.val = 0; @@ -116,6 +116,8 @@ int obstat::computeJack(restype (*func)(vector< vector::computeJack(void (*preMeasFunc)(vector< vector *preCalculated, vector *excludedmeas, int nmeas, void *para), void *para) { int nmeas=measurements.size(); - restype manymeans[nmeas]; + restype *manymeans = new restype[nmeas]; result jackres; vector preCalculated; @@ -147,6 +149,8 @@ int obstat::computeJack(void (*preMeasFunc)(vector< vector