Changeset 14330 for branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour
- Timestamp:
- 10/13/16 19:47:41 (8 years ago)
- Location:
- branches/symbreg-factors-2650
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/symbreg-factors-2650
- Property svn:mergeinfo changed
/trunk/sources merged: 14282,14284-14300,14307,14314-14316,14319,14322
- Property svn:mergeinfo changed
-
branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Algorithms.DataAnalysis merged: 14314-14316,14319,14322
- Property svn:mergeinfo changed
-
branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourModel.cs
r14239 r14330 36 36 public sealed class NearestNeighbourModel : ClassificationModel, INearestNeighbourModel { 37 37 38 private readonly 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.