Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/24/18 18:48:10 (6 years ago)
Author:
bburlacu
Message:

#2950: Implement first version of hash-based building blocks analyzer. Minor performance improvement in HashExtensions.cs. Fix bug in SymbolicExpressionTreeHash.cs with simplification for Multiplication nodes inadvertently altering constant values.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Hashing/HashExtensions.cs

    r16252 r16255  
    120120
    121121    public static HashNode<T>[] Sort<T>(this HashNode<T>[] nodes) where T : class {
     122      int sort(int a, int b) => nodes[a].CompareTo(nodes[b]);
     123
    122124      for (int i = 0; i < nodes.Length; ++i) {
    123125        var node = nodes[i];
     
    136138            var sorted = new HashNode<T>[size];
    137139            var indices = nodes.IterateChildren(i);
    138             Array.Sort(indices, (a, b) => nodes[a].CompareTo(nodes[b]));
     140            Array.Sort(indices, sort);
    139141
    140142            int idx = 0;
Note: See TracChangeset for help on using the changeset viewer.