32 const std::map<std::string, std::string>& parameters) :
64 int size_family = int(
getDouble(keyPrefix +
"_SIZE_FAMILY", 1));
67 std::ostringstream str;
68 str << keyPrefix <<
"\n" <<
"size fam" << size_family;
72 std::vector< std::map <std::string, std::string > > sliced_maps;
74 for (
int i = 0; i < size_family; i++) {
75 sliced_maps.push_back(std::map<std::string, std::string>());
84 for (
int token_counter = 0; token_counter < size_family; ++token_counter) {
85 if (token_counter >= (
int)tokens.size()) {
86 std::ostringstream errorMessage;
87 errorMessage <<
"Error in " << key <<
": not enough tokens.";
92 std::ostringstream str;
93 str <<
"found token " << tokens[token_counter] <<
" position " << token_counter;
96 sliced_maps[token_counter][key] = tokens[token_counter];
100 for (
int i = 0; i < size_family; i++) {
101 std::map<std::string, std::string>& ref_map = sliced_maps[i];
117 double best_stimulus = -1;
118 for (std::vector<MSSOTLPolicy5DStimulus*>::const_iterator it =
family.begin(); it !=
family.end(); it++) {
119 double temp_stimulus = (*it)->computeDesirability(vehInMeasure, vehOutMeasure, vehInDispersionMeasure, vehOutDispersionMeasure);
121 std::ostringstream str;
122 str <<
"STIMULUS: " << temp_stimulus;
125 if (temp_stimulus > best_stimulus) {
126 best_stimulus = temp_stimulus;
131 std::ostringstream str;
132 str <<
"BEST STIMULUS: " << best_stimulus;
135 return best_stimulus;
145 std::ostringstream ot;
146 for (
int i = 0; i < (int)
family.size(); i++) {
147 ot <<
" gaussian " << i <<
":" <<
family[i]->getMessage();