Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/04/17 17:19:35 (7 years ago)
Author:
gkronber
Message:

#2520: changed all usages of StorableClass to use StorableType with an auto-generated GUID (did not add StorableType to other type definitions yet)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PersistenceReintegration/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/InnerProductDistance.cs

    r14767 r14927  
    2525using HeuristicLab.Common;
    2626using HeuristicLab.Core;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Persistence;
    2828
    2929namespace HeuristicLab.Algorithms.DataAnalysis {
     
    3333  /// It is designed for vectors with all positive coordinates.
    3434  /// </summary>
    35   [StorableClass]
     35  [StorableType("8610393e-1a38-4ba3-8f5e-037ebb1de87f")]
    3636  [Item("InnerProductDistance", "The angluar distance as defined as a normalized distance measure dependent on the angle between two vectors.\nIt is designed for vectors with all positive coordinates")]
    3737  public class InnerProductDistance : DistanceBase<IEnumerable<double>> {
     
    5353      var ys = point2.GetEnumerator();
    5454      var sum = 0.0;
    55       while(xs.MoveNext() & ys.MoveNext()) {
    56         if(xs.Current < 0 || ys.Current < 0) throw new ArgumentException("Inner product distance is only defined for vectors with non-negative elements");
     55      while (xs.MoveNext() & ys.MoveNext()) {
     56        if (xs.Current < 0 || ys.Current < 0) throw new ArgumentException("Inner product distance is only defined for vectors with non-negative elements");
    5757        sum += xs.Current * ys.Current;
    5858      }
    59       if(xs.MoveNext() || ys.MoveNext()) throw new ArgumentException("Enumerables contain a different number of elements");
     59      if (xs.MoveNext() || ys.MoveNext()) throw new ArgumentException("Enumerables contain a different number of elements");
    6060      return sum;
    6161    }
Note: See TracChangeset for help on using the changeset viewer.