- Timestamp:
- 07/15/17 10:29:40 (7 years ago)
- Location:
- stable
- Files:
-
- 3 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 14862-14863,14911,14936,15156-15158,15164,15169,15207-15209,15225,15227,15234,15248
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Algorithms.DataAnalysis
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Algorithms.DataAnalysis merged: 14862-14863,14911,14936,15156-15158,15164,15169,15207-15209,15225,15227,15234,15248
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/DistanceBase.cs
r14767 r15249 20 20 #endregion 21 21 22 using System.Collections; 22 23 using System.Collections.Generic; 23 24 using HeuristicLab.Common; … … 29 30 public abstract class DistanceBase<T> : Item, IDistance<T> { 30 31 31 #region HLConstructors & Boilerplate32 #region HLConstructors & Cloning 32 33 [StorableConstructor] 33 34 protected DistanceBase(bool deserializing) : base(deserializing) { } … … 42 43 } 43 44 44 private class DistanceComparer : IComparer<T> { 45 public double Get(object x, object y) { 46 return Get((T)x, (T)y); 47 } 48 49 public IComparer GetDistanceComparer(object item) { 50 return new DistanceComparer((T)item, this); 51 } 52 53 private class DistanceComparer : IComparer<T>, IComparer { 45 54 private readonly T item; 46 55 private readonly IDistance<T> dist; … … 54 63 return dist.Get(x, item).CompareTo(dist.Get(y, item)); 55 64 } 65 66 public int Compare(object x, object y) { 67 return Compare((T)x, (T)y); 68 } 56 69 } 57 70 }
Note: See TracChangeset
for help on using the changeset viewer.