Changeset 12970 for branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking
- Timestamp:
- 09/25/15 19:25:30 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SchemaDiversification/SchemaEvaluator.cs
r12966 r12970 190 190 } 191 191 192 if (matchingIndividuals.Count < MinimumSchemaFrequency.Value * individuals.Count) {192 if (matchingIndividuals.Count < (int)Math.Max(2, Math.Round(MinimumSchemaFrequency.Value * individuals.Count))) { 193 193 ChangedTreesParameter.ActualValue = new IntValue(0); 194 194 return base.Apply(); … … 202 202 203 203 var oc = new OperationCollection(); 204 int n = (int)Math. Round(matchingIndividuals.Count * ReplacementRatio.Value);204 int n = (int)Math.Floor(matchingIndividuals.Count * ReplacementRatio.Value); 205 205 var individualsToReplace = RandomReplacement.Value ? matchingIndividuals.SampleRandomWithoutRepetition(random, n).ToList() 206 206 : matchingIndividuals.OrderBy(x => (DoubleValue)x.Variables["Quality"].Value).Take(n).ToList();
Note: See TracChangeset
for help on using the changeset viewer.