Changeset 551
- Timestamp:
- 07/30/16 03:19:31 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/preconfigured.h
r348 r551 24 24 { 25 25 gcm.addDefaultConverters(); //without converters, the application would only handle "format 0" genotypes 26 Geno::useConverters(&gcm); 27 28 Geno::useValidators(&validators); 26 if (Geno::useConverters(&gcm)!=NULL) 27 logPrintf("PreconfiguredGenetics", "init", LOG_WARN, "Geno converters already configured"); //someone is using multiple PreconfiguredGenetics objects? (or other potentially unsafe configuration) 28 if (Geno::useValidators(&validators)!=NULL) 29 logPrintf("PreconfiguredGenetics", "init", LOG_WARN, "Geno validators already configured"); 29 30 validators+=&genman; //primary validation: use the extended validity checking (through dedicated genetic operators) 30 31 validators+=&model_validator; //secondary validation: this simple validator handles all cases when there is no dedicated genetic validation operator, but a converter for a particular format is available. Converters may be less strict in detecting invalid genotypes but using them and checking whether they produced a valid f0 genotype is also some way to tell whether the initial genotype was valid. Otherwise, without dedicated genetic validation operator, we would have no validity check at all. 32 } 33 34 ~PreconfiguredGenetics() 35 { 36 Geno::useConverters(NULL); 37 Geno::useValidators(NULL); 31 38 } 32 39 };
Note: See TracChangeset
for help on using the changeset viewer.