Changeset 801
- Timestamp:
- 06/07/18 17:40:49 (7 years ago)
- Location:
- cpp/frams/genetics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/genooperators.cpp
r779 r801 223 223 } 224 224 225 int GenoOperators::getActiveNeuroClassCount() 226 { 227 int count = 0; 228 for (int i = 0; i < Neuro::getClassCount(); i++) 229 if (Neuro::getClass(i)->genactive) 230 count++; 231 return count; 232 } 233 225 234 NeuroClass* GenoOperators::getRandomNeuroClass() 226 235 { -
cpp/frams/genetics/genooperators.h
r779 r801 193 193 static void linearMix(vector<double> &p1, vector<double> &p2, double proportion); ///<mixes two real-valued vectors; inherited proportion should be within [0,1]; 1.0 does not change values (all inherited), 0.5 causes both vectors to become their average, 0.0 swaps values (none inherited). 194 194 static void linearMix(ParamInterface &p1, int i1, ParamInterface &p2, int i2, double proportion); ///<mixes i1'th and i2'th properties of p1 and p2; inherited proportion should be within [0,1]; 1.0 does not change values (all inherited), 0.5 causes both properties to become their average, 0.0 swaps values (none inherited). For integer properties applies random "dithering" when necessary. 195 static int getActiveNeuroClassCount(); ///<returns active class count 195 196 static NeuroClass* getRandomNeuroClass(); ///<returns random neuroclass or NULL when no active classes. 196 197 static NeuroClass* getRandomNeuroClassWithOutput(); ///<returns random neuroclass with output or NULL when no active classes.
Note: See TracChangeset
for help on using the changeset viewer.