Changeset 1313 for cpp/frams/genetics/f4/f4_general.cpp
- Timestamp:
- 07/11/24 17:15:51 (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/f4/f4_general.cpp
r1259 r1313 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-202 3Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2024 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 1414 1414 char *ptr = (char*)(genot + pos_inout); 1415 1415 string original = ""; 1416 while (GenoOperators::strchr n0(all_modifiers_no_comma, *ptr)) //only processes a section of chars known in all_modifiers_no_comma, other characters will exit the loop1416 while (GenoOperators::strchr_no0(all_modifiers_no_comma, *ptr)) //only processes a section of chars known in all_modifiers_no_comma, other characters will exit the loop 1417 1417 { 1418 1418 original += *ptr; … … 1422 1422 if (advanced > 0) //found modifiers 1423 1423 { 1424 string simplified = GenoOperators::simplifiedModifiers(original );1424 string simplified = GenoOperators::simplifiedModifiers(original, F14_MODIFIERS_COLOR); 1425 1425 // add a node for each char in "simplified" 1426 1426 for (size_t i = 0; i < simplified.length(); i++) 1427 1427 { 1428 int pos = GenoOperators::strchr n0(genot + pos_inout, simplified[i]) - genot; //unnecessarily finding the same char, if it occurrs multiple times in simplified1428 int pos = GenoOperators::strchr_no0(genot + pos_inout, simplified[i]) - genot; //unnecessarily finding the same char, if it occurrs multiple times in simplified 1429 1429 f4_Node *node = new f4_Node(simplified[i], par, pos); //location is approximate. In the simplification process we don't trace where the origin(s) of the simplified[i] gene were. We provide 'pos' as the first occurrence of simplified[i] (for example, all 'L' will have the same location assigned, but at least this is where 'L' occurred in the genotype, so in case of any modification of a node (repair, removal, whatever... even mapping of genes) the indicated gene will be one of the responsible ones) 1430 1430 par = node;
Note: See TracChangeset
for help on using the changeset viewer.