Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/08/16 15:30:46 (8 years ago)
Author:
bwerth
Message:

#1087 several fixes according to the reviev comments in comment 31

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Calculators/Spacing.cs

    r14018 r14030  
    3333  public static class Spacing {
    3434
    35     public static double Calculate(IEnumerable<double[]> points) {
    36       if (points == null) throw new ArgumentException("Front must not be null.");
    37       if (!points.Any()) throw new ArgumentException("Front must  not be empty.");
     35    public static double Calculate(IEnumerable<double[]> front) {
     36      if (front == null) throw new ArgumentException("Front must not be null.");
     37      if (!front.Any()) throw new ArgumentException("Front must  not be empty.");
    3838
    3939      List<double> d = new List<double>();
    40       foreach (double[] r in points) {
     40      foreach (double[] r in front) {
    4141        var point = r;
    42         var otherPoints = points.Where(p => p != point).DefaultIfEmpty(point);
     42        var otherPoints = front.Where(p => p != point).DefaultIfEmpty(point);
    4343        double dist = Utilities.MinimumDistance(point, otherPoints);
    4444        d.Add(dist);
Note: See TracChangeset for help on using the changeset viewer.