Changeset 16842 for branches/2847_M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/DistanceBase.cs
- Timestamp:
- 04/19/19 11:05:52 (5 years ago)
- Location:
- branches/2847_M5Regression/HeuristicLab.Algorithms.DataAnalysis
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2847_M5Regression/HeuristicLab.Algorithms.DataAnalysis
- Property svn:mergeinfo changed
-
branches/2847_M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4
- Property svn:mergeinfo changed
-
branches/2847_M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/DistanceBase.cs
r16538 r16842 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 24 24 using HeuristicLab.Common; 25 25 using HeuristicLab.Core; 26 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;26 using HEAL.Attic; 27 27 28 28 namespace HeuristicLab.Algorithms.DataAnalysis { 29 [Storable Class]29 [StorableType("58D49402-2AB1-49CF-9AEF-1C599C4B71F7")] 30 30 public abstract class DistanceBase<T> : Item, IDistance<T> { 31 31 #region HLConstructors & Cloning 32 32 [StorableConstructor] 33 protected DistanceBase( bool deserializing) : base(deserializing) { }33 protected DistanceBase(StorableConstructorFlag _) : base(_) { } 34 34 protected DistanceBase(DistanceBase<T> original, Cloner cloner) : base(original, cloner) { } 35 35 protected DistanceBase() { } … … 43 43 44 44 public double Get(object x, object y) { 45 return Get((T) x, (T)y);45 return Get((T)x, (T)y); 46 46 } 47 47 48 48 public IComparer GetDistanceComparer(object item) { 49 return new DistanceComparer((T) 49 return new DistanceComparer((T)item, this); 50 50 } 51 51 52 [StorableType("35fcecb5-9209-469b-9e4e-82efd8abfddf")] 52 53 internal class DistanceComparer : IComparer<T>, IComparer { 54 [Storable] 53 55 private readonly T item; 56 [Storable] 54 57 private readonly IDistance<T> dist; 58 59 [StorableConstructor] 60 protected DistanceComparer(StorableConstructorFlag _) { 61 } 55 62 56 63 public DistanceComparer(T item, IDistance<T> dist) { … … 64 71 65 72 public int Compare(object x, object y) { 66 return Compare((T) x, (T)y);73 return Compare((T)x, (T)y); 67 74 } 68 75 }
Note: See TracChangeset
for help on using the changeset viewer.