Changeset 6981


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

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

Location:
trunk/sources
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Common/3.3/HeuristicLab.Common-3.3.csproj

    r6866 r6981  
    124124    <Compile Include="Content\IStorableContent.cs" />
    125125    <Compile Include="Constants.cs" />
     126    <Compile Include="NaturalStringComparer.cs" />
    126127    <Compile Include="ObjectExtensions.cs" />
    127128    <Compile Include="DeepCloneable.cs" />
  • 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.