Index: branches/HiveStatistics/sources/HeuristicLab.Random/3.3/MersenneTwister.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Random/3.3/MersenneTwister.cs	(revision 9522)
+++ branches/HiveStatistics/sources/HeuristicLab.Random/3.3/MersenneTwister.cs	(revision 11202)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/HiveStatistics/sources/HeuristicLab.Random/3.3/NormalDistributedRandom.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Random/3.3/NormalDistributedRandom.cs	(revision 9522)
+++ branches/HiveStatistics/sources/HeuristicLab.Random/3.3/NormalDistributedRandom.cs	(revision 11202)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/HiveStatistics/sources/HeuristicLab.Random/3.3/NormalRandomizer.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Random/3.3/NormalRandomizer.cs	(revision 9522)
+++ branches/HiveStatistics/sources/HeuristicLab.Random/3.3/NormalRandomizer.cs	(revision 11202)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/HiveStatistics/sources/HeuristicLab.Random/3.3/Plugin.cs.frame
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Random/3.3/Plugin.cs.frame	(revision 9522)
+++ branches/HiveStatistics/sources/HeuristicLab.Random/3.3/Plugin.cs.frame	(revision 11202)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -26,5 +26,5 @@
   /// Plugin class for HeuristicLab.Random plugin.
   /// </summary>
-  [Plugin("HeuristicLab.Random", "3.3.7.$WCREV$")]
+  [Plugin("HeuristicLab.Random", "3.3.10.$WCREV$")]
   [PluginFile("HeuristicLab.Random-3.3.dll", PluginFileType.Assembly)]
   [PluginDependency("HeuristicLab.Collections", "3.3")]
Index: branches/HiveStatistics/sources/HeuristicLab.Random/3.3/Properties/AssemblyInfo.cs.frame
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Random/3.3/Properties/AssemblyInfo.cs.frame	(revision 9522)
+++ branches/HiveStatistics/sources/HeuristicLab.Random/3.3/Properties/AssemblyInfo.cs.frame	(revision 11202)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -32,5 +32,5 @@
 [assembly: AssemblyCompany("")]
 [assembly: AssemblyProduct("HeuristicLab")]
-[assembly: AssemblyCopyright("(c) 2002-2012 HEAL")]
+[assembly: AssemblyCopyright("(c) 2002-2014 HEAL")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
@@ -54,3 +54,3 @@
 // by using the '*' as shown below:
 [assembly: AssemblyVersion("3.3.0.0")]
-[assembly: AssemblyFileVersion("3.3.7.$WCREV$")]
+[assembly: AssemblyFileVersion("3.3.10.$WCREV$")]
Index: branches/HiveStatistics/sources/HeuristicLab.Random/3.3/RandomCreator.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Random/3.3/RandomCreator.cs	(revision 9522)
+++ branches/HiveStatistics/sources/HeuristicLab.Random/3.3/RandomCreator.cs	(revision 11202)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/HiveStatistics/sources/HeuristicLab.Random/3.3/RandomEnumerable.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Random/3.3/RandomEnumerable.cs	(revision 9522)
+++ branches/HiveStatistics/sources/HeuristicLab.Random/3.3/RandomEnumerable.cs	(revision 11202)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -36,5 +36,5 @@
 
     //algorithm taken from progamming pearls page 127
-    //IMPORTANT because IEnumerables with yield are used the seed must best be specified to return always 
+    //IMPORTANT because IEnumerables with yield are used the seed must be specified to return always 
     //the same sequence of numbers without caching the values.
     public static IEnumerable<int> SampleRandomNumbers(int seed, int start, int end, int count) {
@@ -166,4 +166,6 @@
     /// 
     /// The method internally holds two arrays: One that is the sequence itself and another one for the values.
+    /// 
+    /// The method does not check if the number of elements in source and weights are the same.
     /// </remarks>
     /// <typeparam name="T">The type of the items to be selected.</typeparam>
@@ -173,6 +175,6 @@
     /// <param name="weights">The weight values for the items.</param>
     /// <param name="windowing">Whether to scale the proportional values or not.</param>
-    /// <param name="maximization">Determines whether to choose proportionally (true) or inverse-proportionally (false).</param>
-    /// <returns>A sequence of selected items.</returns>
+    /// <param name="inverseProportional">Determines whether to choose proportionally (true) or inverse-proportionally (false).</param>
+    /// <returns>A sequence of selected items. Might actually be shorter than <paramref name="count"/> elements if source has less than <paramref name="count"/> elements.</returns>
     public static IEnumerable<T> SampleProportionalWithoutRepetition<T>(this IEnumerable<T> source, IRandom random, int count, IEnumerable<double> weights, bool windowing = true, bool inverseProportional = false) {
       return source.SampleProportionalWithoutRepetition(random, weights, windowing, inverseProportional).Take(count);
@@ -181,5 +183,5 @@
     private static IEnumerable<T> SampleProportional<T>(this IEnumerable<T> source, IRandom random, IEnumerable<double> weights, bool windowing, bool inverseProportional) {
       var sourceArray = source.ToArray();
-      var valueArray = PrepareProportional<T>(sourceArray, weights, windowing, inverseProportional);
+      var valueArray = PrepareProportional(weights, windowing, inverseProportional);
       double total = valueArray.Sum();
 
@@ -193,34 +195,31 @@
     }
     private static IEnumerable<T> SampleProportionalWithoutRepetition<T>(this IEnumerable<T> source, IRandom random, IEnumerable<double> weights, bool windowing, bool inverseProportional) {
-      var sourceArray = source.ToArray();
-      var valueArray = PrepareProportional<T>(sourceArray, weights, windowing, inverseProportional);
+      var valueArray = PrepareProportional(weights, windowing, inverseProportional);
+      var list = new LinkedList<Tuple<T, double>>(source.Zip(valueArray, Tuple.Create));
       double total = valueArray.Sum();
 
-      HashSet<int> chosenIndices = new HashSet<int>();
-      while (chosenIndices.Count < sourceArray.Length) {
-        int index = 0;
-        double ball = valueArray[index], sum = random.NextDouble() * total;
+      while (list.Count > 0) {
+        var cur = list.First;
+        double ball = cur.Value.Item2, sum = random.NextDouble() * total; // assert: sum < total. When there is only one item remaining: sum < ball
         while (ball < sum) {
-          index++;
-          if (!chosenIndices.Contains(index))
-            ball += valueArray[++index];
-        }
-        yield return sourceArray[index];
-        chosenIndices.Add(index);
-        total -= valueArray[index];
-      }
-    }
-    private static double[] PrepareProportional<T>(IList<T> sourceArray, IEnumerable<double> weights, bool windowing, bool inverseProportional) {
+          cur = cur.Next;
+          ball += cur.Value.Item2;
+        }
+        yield return cur.Value.Item1;
+        list.Remove(cur);
+        total -= cur.Value.Item2;
+      }
+    }
+
+    private static double[] PrepareProportional(IEnumerable<double> weights, bool windowing, bool inverseProportional) {
       double maxValue = double.MinValue, minValue = double.MaxValue;
-      double[] valueArray = new double[sourceArray.Count];
-
-      var weightsEnum = weights.GetEnumerator();
-      for (int i = 0; i < sourceArray.Count && weightsEnum.MoveNext(); i++) {
-        valueArray[i] = weightsEnum.Current;
+      double[] valueArray = weights.ToArray();
+
+      for (int i = 0; i < valueArray.Length; i++) {
         if (valueArray[i] > maxValue) maxValue = valueArray[i];
         if (valueArray[i] < minValue) minValue = valueArray[i];
       }
       if (minValue == maxValue) {  // all values are equal
-        for (int i = 0; i < sourceArray.Count; i++) {
+        for (int i = 0; i < valueArray.Length; i++) {
           valueArray[i] = 1.0;
         }
@@ -274,2 +273,3 @@
   }
 }
+
Index: branches/HiveStatistics/sources/HeuristicLab.Random/3.3/UniformDistributedRandom.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Random/3.3/UniformDistributedRandom.cs	(revision 9522)
+++ branches/HiveStatistics/sources/HeuristicLab.Random/3.3/UniformDistributedRandom.cs	(revision 11202)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/HiveStatistics/sources/HeuristicLab.Random/3.3/UniformRandomizer.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Random/3.3/UniformRandomizer.cs	(revision 9522)
+++ branches/HiveStatistics/sources/HeuristicLab.Random/3.3/UniformRandomizer.cs	(revision 11202)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
