Changeset 5337 for branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Operators/Crossovers
- Timestamp:
- 01/20/11 01:30:44 (14 years ago)
- Location:
- branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Operators/Crossovers
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Operators/Crossovers/AverageDoubleValueCrossover.cs
r5277 r5337 34 34 public static void ApplyStatic(IRandom random, DoubleValue value, DoubleValue other, DoubleValueRange range) { 35 35 value.Value = (value.Value + other.Value) / 2; 36 range.ApplyStepSize(value);36 value.Value = range.ApplyStepSize(value.Value); 37 37 } 38 38 } -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Operators/Crossovers/NormalDoubleValueCrossover.cs
r5293 r5337 39 39 do { 40 40 offspring.Value = N.NextDouble(); 41 range.ApplyStepSize(offspring);41 offspring.Value = range.ApplyStepSize(offspring.Value); 42 42 } while (!range.IsInRange(offspring.Value)); 43 43 return offspring; -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Operators/Crossovers/NormalIntValueCrossover.cs
r5293 r5337 38 38 do { 39 39 offspring.Value = (int)N.NextDouble(); 40 range.ApplyStepSize(offspring);40 offspring.Value = range.ApplyStepSize(offspring.Value); 41 41 } while (!range.IsInRange(offspring.Value)); 42 42 return offspring;
Note: See TracChangeset
for help on using the changeset viewer.