diff options
Diffstat (limited to 'Temparray.h')
-rw-r--r-- | Temparray.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/Temparray.h b/Temparray.h index 409b780..19040a2 100644 --- a/Temparray.h +++ b/Temparray.h @@ -31,12 +31,15 @@ class Temparray private: float *temparrayold, *temparraynew; Cubehole *cubearray; - int sx, sy, sz; + int sx, sy, sz, *weight1, maxweight; float averagetemp, earthtemp, probetemp, input, inputpower, factor; Cubehole& cubehole(int x, int y, int z, int line) { return cubearray[x*sy*sz*6 + y*sz*6 + z*6 + line]; } + int& weight(int x, int y, int z){ + return weight1[x*sy*sz + y*sz + z]; + } void mergetemperature(){ for(int i=0; i<sx; i++){ for(int j=0; j<sy; j++){ @@ -77,6 +80,18 @@ class Temparray averagetemp = tempcache/times; // std::cerr << averagetemp << std::endl; } + void calcweight(); + int howmanyweights(int weight0) { + int counter = 0; + for(int i=0; i<sx; ++i){ + for(int j=0; j<sy; ++j){ + for(int k=0; k<sz; ++k){ + if(weight(i, j, k) == weight0) ++counter; + } + } + } + return counter; + } }; #endif /* _TEMPARRAY_H_ */ |