+
+ return rangestring.str();
+}
+
+void paraq::addRange(const string& paraid, double min, double max, double step)
+{
+ double *newrange = new double[3];
+ newrange[0] = min;
+ newrange[1] = max;
+ newrange[2] = step;
+ rangeMap[paraid].push_back( newrange );
+
+ for( double paraval = min; paraval <= max+0.5*step; paraval += step+(step==0) )
+ if( ! inParas(paraMap[paraid], paraval) ) paraMap[paraid].push_back( paraval );
+
+ uniqueAllParaIdsAdd(paraid);
+}
+
+bool paraq::inParas( vector<double>& paraVec, double& tofind )
+{
+ for( vector<double>::iterator it = paraVec.begin(); it < paraVec.end(); ++it)
+ if( fabs(*it - tofind) < 0.0000000001 ) return true;
+ return false;
+}
+
+void paraq::initJobList()
+{
+ if( ! jobListInitialized ) {
+ map<string,double> jobZero;
+ jobList.push_back( jobZero );
+
+ for( map< string, vector< double > >::iterator paraIt = paraMap.begin(); paraIt != paraMap.end(); ++paraIt )
+ while( jobList.begin()->find(paraIt->first) == jobList.begin()->end() ) {
+ for( vector<double>::iterator valIt = paraIt->second.begin(); valIt != paraIt->second.end(); ++valIt ) {
+ jobList.push_back( *jobList.begin() );
+
+ jobList.back()[paraIt->first] = *valIt;
+
+ /* also set linked parameters */
+ for (vector< pair<string,string> >::iterator linkit = linkedParas.begin(); linkit != linkedParas.end(); ++linkit)
+ if (linkit->second == paraIt->first)
+ jobList.back()[linkit->first] = *valIt;
+ }
+ jobList.erase( jobList.begin() );
+ }
+ jobListInitialized = true;