Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/15/15 11:08:13 (9 years ago)
Author:
mkommend
Message:

#2320: Implemented symbolic expression tree encoding.

File:
1 edited

Legend:

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

    r12012 r12316  
    2020#endregion
    2121
     22using System;
    2223using System.Collections.Generic;
    2324using System.Linq;
    2425using HeuristicLab.Core;
    25 using System;
    2626
    2727namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
    28   public static class EnumerableExtensions {
    29     public static T SelectRandom<T>(this IEnumerable<T> xs, IRandom random) {
     28
     29  //This class should not be used anymore. Use HeuristicLab.Random.RandomEnumberable instead
     30  //This could not be fixed right now, because the algorithm behavior would be modified => version increment
     31  internal static class EnumerableExtensions {
     32    internal static T SelectRandom<T>(this IEnumerable<T> xs, IRandom random) {
    3033      var list = xs as IList<T>;
    3134      if (list != null) {
     
    3639      }
    3740    }
    38     public static T SelectRandom<T>(this IEnumerable<T> xs, IEnumerable<double> weights, IRandom random) {
     41    internal static T SelectRandom<T>(this IEnumerable<T> xs, IEnumerable<double> weights, IRandom random) {
    3942      var list = xs as IList<T>;
    4043      var weightsList = weights as IList<double>;
Note: See TracChangeset for help on using the changeset viewer.