Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 16036 was 14691, checked in by abeham, 8 years ago

#2457: working on identification of problem instances

File size: 607 bytes
Line 
1using System;
2using System.Collections.Generic;
3using HeuristicLab.Encodings.PermutationEncoding;
4
5namespace HeuristicLab.Analysis.FitnessLandscape {
6  public static class PermutationPathAnalysis {
7    public static CurveAnalysisResult GetCharacteristics(List<List<Tuple<Permutation, double>>> trajectories) {
8      return CurveAnalysis<Permutation>.GetCharacteristics(trajectories, Dist);
9    }
10
11    private static double Dist(Permutation a, Permutation 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.