30 if(
contains(p.name(), p.selection()) ) {
31 TCS_EXCEPTION(
"ParameterSpace: parameter '" << p.name() <<
"|" << p.selection() <<
32 "' exists already in parameter space of '" <<
algName() <<
"' and can't be added");
51 bool foundParameter =
false;
57 ( !pa.isExtended() && pa.name()==p.name() ) ||
58 ( pa.isExtended() && pa.name()==p.name() && pa.selection()==p.selection() );
60 if(! foundParameter)
continue;
62 if( pa.isExtended() ) {
63 pa.setValue(p.value());
64 pa.setPosition(p.position());
65 pa.setSelection(p.selection());
66 pa.setIsExtended(
true);
68 pa.setValue(p.value());
69 pa.setIsExtended(
false);
71 pa.setIsDefault(
false);
75 if( ! foundParameter ) {
76 cout <<
"Parameter '" << p.name() <<
"' not found for algorithm " <<
algName()
77 <<
" and can't be set. Available parameters are" << endl;
80 cout <<
" " << pa.name() <<
" " << (pa.isExtended()?
"array":
"single") << endl;
82 TCS_EXCEPTION(
"Parameter '" << p.name() <<
"' not found for algorithm " <<
algName() <<
" and can't be set." );
94 if( (pa.name() == parameterName) && (pa.selection() ==
selection) )
return true;
103 if( pa.isExtended() )
continue;
104 if( pa.name() == parameterName )
108 TCS_EXCEPTION(
"Single parameter " << parameterName <<
" not found for algorithm " <<
algName());
116 if( ! pa.isExtended() )
continue;
117 if( (pa.name() == parameterName) && (pa.selection() ==
selection) )
131 if( ps.isInitialized()) {
132 o <<
" parameters: " << ps().size();
134 o << endl <<
" " << parameter;
#define TCS_EXCEPTION(MSG)
const Parameter & parameter(const std::string ¶meterName) const
bool contains(const std::string ¶meterName, unsigned int selection) const
ParameterSpace & setParameter(const Parameter &p)
const std::string & algName() const
ParameterSpace & addParameter(const Parameter &p)
const std::string selection
std::ostream & operator<<(std::ostream &os, const TCS::Bin &bin)