- Timestamp:
- 05/03/17 09:20:21 (8 years ago)
- Location:
- trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4
- Files:
-
- 3 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/HeuristicLab.Algorithms.DataAnalysis-3.4.csproj
r14862 r14911 240 240 <Compile Include="Interfaces\ISupportVectorMachineSolution.cs" /> 241 241 <Compile Include="Interfaces\IDataAnalysisAlgorithm.cs" /> 242 <Compile Include="KernelRidgeRegression\KernelFunctions\CicularKernel.cs" /> 243 <Compile Include="KernelRidgeRegression\KernelFunctions\GaussianKernel.cs" /> 244 <Compile Include="KernelRidgeRegression\KernelFunctions\IKernel.cs" /> 245 <Compile Include="KernelRidgeRegression\KernelFunctions\InverseMultiquadraticKernel.cs" /> 246 <Compile Include="KernelRidgeRegression\KernelFunctions\KernelBase.cs" /> 247 <Compile Include="KernelRidgeRegression\KernelFunctions\MultiquadraticKernel.cs" /> 248 <Compile Include="KernelRidgeRegression\KernelFunctions\PolysplineKernel.cs" /> 249 <Compile Include="KernelRidgeRegression\KernelFunctions\ThinPlatePolysplineKernel.cs" /> 250 <Compile Include="KernelRidgeRegression\KernelRidgeRegression.cs" /> 251 <Compile Include="KernelRidgeRegression\KernelRidgeRegressionModel.cs" /> 242 252 <Compile Include="kMeans\KMeansClustering.cs" /> 243 253 <Compile Include="kMeans\KMeansClusteringModel.cs" /> … … 325 335 <Compile Include="TSNE\Distances\IndexedItemDistance.cs" /> 326 336 <Compile Include="TSNE\Distances\InnerProductDistance.cs" /> 337 <Compile Include="TSNE\Distances\ManhattanDistance.cs" /> 327 338 <Compile Include="TSNE\Interfaces\IDistance.cs" /> 328 339 <Compile Include="TSNE\Interfaces\ISpacePartitioningTree.cs" /> -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/DistanceBase.cs
r14767 r14911 20 20 #endregion 21 21 22 using System.Collections; 22 23 using System.Collections.Generic; 23 24 using HeuristicLab.Common; … … 42 43 } 43 44 44 private class DistanceComparer : IComparer<T> { 45 46 public double Get(object x, object y) { 47 return Get((T)x, (T)y); 48 } 49 50 public IComparer GetDistanceComparer(object item) { 51 return new DistanceComparer((T)item, this); 52 } 53 54 private class DistanceComparer : IComparer<T>, IComparer { 45 55 private readonly T item; 46 56 private readonly IDistance<T> dist; … … 54 64 return dist.Get(x, item).CompareTo(dist.Get(y, item)); 55 65 } 66 67 public int Compare(object x, object y) { 68 return Compare((T)x, (T)y); 69 } 56 70 } 57 71 } -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Interfaces/IDistance.cs
r14767 r14911 20 20 #endregion 21 21 22 using System.Collections; 22 23 using System.Collections.Generic; 23 24 using HeuristicLab.Core; 24 25 25 26 namespace HeuristicLab.Algorithms.DataAnalysis { 26 public interface IDistance<in T> : IItem {27 public interface IDistance<in T> : IItem, IDistance { 27 28 /// <summary> 28 29 /// Calculates a distance measure between two objects. … … 41 42 IComparer<T> GetDistanceComparer(T item); 42 43 } 44 45 46 public interface IDistance : IItem { 47 double Get(object x, object y); 48 IComparer GetDistanceComparer(object item); 49 } 43 50 }
Note: See TracChangeset
for help on using the changeset viewer.