Changeset 14500


Ignore:
Timestamp:
12/18/16 17:11:23 (3 years ago)
Author:
gkronber
Message:

#2699: fixed a small typo and added .sln file while reviewing

Location:
branches/RBFRegression/HeuristicLab.Algorithms.DataAnalysis/3.4
Files:
1 added
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/RBFRegression/HeuristicLab.Algorithms.DataAnalysis/3.4/HeuristicLab.Algorithms.DataAnalysis-3.4.csproj

    r14386 r14500  
    371371    <Compile Include="RadialBasisFunctions\Distances\DistanceBase.cs" />
    372372    <Compile Include="RadialBasisFunctions\Distances\EuclidianDistance.cs" />
    373     <Compile Include="RadialBasisFunctions\Distances\ManhattenDistance.cs" />
     373    <Compile Include="RadialBasisFunctions\Distances\ManhattanDistance.cs" />
    374374    <Compile Include="RadialBasisFunctions\Interfaces\IDistance.cs" />
    375375    <Compile Include="RadialBasisFunctions\Interfaces\IKernelFunction.cs" />
  • branches/RBFRegression/HeuristicLab.Algorithms.DataAnalysis/3.4/RadialBasisFunctions/Distances/ManhattanDistance.cs

    r14499 r14500  
    2929namespace HeuristicLab.Algorithms.DataAnalysis {
    3030  [StorableClass]
    31   [Item("ManhattenDistance", "A distance function that uses Block distance")]
    32   public class ManhattenDistance : DistanceBase<IEnumerable<double>> {
     31  [Item("ManhattanDistance", "A distance function that uses block distance")]
     32  public class ManhattanDistance : DistanceBase<IEnumerable<double>> {
    3333
    3434    #region HLConstructors & Boilerplate
    3535    [StorableConstructor]
    36     protected ManhattenDistance(bool deserializing) : base(deserializing) { }
     36    protected ManhattanDistance(bool deserializing) : base(deserializing) { }
    3737    [StorableHook(HookType.AfterDeserialization)]
    3838    private void AfterDeserialization() { }
    39     protected ManhattenDistance(ManhattenDistance original, Cloner cloner)
     39    protected ManhattanDistance(ManhattanDistance original, Cloner cloner)
    4040      : base(original, cloner) { }
    41     public ManhattenDistance() { }
     41    public ManhattanDistance() { }
    4242    public override IDeepCloneable Clone(Cloner cloner) {
    43       return new ManhattenDistance(this, cloner);
     43      return new ManhattanDistance(this, cloner);
    4444    }
    4545    #endregion
    4646
    4747    public static double GetDistance(double[] point1, double[] point2) {
    48       if (point1.Length != point2.Length) throw new ArgumentException("Manhatten distance not defined on vectors of different length");
     48      if (point1.Length != point2.Length) throw new ArgumentException("Manhattan distance not defined on vectors of different length");
    4949      return point1.Zip(point2, (a1, b1) => Math.Abs(a1 - b1)).Sum();
    5050    }
Note: See TracChangeset for help on using the changeset viewer.