Changeset 14314 for trunk/sources/HeuristicLab.Algorithms.DataAnalysis
- Timestamp:
- 09/29/16 10:28:26 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourModel.cs
r14236 r14314 36 36 public sealed class NearestNeighbourModel : ClassificationModel, INearestNeighbourModel { 37 37 38 private object kdTreeLockObject = new object(); 38 39 private alglib.nearestneighbor.kdtree kdTree; 39 40 public alglib.nearestneighbor.kdtree KDTree { … … 47 48 } 48 49 } 50 49 51 50 52 public override IEnumerable<string> VariablesUsedForPrediction { … … 201 203 } 202 204 int numNeighbours; 203 lock (kdTree ) { // gkronber: the following calls change the kdTree data structure205 lock (kdTreeLockObject) { // gkronber: the following calls change the kdTree data structure 204 206 numNeighbours = alglib.nearestneighbor.kdtreequeryknn(kdTree, x, k, false); 205 207 alglib.nearestneighbor.kdtreequeryresultsdistances(kdTree, ref dists); … … 237 239 } 238 240 int numNeighbours; 239 lock (kdTree ) {241 lock (kdTreeLockObject) { 240 242 // gkronber: the following calls change the kdTree data structure 241 243 numNeighbours = alglib.nearestneighbor.kdtreequeryknn(kdTree, x, k, false);
Note: See TracChangeset
for help on using the changeset viewer.