From 2918744d037d9254538dd84311aa346576e0fe04 Mon Sep 17 00:00:00 2001 From: Alex Schmidt Date: Wed, 11 Sep 2013 15:08:19 +0200 Subject: [PATCH] dynamically allocating manymeans in jackknife methods to allow for large number of measurements. --- obstat.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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