Free cookie consent management tool by TermsFeed Policy Generator

source: branches/1614_GeneralizedQAP/HeuristicLab.Analysis.FitnessLandscape/3.3/ProblemCharacteristicAnalysis/IntegerVectorPathAnalysis.cs @ 16036

Last change on this file since 16036 was 15713, checked in by abeham, 7 years ago

#1614:

  • added additional constraint to benchmark data generator and updated one instance that was affected by this
  • added fitness landscape characteristics for the GQAP
  • fixed RLD analysis view to compensate for empty convergence graphs
  • fixed CPLEX solvers not using the obj value when the solver terminates (callback is not called if proven optimal solution is found)
  • added code for local solver to also check on final quality
File size: 619 bytes
RevLine 
[14691]1using System;
2using System.Collections.Generic;
[15713]3using HeuristicLab.Encodings.IntegerVectorEncoding;
[14691]4
5namespace HeuristicLab.Analysis.FitnessLandscape {
[15713]6  public static class IntegerVectorPathAnalysis {
7    public static CurveAnalysisResult GetCharacteristics(List<List<Tuple<IntegerVector, double>>> trajectories) {
8      return CurveAnalysis<IntegerVector>.GetCharacteristics(trajectories, Dist);
[14691]9    }
10
[15713]11    private static double Dist(IntegerVector a, IntegerVector b) {
[14691]12      var dist = 0;
13      for (var i = 0; i < a.Length; i++)
14        if (a[i] != b[i]) dist++;
15      return dist;
16    }
17  }
18}
Note: See TracBrowser for help on using the repository browser.