- Timestamp:
- 03/07/13 16:13:17 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/CMAES/HeuristicLab.Algorithms.CMAEvolutionStrategy/3.3/Terminator.cs
r9129 r9297 169 169 170 170 double minSqrtdiagC = int.MaxValue, maxSqrtdiagC = int.MinValue; 171 for (int i = 0; i < sp.C. Rows; i++) {171 for (int i = 0; i < sp.C.GetLength(0); i++) { 172 172 if (Math.Sqrt(sp.C[i, i]) < minSqrtdiagC) minSqrtdiagC = Math.Sqrt(sp.C[i, i]); 173 173 if (Math.Sqrt(sp.C[i, i]) > maxSqrtdiagC) maxSqrtdiagC = Math.Sqrt(sp.C[i, i]); … … 175 175 176 176 var tolx = MinimumStandardDeviationParameter.ActualValue.Value; 177 if (sp.Sigma .Value* maxSqrtdiagC < tolx178 && sp.Sigma .Value* sp.PC.Select(x => Math.Abs(x)).Max() < tolx) return terminateOp;177 if (sp.Sigma * maxSqrtdiagC < tolx 178 && sp.Sigma * sp.PC.Select(x => Math.Abs(x)).Max() < tolx) return terminateOp; 179 179 180 180 var stopTolUpXFactor = MaximumStandardDeviationChangeParameter.ActualValue.Value; 181 if (sp.Sigma .Value* maxSqrtdiagC > stopTolUpXFactor * InitialSigmaParameter.ActualValue.Max())181 if (sp.Sigma * maxSqrtdiagC > stopTolUpXFactor * InitialSigmaParameter.ActualValue.Max()) 182 182 return terminateOp; 183 183
Note: See TracChangeset
for help on using the changeset viewer.