Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/10/11 09:27:28 (13 years ago)
Author:
mkommend
Message:

#1647: Sorted variable frequencies by the variable name and added NaturalStringComparer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisVariableFrequencyAnalyzer.cs

    r6811 r6981  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Analysis;
    2526using HeuristicLab.Common;
    2627using HeuristicLab.Core;
    2728using HeuristicLab.Data;
    2829using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    29 using HeuristicLab.Operators;
    3030using HeuristicLab.Optimization;
    3131using HeuristicLab.Parameters;
    3232using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    33 using HeuristicLab.Analysis;
    3433
    3534namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
     
    139138      double totalNumberOfSymbols = variableFrequencies.Values.Sum();
    140139
    141       foreach (var pair in variableFrequencies)
     140      foreach (var pair in variableFrequencies.OrderBy(p => p.Key, new NaturalStringComparer()))
    142141        yield return new KeyValuePair<string, double>(pair.Key, pair.Value / totalNumberOfSymbols);
    143142    }
Note: See TracChangeset for help on using the changeset viewer.