Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/10/15 10:49:31 (9 years ago)
Author:
mkommend
Message:

#2320: Marked SymbolicExpressionTreeEncoding.EnumberableExtensions as obsolete and called the methods in Random.RandomEnumerable whereever possible.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SymbolicExpressionTreeEncoding/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/FullTreeCreator.cs

    r12346 r12420  
    102102          .ToList();
    103103        var weights = possibleSymbols.Select(s => s.InitialFrequency).ToList();
     104
     105#pragma warning disable 612, 618
    104106        var selectedSymbol = possibleSymbols.SelectRandom(weights, random);
     107#pragma warning restore 612, 618
     108
    105109        var tree = selectedSymbol.CreateTreeNode();
    106110        if (tree.HasLocalParameters) tree.ResetLocalParameters(random);
     
    134138          throw new InvalidOperationException("No symbols are available for the tree.");
    135139        var weights = possibleSymbols.Select(s => s.InitialFrequency).ToList();
     140
     141#pragma warning disable 612, 618
    136142        var selectedSymbol = possibleSymbols.SelectRandom(weights, random);
     143#pragma warning restore 612, 618
     144       
    137145        var tree = selectedSymbol.CreateTreeNode();
    138146        if (tree.HasLocalParameters) tree.ResetLocalParameters(random);
Note: See TracChangeset for help on using the changeset viewer.