Changeset 1316 for cpp/frams/genetics
- Timestamp:
- 07/11/24 17:38:44 (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/genman.cpp
r1273 r1316 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-202 0Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2024 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 370 370 } 371 371 372 float chg; 372 float chg; //fraction of parent1 genes in the child 373 373 bool ok = false; 374 374 int pcount = count; … … 385 385 if (g1n[0] && g2n[0]) if (rndUint(2) == 0) g1n[0] = 0; else g2n[0] = 0; //both provided? we want only one 386 386 if (g1n[0]) { gn = g1n; chg = chg1; } 387 else { gn = g2n; chg = chg2; }387 else { gn = g2n; chg = 1 - chg2; } 388 388 LoggerToMemory eh(LoggerBase::Enable | LoggerToMemory::StoreFirstMessage); //mute testValidity() 389 389 Geno G(gn, g1v.getFormat(), "", "");
Note: See TracChangeset
for help on using the changeset viewer.