Changeset 12316 for branches/SymbolicExpressionTreeEncoding/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/EnumerableExtensions.cs
- Timestamp:
- 04/15/15 11:08:13 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SymbolicExpressionTreeEncoding/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/EnumerableExtensions.cs
r12012 r12316 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 24 using System.Linq; 24 25 using HeuristicLab.Core; 25 using System;26 26 27 27 namespace 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) { 30 33 var list = xs as IList<T>; 31 34 if (list != null) { … … 36 39 } 37 40 } 38 publicstatic 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) { 39 42 var list = xs as IList<T>; 40 43 var weightsList = weights as IList<double>;
Note: See TracChangeset
for help on using the changeset viewer.