Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 15713 was 15713, checked in by abeham, 6 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
Line 
1using System;
2using System.Collections.Generic;
3using HeuristicLab.Encodings.IntegerVectorEncoding;
4
5namespace HeuristicLab.Analysis.FitnessLandscape {
6  public static class IntegerVectorPathAnalysis {
7    public static CurveAnalysisResult GetCharacteristics(List<List<Tuple<IntegerVector, double>>> trajectories) {
8      return CurveAnalysis<IntegerVector>.GetCharacteristics(trajectories, Dist);
9    }
10
11    private static double Dist(IntegerVector a, IntegerVector b) {
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.