Changeset 4848 for trunk/sources/HeuristicLab.Analysis
- Timestamp:
- 11/19/10 11:23:37 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Analysis/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Analysis/3.3/HeatMap.cs
r4739 r4848 39 39 get { return title; } 40 40 set { 41 if (!(title.Equals(value) || (value == null) && (title == string.Empty))) { 42 title = value == null ? string.Empty : value; 41 if (value == null) value = string.Empty; 42 if (title != value) { 43 title = value; 43 44 OnTitleChanged(); 44 45 } -
trunk/sources/HeuristicLab.Analysis/3.3/PopulationDiversityAnalyzer.cs
r4777 r4848 75 75 int updateInterval = UpdateIntervalParameter.Value.Value; 76 76 IntValue updateCounter = UpdateCounterParameter.ActualValue; 77 // if counter does not yet exist then initialize it with update interval 78 // to make sure the solutions are analyzed on the first application of this operator 77 79 if (updateCounter == null) { 78 80 updateCounter = new IntValue(updateInterval); … … 80 82 } else updateCounter.Value++; 81 83 84 //analyze solutions only every 'updateInterval' times 82 85 if (updateCounter.Value == updateInterval) { 83 86 updateCounter.Value = 0; … … 93 96 T[] sortedSolutions = null; 94 97 if (max) 95 sortedSolutions = solutions.Select((x, index) => new { Solution = x, Quality = qualities[index] }).OrderByDescending(x => x.Quality).Select(x => x.Solution).ToArray(); 96 else 97 sortedSolutions = solutions.Select((x, index) => new { Solution = x, Quality = qualities[index] }).OrderBy(x => x.Quality).Select(x => x.Solution).ToArray(); 98 sortedSolutions = solutions 99 .Select((x, index) => new { Solution = x, Quality = qualities[index] }) 100 .OrderByDescending(x => x.Quality) 101 .Select(x => x.Solution) 102 .ToArray(); 103 else 104 sortedSolutions = solutions 105 .Select((x, index) => new { Solution = x, Quality = qualities[index] }) 106 .OrderBy(x => x.Quality) 107 .Select(x => x.Solution) 108 .ToArray(); 98 109 99 110 // calculate solution similarities … … 102 113 // calculate minimum, average and maximum similarities 103 114 double similarity; 104 double[] minSimilarities = new double[ sortedSolutions.Length];105 double[] avgSimilarities = new double[ sortedSolutions.Length];106 double[] maxSimilarities = new double[ sortedSolutions.Length];115 double[] minSimilarities = new double[count]; 116 double[] avgSimilarities = new double[count]; 117 double[] maxSimilarities = new double[count]; 107 118 for (int i = 0; i < count; i++) { 108 119 minSimilarities[i] = 1;
Note: See TracChangeset
for help on using the changeset viewer.