9 paraq::paraq(int _nprocs, const int _rank)
17 void paraq::addRange(const string& paraid, double min, double max, double step)
19 for( double paraval = min; paraval <= max+0.5*step; paraval += step+(step==0) )
20 if( ! inParas(paraMap[paraid], paraval) ) paraMap[paraid].push_back( paraval );
23 bool paraq::inParas( vector<double>& paraVec, double& tofind )
25 for( vector<double>::iterator it = paraVec.begin(); it < paraVec.end(); ++it)
26 if( fabs(*it - tofind) < 0.0000000001 ) return true;
30 int paraq::nextParas()
33 map<string,double> jobZero;
34 jobList.push_back( jobZero );
36 for( map< string, vector< double > >::iterator paraIt = paraMap.begin(); paraIt != paraMap.end(); ++paraIt )
37 while( jobList.begin()->find(paraIt->first) == jobList.begin()->end() ) {
38 for( vector<double>::iterator valIt = paraIt->second.begin(); valIt != paraIt->second.end(); ++valIt ) {
39 jobList.push_back( *jobList.begin() );
40 jobList.back()[paraIt->first] = *valIt;
42 jobList.erase( jobList.begin() );
50 if( thisjob < jobList.size() ) return 1;
55 double& paraq::operator[] (string paraid) {
56 if( jobList[thisjob].find(paraid) != jobList[thisjob].end() ) {
57 return jobList[thisjob][paraid];
60 if( defaultPara.find(paraid) != defaultPara.end() ) {
61 return defaultPara[paraid];