Changeset 1130 for cpp/frams/genetics/fS/fS_oper.cpp
- Timestamp:
- 04/16/21 15:55:34 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/fS/fS_oper.cpp
r1056 r1130 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 2019-202 0Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 2019-2021 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 7 7 #include "fS_oper.h" 8 8 #include "frams/util/rndutil.h" 9 #include <algorithm> 9 10 10 11 #define FIELDSTRUCT GenoOper_fS … … 362 363 { 363 364 // Remove the selected child 364 s wap(randomNode->children[selectedIndex], randomNode->children[childCount - 1]);365 std::swap(randomNode->children[selectedIndex], randomNode->children[childCount - 1]); 365 366 randomNode->children.pop_back(); 366 367 randomNode->children.shrink_to_fit(); … … 586 587 fS_Neuron *it = randomNode->neurons[rndUint(size)]; 587 588 geno.rearrangeNeuronConnections(it, SHIFT::LEFT); // Important to rearrange the neurons before deleting 588 s wap(it, randomNode->neurons.back());589 std::swap(it, randomNode->neurons.back()); 589 590 randomNode->neurons.pop_back(); 590 591 randomNode->neurons.shrink_to_fit();
Note: See TracChangeset
for help on using the changeset viewer.