Changeset 896 for cpp/frams/genetics/fT
- Timestamp:
- 11/30/19 01:30:22 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/fT/fTest_oper.cpp
r779 r896 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-201 5Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2019 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 88 88 int changes = 0, len = strlen(geno); 89 89 for (int i = 0; i < len; i++) 90 if (rnd 01< prob) //normalize prob with length of genotype90 if (rndDouble(1) < prob) //normalize prob with length of genotype 91 91 { 92 geno[i] = a[r andomN(4)];92 geno[i] = a[rndUint(4)]; 93 93 changes++; 94 94 } … … 101 101 { 102 102 int len1 = strlen(g1), len2 = strlen(g2); 103 int p1 = r andomN(len1); //random cut point for first genotype104 int p2 = r andomN(len2); //random cut point for second genotype103 int p1 = rndUint(len1); //random cut point for first genotype 104 int p2 = rndUint(len2); //random cut point for second genotype 105 105 char *child1 = (char*)malloc(p1 + len2 - p2 + 1); 106 106 char *child2 = (char*)malloc(p2 + len1 - p1 + 1);
Note: See TracChangeset
for help on using the changeset viewer.