ExperimentTracer::ExperimentTracer(vector<probe_set*> ps, vector<uint> expt, std::set<PathTracer*>* tracers, QMutex* mutex, float sm){ DataExtractor de; uint* expts = new uint[expt.size()]; for(uint i=0; i < expt.size(); i++){ expts[i] = expt[i]; } // ok life is a bit complicated as we have to transpose the resulting array of values which we are going to obtain. uint dimNo = 0; // this is actually going to be the same as the number of probe sets which we get to use.. float** values = new float*[expt.size()]; cout << "creating the values 2d array. expt size : " << expt.size() << endl; for(int i=0; i < expt.size(); i++){ values[i] = new float[ps.size()]; // ok.. hmmm } cout << "transposing values ps size : " << ps.size() << endl; for(uint i=0; i < ps.size(); i++){ cout << i ; ExData* data = de.globalNorm(ps[i], expts, expt.size(), 2, true); cout << "-"; if(!data->exptNo){ delete data; continue; } float* mean = data->mean(); // We are now at dimension number dimNo, so go through the different experiments (values) and copy the appropriate value for(uint j=0; j < expt.size(); j++){ //cout << "- " << j << " " << expts[j] << " -"; values[j][dimNo] = mean[j]; } cout << "| "; delete []mean; delete data; // this is a little expensive, but anyway, this is not important in the grand scheme of things. dimNo++; //cout << endl; } cout << endl; // ok the values have been set up.. we could do some normalisation on these before we hand over to the thingy, // but I think that I will leave it at this... // I would also suggest that in the future we provide some string with some information regarding what we are doing, so that it // can be retrieved from the data. .. but.. cout << "Making pathtracer .. " << endl; PathTracer* tracer = new PathTracer(values, expts, expt.size(), dimNo, tracers, mutex, sm); cout << "starting path tracer " << endl; tracer->start(); cout << "and going on with life as it were .. " << endl; /// and I leave off here, and see what happens when we change stuff for the better... or something like that... }