- Timestamp:
- 07/07/19 23:40:10 (6 years ago)
- Location:
- stable
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
-
stable/HeuristicLab.Algorithms.DataAnalysis
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Algorithms.DataAnalysis/3.4
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/CosineDistance.cs
r15584 r17097 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 { … … 30 30 /// The angular distance as defined as a normalized distance measure dependent on the angle between two vectors. 31 31 /// </summary> 32 [Storable Class]32 [StorableType("C87DE522-CB6D-485B-B2F7-6FE79B4E4DC6")] 33 33 [Item("CosineDistance", "The angular distance as defined as a normalized distance measure dependent on the angle between two vectors.")] 34 34 public class CosineDistance : DistanceBase<IEnumerable<double>> { 35 35 #region HLConstructors & Cloning 36 36 [StorableConstructor] 37 protected CosineDistance( bool deserializing) : base(deserializing) { }37 protected CosineDistance(StorableConstructorFlag _) : base(_) { } 38 38 protected CosineDistance(CosineDistance original, Cloner cloner) 39 39 : base(original, cloner) { } -
stable/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/DistanceBase.cs
r15584 r17097 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 } -
stable/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/EuclideanDistance.cs
r15584 r17097 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. … … 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq;25 24 using HeuristicLab.Common; 26 25 using HeuristicLab.Core; 27 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;26 using HEAL.Attic; 28 27 29 28 namespace HeuristicLab.Algorithms.DataAnalysis { 30 [Storable Class]29 [StorableType("1D3FE1D5-E524-4DEC-B845-34C940F5BA61")] 31 30 [Item("EuclideanDistance", "A norm function that uses Euclidean distance")] 32 31 public class EuclideanDistance : DistanceBase<IEnumerable<double>> { 33 32 #region HLConstructors & Cloning 34 33 [StorableConstructor] 35 protected EuclideanDistance( bool deserializing) : base(deserializing) { }34 protected EuclideanDistance(StorableConstructorFlag _) : base(_) { } 36 35 protected EuclideanDistance(EuclideanDistance original, Cloner cloner) : base(original, cloner) { } 37 36 public override IDeepCloneable Clone(Cloner cloner) { -
stable/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/IDistance.cs
r15584 r17097 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. … … 22 22 using System.Collections; 23 23 using System.Collections.Generic; 24 using HEAL.Attic; 24 25 using HeuristicLab.Core; 25 26 26 27 namespace HeuristicLab.Algorithms.DataAnalysis { 28 [StorableType("168066b5-a14b-4d87-b3fb-6bac363e9c98")] 27 29 public interface IDistance<in T> : IDistance { 28 30 /// <summary> … … 43 45 } 44 46 45 47 [StorableType("3e44c812-79ad-404d-95e9-8d9c3467110c")] 46 48 public interface IDistance : IItem { 47 49 double Get(object x, object y); -
stable/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/IndexedItemDistance.cs
r15584 r17097 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. … … 23 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;25 using HEAL.Attic; 26 26 27 27 namespace HeuristicLab.Algorithms.DataAnalysis { 28 [Storable Class]28 [StorableType("D6D34B11-7618-4F8E-AFC3-3E42DAA1E38C")] 29 29 [Item("IndexedItemDistance", "A distance wrapper for indexed items")] 30 30 internal class IndexedItemDistance<T> : DistanceBase<IndexedItem<T>> { … … 33 33 34 34 #region HLConstructors & Cloning 35 35 36 [StorableConstructor] 36 protected IndexedItemDistance(bool deserializing) : base(deserializing) { } 37 protected IndexedItemDistance(StorableConstructorFlag _) : base(_) { 38 } 39 37 40 protected IndexedItemDistance(IndexedItemDistance<T> original, Cloner cloner) : base(original, cloner) { 38 41 dist = cloner.Clone(original.dist); -
stable/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/ManhattanDistance.cs
r15584 r17097 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. … … 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq;25 24 using HeuristicLab.Common; 26 25 using HeuristicLab.Core; 27 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;26 using HEAL.Attic; 28 27 29 28 namespace HeuristicLab.Algorithms.DataAnalysis { 30 [Storable Class]29 [StorableType("65C04216-1441-41EE-91B7-A80B2AD5E332")] 31 30 [Item("ManhattanDistance", "A distance function that uses block distance")] 32 31 public class ManhattanDistance : DistanceBase<IEnumerable<double>> { 33 32 #region HLConstructors & Cloning 34 33 [StorableConstructor] 35 protected ManhattanDistance( bool deserializing) : base(deserializing) { }34 protected ManhattanDistance(StorableConstructorFlag _) : base(_) { } 36 35 [StorableHook(HookType.AfterDeserialization)] 37 36 private void AfterDeserialization() { } -
stable/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/WeightedEuclideanDistance.cs
r15584 r17097 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. … … 28 28 using HeuristicLab.Data; 29 29 using HeuristicLab.Parameters; 30 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;30 using HEAL.Attic; 31 31 using HeuristicLab.Problems.DataAnalysis; 32 32 33 33 namespace HeuristicLab.Algorithms.DataAnalysis { 34 [Storable Class]34 [StorableType("A660B39D-1B11-459D-98C2-65942E6D375C")] 35 35 [Item("WeightedEuclideanDistance", "A weighted norm function that uses Euclidean distance √(Σ(w[i]²*(p1[i]-p2[i])²))")] 36 36 public class WeightedEuclideanDistance : ParameterizedNamedItem, IDistance<IEnumerable<double>> { … … 49 49 #region HLConstructors & Cloning 50 50 [StorableConstructor] 51 protected WeightedEuclideanDistance( bool deserializing) : base(deserializing) { }51 protected WeightedEuclideanDistance(StorableConstructorFlag _) : base(_) { } 52 52 [StorableHook(HookType.AfterDeserialization)] 53 53 private void AfterDeserialization() {
Note: See TracChangeset
for help on using the changeset viewer.