1 | #region License Information
|
---|
2 | /* HeuristicLab
|
---|
3 | * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
|
---|
4 | *
|
---|
5 | * This file is part of HeuristicLab.
|
---|
6 | *
|
---|
7 | * HeuristicLab is free software: you can redistribute it and/or modify
|
---|
8 | * it under the terms of the GNU General Public License as published by
|
---|
9 | * the Free Software Foundation, either version 3 of the License, or
|
---|
10 | * (at your option) any later version.
|
---|
11 | *
|
---|
12 | * HeuristicLab is distributed in the hope that it will be useful,
|
---|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
15 | * GNU General Public License for more details.
|
---|
16 | *
|
---|
17 | * You should have received a copy of the GNU General Public License
|
---|
18 | * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
|
---|
19 | */
|
---|
20 | #endregion
|
---|
21 |
|
---|
22 | using System.Collections.Generic;
|
---|
23 | using HeuristicLab.Core;
|
---|
24 | using HeuristicLab.Data;
|
---|
25 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
26 | using HeuristicLab.Parameters;
|
---|
27 |
|
---|
28 | namespace HeuristicLab.Problems.TravelingSalesman {
|
---|
29 |
|
---|
30 | /// <summary>
|
---|
31 | /// A class for storing details of population diversity analysis results.
|
---|
32 | /// </summary>
|
---|
33 | [Item("TSPPopulationDiversityAnalysisDetails", "A class for storing details of population diversity analysis results.")]
|
---|
34 | [StorableClass]
|
---|
35 | public class TSPPopulationDiversityAnalysisDetails : ParameterizedNamedItem {
|
---|
36 |
|
---|
37 | public static string AverageSimilaritiesKey = "AverageSimilarities";
|
---|
38 | public ValueParameter<ItemList<DoubleValue>> AverageSimilaritiesParameter {
|
---|
39 | get { return (ValueParameter<ItemList<DoubleValue>>)Parameters[AverageSimilaritiesKey]; }
|
---|
40 | }
|
---|
41 | public ItemList<DoubleValue> AverageSimilarities {
|
---|
42 | get { return AverageSimilaritiesParameter.Value; }
|
---|
43 | }
|
---|
44 |
|
---|
45 | public static string AverageMaximumSimilaritiesKey = "AverageMaximumSimilarities";
|
---|
46 | public ValueParameter<ItemList<DoubleValue>> AverageMaximumSimilaritiesParameter {
|
---|
47 | get { return (ValueParameter<ItemList<DoubleValue>>)Parameters[AverageMaximumSimilaritiesKey]; }
|
---|
48 | }
|
---|
49 | public ItemList<DoubleValue> AverageMaximumSimilarities {
|
---|
50 | get { return AverageMaximumSimilaritiesParameter.Value; }
|
---|
51 | }
|
---|
52 |
|
---|
53 | public static string SimilaritiesKey = "Similarities";
|
---|
54 | public ValueParameter<ItemList<DoubleMatrix>> SimilaritiesParameter {
|
---|
55 | get { return (ValueParameter<ItemList<DoubleMatrix>>)Parameters[SimilaritiesKey]; }
|
---|
56 | }
|
---|
57 | public ItemList<DoubleMatrix> Similarities {
|
---|
58 | get { return SimilaritiesParameter.Value; }
|
---|
59 | }
|
---|
60 |
|
---|
61 | public static string MaximumSimilaritiesKey = "MaximumSimilarities";
|
---|
62 | public ValueParameter<ItemList<DoubleArray>> MaximumSimilaritiesParameter {
|
---|
63 | get { return (ValueParameter<ItemList<DoubleArray>>)Parameters[MaximumSimilaritiesKey]; }
|
---|
64 | }
|
---|
65 | public ItemList<DoubleArray> MaximumSimilarities {
|
---|
66 | get { return MaximumSimilaritiesParameter.Value; }
|
---|
67 | }
|
---|
68 |
|
---|
69 | public TSPPopulationDiversityAnalysisDetails()
|
---|
70 | : base() {
|
---|
71 | Parameters.Add(new ValueParameter<ItemList<DoubleValue>>(AverageSimilaritiesKey, "Average similarities of the solutions of the population.", new ItemList<DoubleValue>()));
|
---|
72 | Parameters.Add(new ValueParameter<ItemList<DoubleValue>>(AverageMaximumSimilaritiesKey, "Average maximum similarities of the solutions of the population.", new ItemList<DoubleValue>()));
|
---|
73 | Parameters.Add(new ValueParameter<ItemList<DoubleMatrix>>(SimilaritiesKey, "Similarities of the solutions of the population.", new ItemList<DoubleMatrix>()));
|
---|
74 | Parameters.Add(new ValueParameter<ItemList<DoubleArray>>(MaximumSimilaritiesKey, "Maximum similarities of the solutions of the population.", new ItemList<DoubleArray>()));
|
---|
75 | }
|
---|
76 |
|
---|
77 | }
|
---|
78 |
|
---|
79 | }
|
---|