Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/20/18 14:53:51 (5 years ago)
Author:
bwerth
Message:

#2943 worked on MOBasicProblem and MOAnalyzers

Location:
branches/2943_MOBasicProblem_MOCMAES/HeuristicLab.Optimization
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2943_MOBasicProblem_MOCMAES/HeuristicLab.Optimization

  • branches/2943_MOBasicProblem_MOCMAES/HeuristicLab.Optimization/3.3/MultiObjective/GenerationalDistanceCalculator.cs

    r16171 r16310  
    2323
    2424#region
    25 
    2625using System;
    2726using System.Collections.Generic;
    2827using System.Linq;
    2928using HeuristicLab.Common;
    30 
    3129#endregion
    3230
     
    4038  public static class GenerationalDistanceCalculator {
    4139    public static double CalculateGenerationalDistance<TP1, TP2>(IEnumerable<TP1> qualities, IEnumerable<TP2> bestKnownFront, double p) where TP1 : IReadOnlyList<double> where TP2 : IReadOnlyList<double> {
    42       if (qualities == null || bestKnownFront == null) throw new ArgumentNullException("Fronts must not be null");
     40      if (qualities == null || bestKnownFront == null) throw new ArgumentNullException(nameof(qualities));
    4341      if (p.IsAlmost(0.0)) throw new ArgumentException("p must not be zero.");
    4442      var mat = bestKnownFront.ToMatrix();
    4543      if (mat.GetLength(0) == 0) throw new ArgumentException("Fronts must not be empty.");
    4644
    47       alglib.kdtree tree;
    48       alglib.kdtreebuild(mat, mat.GetLength(0), mat.GetLength(1), 0, 2, out tree);
     45      alglib.kdtreebuild(mat, mat.GetLength(0), mat.GetLength(1), 0, 2, out var tree);
    4946      var sum = 0.0;
    5047      var summand = new double[1];
Note: See TracChangeset for help on using the changeset viewer.