Changeset 1298 for cpp/frams/genetics/fB
- Timestamp:
- 03/29/24 23:30:34 (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/fB/fB_oper.cpp
r1273 r1298 252 252 { 253 253 std::list<SString> tokenized = tokenizeSequence(line); 254 int rndid = rndUint( (int)tokenized.size()); // select random letter from genotype254 int rndid = rndUint(tokenized.size()); // select random letter from genotype 255 255 // increment/decrement character - when overflow happens, this method 256 256 // uses the "reflect" approach … … 291 291 std::list<SString> tokenized = tokenizeSequence(line); 292 292 std::list<SString>::iterator it = tokenized.begin(); 293 int rndid = rndUint( (int)tokenized.size()); // select random insertion point293 int rndid = rndUint(tokenized.size()); // select random insertion point 294 294 std::advance(it, rndid); 295 295 NeuroClass *cls = getRandomNeuroClass(Model::SHAPETYPE_BALL_AND_STICK); … … 312 312 chg = 1.0 / line.length(); 313 313 std::list<SString> tokenized = tokenizeSequence(line); 314 int rndid = rndUint( (int)tokenized.size()); // select random insertion point314 int rndid = rndUint(tokenized.size()); // select random insertion point 315 315 std::list<SString>::iterator it = tokenized.begin(); 316 316 std::advance(it, rndid); … … 326 326 std::list<SString> tokenized = tokenizeSequence(line); 327 327 std::list<SString>::iterator it = tokenized.begin(); 328 int rndid = rndUint( (int)tokenized.size()); // select random deletion point328 int rndid = rndUint(tokenized.size()); // select random deletion point 329 329 std::advance(it, rndid); 330 330 tokenized.erase(it); … … 348 348 for (int i = 0; i < 4; i++) 349 349 { 350 cuts[i] = rndUint( (int)tokenized.size());350 cuts[i] = rndUint(tokenized.size()); 351 351 } 352 352 std::sort(cuts.begin(), cuts.end());
Note: See TracChangeset
for help on using the changeset viewer.