Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using HeuristicLab.Encodings.PermutationEncoding;
|
---|
4 |
|
---|
5 | namespace 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.