本文整理汇总了C++中DataExtractor::globalNorm方法的典型用法代码示例。如果您正苦于以下问题:C++ DataExtractor::globalNorm方法的具体用法?C++ DataExtractor::globalNorm怎么用?C++ DataExtractor::globalNorm使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataExtractor
的用法示例。
在下文中一共展示了DataExtractor::globalNorm方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PathTracer
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...
}