Changeset 9297 for branches/CMAES/HeuristicLab.Algorithms.CMAEvolutionStrategy/3.3/CMAOperators/CMAInitializer.cs
- Timestamp:
- 03/07/13 16:13:17 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/CMAES/HeuristicLab.Algorithms.CMAEvolutionStrategy/3.3/CMAOperators/CMAInitializer.cs
r9129 r9297 104 104 105 105 var sp = new CMAParameters(); 106 sp.Mu = mu == null ? new IntValue((int)Math.Floor(lambda / 2.0)) : new IntValue(mu.Value);106 sp.Mu = mu == null ? (int)Math.Floor(lambda / 2.0) : mu.Value; 107 107 sp.QualityHistorySize = 10 + 30 * N / lambda; 108 108 sp.QualityHistory = new Queue<double>(sp.QualityHistorySize + 1); … … 169 169 170 170 double maxD = D.Max(), minD = D.Min(); 171 if (minD == 0) sp.AxisRatio = new DoubleValue(double.PositiveInfinity); 172 else sp.AxisRatio = new DoubleValue(maxD / minD); 173 sp.PC = new DoubleArray(pc); 174 sp.PS = new DoubleArray(ps); 175 sp.B = new DoubleMatrix(B); 176 sp.D = new DoubleArray(D); 177 sp.C = new DoubleMatrix(C); 178 sp.BDz = new DoubleArray(BDz); 179 sp.Sigma = new DoubleValue(sigma); 180 if (sigmaBounds != null) sp.SigmaBounds = (DoubleMatrix)sigmaBounds.Clone(); 181 sp.InitialIterations = new IntValue(initialIterations.Value); 171 if (minD == 0) sp.AxisRatio = double.PositiveInfinity; 172 else sp.AxisRatio = maxD / minD; 173 sp.PC = pc; 174 sp.PS = ps; 175 sp.B = B; 176 sp.D = D; 177 sp.C = C; 178 sp.BDz = BDz; 179 sp.Sigma = sigma; 180 if (sigmaBounds != null) { 181 sp.SigmaBounds = new double[sigmaBounds.Rows, sigmaBounds.Columns]; 182 for (int i = 0; i < sigmaBounds.Rows; i++) 183 for (int j = 0; j < sigmaBounds.Columns; j++) 184 sp.SigmaBounds[i, j] = sigmaBounds[i, j]; 185 } 186 sp.InitialIterations = initialIterations.Value; 182 187 183 188 StrategyParametersParameter.ActualValue = sp;
Note: See TracChangeset
for help on using the changeset viewer.