Changeset 1216 for cpp/frams/genetics
- Timestamp:
- 04/17/23 00:05:48 (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/f9/f9_oper.cpp
r1167 r1216 34 34 size_t i; 35 35 for (i = 0; i < strlen(gene); i++) if (!strchr(turtle_commands_f9, gene[i])) { ok = false; break; } 36 return ok ? GENOPER_OK : i + 1;36 return ok ? GENOPER_OK : int(i) + 1; 37 37 } 38 38 … … 85 85 { 86 86 method = 0; 87 int changes = 0, len = strlen(gene);87 int changes = 0, len = (int)strlen(gene); 88 88 89 89 if (mut_prob > 0) … … 123 123 int GenoOper_f9::crossOver(char *&g1, char *&g2, float& chg1, float& chg2) 124 124 { 125 int len1 = strlen(g1), len2 =strlen(g2);125 int len1 = (int)strlen(g1), len2 = (int)strlen(g2); 126 126 int p1 = rndUint(len1); //random cut point for first genotype 127 127 int p2 = rndUint(len2); //random cut point for second genotype
Note: See TracChangeset
for help on using the changeset viewer.