Free cookie consent management tool by TermsFeed Policy Generator

Changeset 12645


Ignore:
Timestamp:
07/07/15 14:16:52 (9 years ago)
Author:
gkronber
Message:

#2396 changed ordering of parameters for variables in the C# formater for symbolic expressions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionCSharpFormatter.cs

    r12434 r12645  
    175175        varNames.Add(((VariableTreeNode)node).VariableName);
    176176      }
    177       foreach (var varName in varNames) {
    178         strBuilder.Append("double " + varName);
    179         if (varName != varNames.Last()) {
    180           strBuilder.Append(", ");
    181         }
    182       }
     177
     178      var orderedNames = varNames.OrderBy(n => n, new NaturalStringComparer()).Select(n=> "double " + n);
     179      strBuilder.Append(string.Join(", ", orderedNames));
    183180
    184181      strBuilder.AppendLine(") {");
Note: See TracChangeset for help on using the changeset viewer.