for( map< string, vector<double*> >::iterator paraIt = rangeMap.begin(); paraIt != rangeMap.end(); ++paraIt )
if( paraIt->second.size() > 0 )
for( vector<double*>::iterator rangeIt = paraIt->second.begin(); rangeIt != paraIt->second.end(); ++rangeIt)
- rangestring << "-" << paraIt->first << (*rangeIt)[0] << "_" << (*rangeIt)[1] << "_" << (*rangeIt)[2];
+ rangestring << "_" << paraIt->first << (*rangeIt)[0] << "-" << (*rangeIt)[1] << "-" << (*rangeIt)[2];
+ for (vector<paralink>::iterator linkit = linkedParas.begin(); linkit != linkedParas.end(); ++linkit)
+ rangestring << "_" << linkit->first << "--" << linkit->linktype << "--" << linkit->second;
+
for( map<string,double>::iterator defIt = defaultPara.begin(); defIt != defaultPara.end(); ++defIt )
- if( rangeMap.find(defIt->first) == rangeMap.end() )
- rangestring << "-" << defIt->first << defIt->second;
+ if( rangeMap.find(defIt->first) == rangeMap.end() ) {
+ bool linkedpara = false;
+
+ for (vector<paralink>::iterator linkit = linkedParas.begin(); linkit != linkedParas.end(); ++linkit)
+ if (linkit->first == defIt->first) {
+ linkedpara = true;
+ break;
+ }
+
+ if (!linkedpara)
+ rangestring << "_" << defIt->first << defIt->second;
+ }
return rangestring.str();
}
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<paralink>::iterator linkit = linkedParas.begin(); linkit != linkedParas.end(); ++linkit)
+ if (linkit->second == paraIt->first)
+ jobList.back()[linkit->first] = linkTypeFunction(*valIt, linkit->linktype);
}
jobList.erase( jobList.begin() );
}
}
}
+double paraq::linkTypeFunction (double linkval, int linktype) {
+ switch (linktype) {
+
+ case LINK_1TO1:
+ return linkval;
+
+ case LINK_NEGATIVE:
+ return -linkval;
+
+ }
+}
+
int paraq::nextParas()
{
if( thisjob == -1 ) {