Changeset 14612
- Timestamp:
- 01/26/17 14:31:45 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/MOCMASEvolutionStrategy.cs
r14577 r14612 328 328 #region Initialization 329 329 private MOCMAESIndividual InitializeIndividual(RealVector x) { 330 var zeros = new RealVector( x.Length);330 var zeros = new RealVector(Enumerable.Range(0, Problem.Encoding.Length).Select(i => (Problem.Encoding.Bounds[i, 1] + Problem.Encoding.Bounds[i, 0]) / 2).ToArray()); 331 331 var identity = new double[x.Length, x.Length]; 332 for (var i = 0; i < x.Length; i++) identity[i, i] = 1;332 for (var i = 0; i < x.Length; i++) identity[i, i] = (Problem.Encoding.Bounds[i % Problem.Encoding.Bounds.Rows, 1] - Problem.Encoding.Bounds[i % Problem.Encoding.Bounds.Rows, 0]); 333 333 return new MOCMAESIndividual(x, internals.TargetSuccessProbability, InitialSigma, zeros, identity, internals); 334 334 }
Note: See TracChangeset
for help on using the changeset viewer.