- Timestamp:
- 11/18/15 11:56:07 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/GaussianProcessCovarianceOptimizationProblem.cs
r13234 r13242 192 192 } 193 193 194 private readonly object syncRoot = new object(); 194 195 // Does not produce the same result for the same seed when using parallel engine (see below)! 195 196 public override double Evaluate(ISymbolicExpressionTree tree, IRandom random) { … … 223 224 // Evaluate might be called concurrently therefore access to random has to be synchronized. 224 225 // However, results of multiple runs with the same seed will be different when using the parallel engine. 225 lock ( random) {226 lock (syncRoot) { 226 227 for (int i = 0; i < covarianceFunction.GetNumberOfParameters(nVars); i++) { 227 228 hyperParameters[1 + i] = random.NextDouble() * 2.0 - 1.0;
Note: See TracChangeset
for help on using the changeset viewer.