- Timestamp:
- 08/29/18 18:16:05 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2457_ExpertSystem/ProblemInstanceIdentifier/InstanceDescriptor.cs
r15031 r16096 1 using System; 2 using System.Collections.Generic; 1 using System.Collections.Generic; 3 2 using System.Linq; 4 3 using System.Text.RegularExpressions; 5 using HeuristicLab.Analysis.FitnessLandscape;6 4 using HeuristicLab.Common; 7 using HeuristicLab.Encodings.PermutationEncoding;8 5 using HeuristicLab.Problems.QuadraticAssignment; 9 6 … … 16 13 public string[] FeatureNames { get; set; } 17 14 public double[] FeatureValues { get; set; } 15 16 public double DescriptionEffort { get; set; } 18 17 19 18 private InstanceDescriptor() { } … … 33 32 FeatureNames = (string[])other.FeatureNames.Clone(); 34 33 FeatureValues = (double[]) other.FeatureValues.Clone(); 34 DescriptionEffort = other.DescriptionEffort; 35 35 } 36 36 … … 41 41 Dimension = qap.Weights.Rows, 42 42 FeatureNames = new string[0], 43 FeatureValues = new double[0] 44 }; 45 } 46 47 public static InstanceDescriptor FromPaths(QuadraticAssignmentProblem qap, List<List<Tuple<Permutation, double>>> trajectories) { 48 var result = PermutationPathAnalysis.GetCharacteristics(trajectories); 49 50 return new InstanceDescriptor() { 51 Name = qap.Name, 52 Cls = GetClass(qap.Name), 53 Dimension = qap.Weights.Rows, 54 FeatureNames = result.GetNames(), 55 FeatureValues = result.GetValues() 43 FeatureValues = new double[0], 44 DescriptionEffort = 0 56 45 }; 57 46 }
Note: See TracChangeset
for help on using the changeset viewer.