Changeset 514
- Timestamp:
- 05/23/16 13:53:25 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/f1/conv_f1.cpp
r375 r514 431 431 if (isdigit(begin[0]) || (begin[0]=='-')) 432 432 { 433 double weight= atof(colon+1);434 int relative=atoi(begin);433 double weight=ExtValue::getDouble(trim(SString(colon+1,end-(colon+1))).c_str()); 434 paInt relative=ExtValue::getInt(trim(SString(begin,colon-begin)).c_str(),false); 435 435 int this_refno=neuro_f1_to_f0.size()-1; 436 436 addOrRememberInput(this_refno,this_refno+relative,weight); … … 452 452 else if (cls->getPreferredLocation()==1) receptor->attachToPart(getLastPart()); 453 453 } 454 last_f1_neuro->addInput(receptor, atof(colon+1));454 last_f1_neuro->addInput(receptor,ExtValue::getDouble(trim(SString(colon+1,end-(colon+1))).c_str())); 455 455 if (usemapping) receptor->addMapping(*makeRange(begin,end-1)); 456 456 } … … 458 458 { 459 459 Neuro *out=model.addNewNeuro(); 460 out->addInput(last_f1_neuro, atof(colon+1));460 out->addInput(last_f1_neuro,ExtValue::getDouble(trim(SString(colon+1,end-(colon+1))).c_str())); 461 461 out->setClassName(SString(begin+1,end-colon-1)); 462 462 if (begin[1]=='@') … … 478 478 if (usemapping) out->addMapping(*makeRange(begin,end-1)); 479 479 } 480 else if (*begin=='!') addClassParam("fo", atof(colon+1));481 else if (*begin=='=') addClassParam("in", atof(colon+1));482 else if (*begin=='/') addClassParam("si", atof(colon+1));480 else if (*begin=='!') addClassParam("fo",ExtValue::getDouble(trim(SString(colon+1,end-(colon+1))).c_str())); 481 else if (*begin=='=') addClassParam("in",ExtValue::getDouble(trim(SString(colon+1,end-(colon+1))).c_str())); 482 else if (*begin=='/') addClassParam("si",ExtValue::getDouble(trim(SString(colon+1,end-(colon+1))).c_str())); 483 483 else if (islower(begin[0])) 484 484 {
Note: See TracChangeset
for help on using the changeset viewer.