Index: /branches/GeneralizedQAP/Clean.cmd
===================================================================
--- /branches/GeneralizedQAP/Clean.cmd	(revision 7807)
+++ /branches/GeneralizedQAP/Clean.cmd	(revision 7807)
@@ -0,0 +1,30 @@
+@ECHO OFF
+
+ECHO Clean starting...
+
+FOR /F "tokens=*" %%G IN ('DIR /AD /B') DO (
+  FOR /F "tokens=*" %%T IN ('DIR /AD /B %%G') DO (
+    IF EXIST %%G\%%T\bin (
+      ECHO Cleaning "bin" in %%G in version %%T ...
+      RMDIR /S /Q "%%G\%%T\bin"
+    )
+    IF EXIST %%G\%%T\obj (
+      ECHO Cleaning "obj" in %%G in version %%T ...
+      RMDIR /S /Q "%%G\%%T\obj"
+    )
+  )
+)
+
+IF EXIST bin (
+  ECHO Cleaning "bin" in current directory ...
+  RMDIR /S /Q bin
+)
+
+IF EXIST TestResults (
+  ECHO Cleaning "TestResults" in current directory ...
+  RMDIR /S /Q TestResults
+)
+
+ECHO Clean finished.
+
+PAUSE
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Common/3.3/ExtensionMethods.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Common/3.3/ExtensionMethods.cs	(revision 7806)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Common/3.3/ExtensionMethods.cs	(revision 7807)
@@ -30,10 +30,29 @@
     #region Choosing from a sequence
     /// <summary>
-    /// Chooses one elements from a sequence under equal chances for each element.
-    /// </summary>
-    /// <remarks>
-    /// Runtime complexity is O(1) for sequences that are <see cref="IList{T}"/> and
+    /// Chooses one elements from a sequence giving each element an equal chance.
+    /// </summary>
+    /// <remarks>
+    /// Runtime complexity is O(1) for sequences that are of type <see cref="IList{T}"/> and
     /// O(N) for all other.
     /// </remarks>
+    /// <exception cref="ArgumentException">If the sequence is empty.</exception>
+    /// <typeparam name="T">The type of the items to be selected.</typeparam>
+    /// <param name="source">The sequence of elements.</param>
+    /// <param name="random">The random number generator to use, its NextDouble() method must produce values in the range [0;1)</param>
+    /// <param name="count">The number of items to be selected.</param>
+    /// <returns>An element that has been chosen randomly from the sequence.</returns>
+    public static T SampleRandom<T>(this IEnumerable<T> source, IRandom random) {
+      if (!source.Any()) throw new ArgumentException("sequence is empty.", "source");
+      return source.SampleRandom(random, 1).First();
+    }
+    /// <summary>
+    /// Chooses <paramref name="count"/> elements from a sequence with repetition with equal chances for each element.
+    /// </summary>
+    /// <remarks>
+    /// Runtime complexity is O(count) for sequences that are <see cref="IList{T}"/> and
+    /// O(N * count) for all other. No exception is thrown if the sequence is empty.
+    /// 
+    /// The method is online.
+    /// </remarks>
     /// <typeparam name="T">The type of the items to be selected.</typeparam>
     /// <param name="source">The sequence of elements.</param>
@@ -41,54 +60,36 @@
     /// <param name="count">The number of items to be selected.</param>
     /// <returns>A sequence of elements that have been chosen randomly.</returns>
-    public static T ChooseUniformRandom<T>(this IEnumerable<T> source, IRandom random) {
-      return source.ChooseUniformRandom(random, 1).First();
-    }
-    /// <summary>
-    /// Chooses <paramref name="count"/> elements from a sequence with repetition under equal chances for each element.
-    /// </summary>
-    /// <remarks>
-    /// Runtime complexity is O(count) for sequences that are <see cref="IList{T}"/> and
-    /// O(N * count) for all other.
-    /// 
-    /// The method is online.
-    /// </remarks>
-    /// <typeparam name="T">The type of the items to be selected.</typeparam>
-    /// <param name="source">The sequence of elements.</param>
-    /// <param name="random">The random number generator to use, its NextDouble() method must produce values in the range [0;1)</param>
-    /// <param name="count">The number of items to be selected.</param>
-    /// <returns>A sequence of elements that have been chosen randomly.</returns>
-    public static IEnumerable<T> ChooseUniformRandom<T>(this IEnumerable<T> source, IRandom random, int count) {
-      if (source == null) throw new ArgumentNullException("source", "sequence is null");
-      if (!source.Any()) throw new ArgumentException("sequence is empty.", "source");
-
+    public static IEnumerable<T> SampleRandom<T>(this IEnumerable<T> source, IRandom random, int count) {
       var listSource = source as IList<T>;
-      if (listSource != null)
+      if (listSource != null) {
         while (count > 0) {
           yield return listSource[random.Next(listSource.Count)];
           count--;
         }
-
-      while (count > 0) {
-        var enumerator = source.GetEnumerator();
-        enumerator.MoveNext();
-        T selectedItem = enumerator.Current;
-        int counter = 1;
-        while (enumerator.MoveNext()) {
-          counter++;
-          if (counter * random.NextDouble() < 1.0)
-            selectedItem = enumerator.Current;
-        }
-        yield return selectedItem;
-        count--;
-      }
-    }
-    /// <summary>
-    /// Chooses <paramref name="count"/> elements from a sequence without repetition under equal chances for each element.
-    /// </summary>
-    /// <remarks>
-    /// Runtime complexity is O(count) for sequences that are <see cref="IList{T}"/> and
-    /// O(N * count) for all other.
-    /// 
-    /// The method is online, but the source enumerable is transformed into an array.
+      } else {
+        while (count > 0) {
+          var enumerator = source.GetEnumerator();
+          enumerator.MoveNext();
+          T selectedItem = enumerator.Current;
+          int counter = 1;
+          while (enumerator.MoveNext()) {
+            counter++;
+            if (counter * random.NextDouble() < 1.0)
+              selectedItem = enumerator.Current;
+          }
+          yield return selectedItem;
+          count--;
+        }
+      }
+    }
+    /// <summary>
+    /// Chooses <paramref name="count"/> elements from a sequence without repetition with equal chances for each element.
+    /// The items are returned in the same order as they appear in the sequence.
+    /// </summary>
+    /// <remarks>
+    /// Runtime complexity is O(N) for all sequences.
+    /// No exception is thrown if the sequence contains less items than there are to be selected.
+    /// 
+    /// The method is online.
     /// </remarks>
     /// <typeparam name="T">The type of the items to be selected.</typeparam>
@@ -97,58 +98,61 @@
     /// <param name="count">The number of items to be selected.</param>
     /// <returns>A sequence of elements that have been chosen randomly.</returns>
-    public static IEnumerable<T> ChooseUniformRandomWithoutRepetition<T>(this IEnumerable<T> source, IRandom random, int count) {
-      return source.Shuffle(random).Take(count);
-    }
-
-    /// <summary>
-    /// Chooses items out of a sequence with repetition. The chance that an item is selected is proportional or inverse-proportional
-    /// to the value obtained from <paramref name="valueSelector"/>.
-    /// </summary>
-    /// <remarks>
-    /// In case both <paramref name="maximization"/> and <paramref name="windowing"/> are false values must be &gt; 0,
+    public static IEnumerable<T> SampleRandomWithoutRepetition<T>(this IEnumerable<T> source, IRandom random, int count) {
+      int remaining = source.Count();
+      foreach (var item in source) {
+        if (random.NextDouble() * remaining < count) {
+          count--;
+          yield return item;
+          if (count <= 0) break;
+        }
+        remaining--;
+      }
+    }
+
+    /// <summary>
+    /// Chooses elements out of a sequence with repetition. The chance that an item is selected is proportional or inverse-proportional
+    /// to the <paramref name="weights"/>.
+    /// </summary>
+    /// <remarks>
+    /// In case both <paramref name="inverseProportional"/> and <paramref name="windowing"/> are false values must be &gt; 0,
     /// otherwise an InvalidOperationException is thrown.
     /// 
-    /// The method is online, but internally holds two arrays: One that is the sequence itself and another one for the values. The <paramref name="valueSelector"/>
-    /// is only applied once for each item.
-    /// </remarks>
-    /// <typeparam name="T">The type of the items to be selected.</typeparam>
-    /// <param name="source">The sequence of elements.</param>
-    /// <param name="random">The random number generator to use, its NextDouble() method must produce values in the range [0;1)</param>
-    /// <param name="count">The number of items to be selected.</param>
-    /// <param name="valueSelector">The function that calculates a proportional value for each item.</param>
+    /// The method internally holds two arrays: One that is the sequence itself and another one for the values.
+    /// </remarks>
+    /// <typeparam name="T">The type of the items to be selected.</typeparam>
+    /// <param name="source">The sequence of elements.</param>
+    /// <param name="random">The random number generator to use, its NextDouble() method must produce values in the range [0;1)</param>
+    /// <param name="count">The number of items to be selected.</param>
+    /// <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>
+    /// <param name="inverseProportional">Determines whether to choose proportionally (false) or inverse-proportionally (true).</param>
     /// <returns>A sequence of selected items. The sequence might contain the same item more than once.</returns>
-    public static IEnumerable<T> ChooseProportionalRandom<T>(this IEnumerable<T> source, IRandom random, int count, Func<T, double> valueSelector, bool windowing, bool maximization) {
-      return source.ChooseProportionalRandom(random, valueSelector, windowing, maximization).Take(count);
-    }
-    /// <summary>
-    /// Same as <seealso cref="ChooseProportionalRandom<T>"/>, but selects each item exactly once.
-    /// </summary>
-    /// <remarks>
-    /// In case both <paramref name="maximization"/> and <paramref name="windowing"/> are false values must be &gt; 0,
+    public static IEnumerable<T> SampleProportional<T>(this IEnumerable<T> source, IRandom random, int count, IEnumerable<double> weights, bool windowing = true, bool inverseProportional = false) {
+      return source.SampleProportional(random, weights, windowing, inverseProportional).Take(count);
+    }
+    /// <summary>
+    /// Same as <seealso cref="SampleProportional<T>"/>, but chooses an item exactly once.
+    /// </summary>
+    /// <remarks>
+    /// In case both <paramref name="inverseProportional"/> and <paramref name="windowing"/> are false values must be &gt; 0,
     /// otherwise an InvalidOperationException is thrown.
     /// 
-    /// The method is online, but internally holds two arrays: One that is the sequence itself and another one for the values. The <paramref name="valueSelector"/>
-    /// is only applied once for each item.
-    /// </remarks>
-    /// <typeparam name="T">The type of the items to be selected.</typeparam>
-    /// <param name="source">The sequence of elements.</param>
-    /// <param name="random">The random number generator to use, its NextDouble() method must produce values in the range [0;1)</param>
-    /// <param name="count">The number of items to be selected.</param>
-    /// <param name="valueSelector">The function that calculates a proportional value for each item.</param>
+    /// The method internally holds two arrays: One that is the sequence itself and another one for the values.
+    /// </remarks>
+    /// <typeparam name="T">The type of the items to be selected.</typeparam>
+    /// <param name="source">The sequence of elements.</param>
+    /// <param name="random">The random number generator to use, its NextDouble() method must produce values in the range [0;1)</param>
+    /// <param name="count">The number of items to be selected.</param>
+    /// <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>
-    public static IEnumerable<T> ChooseProportionalRandomWithoutRepetition<T>(this IEnumerable<T> source, IRandom random, int count, Func<T, double> valueSelector, bool windowing, bool maximization) {
-      return source.ChooseProportionalRandomWithoutRepetition(random, valueSelector, windowing, maximization).Take(count);
+    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);
     }
     #region Proportional Helpers
-    private static IEnumerable<T> ChooseProportionalRandom<T>(this IEnumerable<T> source, IRandom random, Func<T, double> valueSelector, bool windowing, bool maximization) {
-      if (source == null) throw new ArgumentNullException("source", "sequence is null");
-      if (!source.Any()) throw new ArgumentException("sequence is empty.", "source");
-
+    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, valueSelector, windowing, maximization);
+      var valueArray = PrepareProportional<T>(sourceArray, weights, windowing, inverseProportional);
       double total = valueArray.Sum();
 
@@ -161,10 +165,7 @@
       }
     }
-    private static IEnumerable<T> ChooseProportionalRandomWithoutRepetition<T>(this IEnumerable<T> source, IRandom random, Func<T, double> valueSelector, bool windowing, bool maximization) {
-      if (source == null) throw new ArgumentNullException("source", "sequence is null");
-      if (!source.Any()) throw new ArgumentException("sequence is empty.", "source");
-
+    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, valueSelector, windowing, maximization);
+      var valueArray = PrepareProportional<T>(sourceArray, weights, windowing, inverseProportional);
       double total = valueArray.Sum();
 
@@ -183,10 +184,11 @@
       }
     }
-    private static double[] PrepareProportional<T>(IList<T> sourceArray, Func<T, double> valueSelector, bool windowing, bool maximization) {
+    private static double[] PrepareProportional<T>(IList<T> sourceArray, IEnumerable<double> weights, bool windowing, bool inverseProportional) {
       double maxValue = double.MinValue, minValue = double.MaxValue;
       double[] valueArray = new double[sourceArray.Count];
 
-      for (int i = 0; i < sourceArray.Count; i++) {
-        valueArray[i] = valueSelector(sourceArray[i]);
+      var weightsEnum = weights.GetEnumerator();
+      for (int i = 0; i < sourceArray.Count && weightsEnum.MoveNext(); i++) {
+        valueArray[i] = weightsEnum.Current;
         if (valueArray[i] > maxValue) maxValue = valueArray[i];
         if (valueArray[i] < minValue) minValue = valueArray[i];
@@ -198,9 +200,9 @@
       } else {
         if (windowing) {
-          if (maximization) ProportionalScale(valueArray, minValue);
-          else InverseProportionalScale(valueArray, maxValue);
+          if (inverseProportional) InverseProportionalScale(valueArray, minValue);
+          else ProportionalScale(valueArray, maxValue);
         } else {
           if (minValue < 0.0) throw new InvalidOperationException("Proportional selection without windowing does not work with values < 0.");
-          if (!maximization) InverseProportionalScale(valueArray, 2 * maxValue);
+          if (inverseProportional) InverseProportionalScale(valueArray, 2 * maxValue);
         }
       }
@@ -220,5 +222,5 @@
 
     /// <summary>
-    /// Selects the first element in the sequence that is maximal with respect to the given key.
+    /// Selects all elements in the sequence that are maximal with respect to the given value.
     /// </summary>
     /// <remarks>
@@ -226,20 +228,23 @@
     /// </remarks>
     /// <typeparam name="T">The type of the elements.</typeparam>
-    /// <typeparam name="TComparable">The selected key (needs to be an IComparable).</typeparam>
-    /// <param name="source">The enumeration in which the maximum item should be found.</param>
-    /// <param name="keySelector">The function that selects the key.</param>
-    /// <returns>The element in the enumeration where the selected key is the maximum.</returns>
-    public static T ChooseMax<T, TComparable>(this IEnumerable<T> source, Func<T, TComparable> keySelector) where TComparable : IComparable {
-      if (source == null) throw new ArgumentNullException("source", "sequence is null");
+    /// <param name="source">The enumeration in which the items with a maximal value should be found.</param>
+    /// <param name="valueSelector">The function that selects the value to compare.</param>
+    /// <returns>All elements in the enumeration where the selected value is the maximum.</returns>
+    public static IEnumerable<T> MaxItems<T>(this IEnumerable<T> source, Func<T, IComparable> valueSelector) {
       IEnumerator<T> enumerator = source.GetEnumerator();
-      if (!enumerator.MoveNext()) throw new ArgumentException("sequence is empty", "source");
-      T result = enumerator.Current;
-      TComparable max = keySelector(result);
+      if (!enumerator.MoveNext()) return Enumerable.Empty<T>();
+      IComparable max = valueSelector(enumerator.Current);
+      var result = new List<T>();
+      result.Add(enumerator.Current);
+
       while (enumerator.MoveNext()) {
         T item = enumerator.Current;
-        TComparable comparison = keySelector(item);
+        IComparable comparison = valueSelector(item);
         if (comparison.CompareTo(max) > 0) {
-          result = item;
+          result.Clear();
+          result.Add(item);
           max = comparison;
+        } else if (comparison.CompareTo(max) == 0) {
+          result.Add(item);
         }
       }
@@ -248,5 +253,5 @@
 
     /// <summary>
-    /// Selects the first element in the sequence where the selected key is the minimum.
+    /// Selects all elements in the sequence that are minimal with respect to the given value.
     /// </summary>
     /// <remarks>
@@ -254,20 +259,23 @@
     /// </remarks>
     /// <typeparam name="T">The type of the elements.</typeparam>
-    /// <typeparam name="TComparable">The selected key (needs to be an IComparable).</typeparam>
-    /// <param name="source">The enumeration in which the minimum item should be found.</param>
-    /// <param name="keySelector">The function that selects the key.</param>
-    /// <returns>The element in the enumeration where the selected key is the minimum.</returns>
-    public static T ChooseMin<T, TComparable>(this IEnumerable<T> source, Func<T, TComparable> keySelector) where TComparable : IComparable {
-      if (source == null) throw new ArgumentNullException("source", "sequence is null");
+    /// <param name="source">The enumeration in which items with a minimal value should be found.</param>
+    /// <param name="valueSelector">The function that selects the value.</param>
+    /// <returns>All elements in the enumeration where the selected value is the minimum.</returns>
+    public static IEnumerable<T> MinItems<T>(this IEnumerable<T> source, Func<T, IComparable> valueSelector) {
       IEnumerator<T> enumerator = source.GetEnumerator();
-      if (!enumerator.MoveNext()) throw new ArgumentException("sequence is empty", "source");
-      T result = enumerator.Current;
-      TComparable min = keySelector(result);
+      if (!enumerator.MoveNext()) return Enumerable.Empty<T>();
+      IComparable min = valueSelector(enumerator.Current);
+      var result = new List<T>();
+      result.Add(enumerator.Current);
+
       while (enumerator.MoveNext()) {
         T item = enumerator.Current;
-        TComparable comparison = keySelector(item);
+        IComparable comparison = valueSelector(item);
         if (comparison.CompareTo(min) < 0) {
-          result = item;
+          result.Clear();
+          result.Add(item);
           min = comparison;
+        } else if (comparison.CompareTo(min) == 0) {
+          result.Add(item);
         }
       }
@@ -281,5 +289,5 @@
     /// </summary>
     /// <remarks>
-    /// Note that this is an online shuffle, but the source enumerable is transformed into an array.
+    /// Note that the source enumerable is transformed into an array.
     /// 
     /// The implementation is described in http://stackoverflow.com/questions/1287567/c-is-using-random-and-orderby-a-good-shuffle-algorithm.
@@ -292,5 +300,5 @@
       T[] elements = source.ToArray();
       for (int i = elements.Length - 1; i > 0; i--) {
-        // Swap element "i" with a random earlier element it (or itself)
+        // Swap element "i" with a random earlier element (including itself)
         int swapIndex = random.Next(i + 1);
         yield return elements[swapIndex];
@@ -333,6 +341,12 @@
 
     #region Matrix operations
-    public static double[,] Transpose(this double[,] matrix) {
-      var result = new double[matrix.GetLength(1), matrix.GetLength(0)];
+    /// <summary>
+    /// Returns a transposed matrix of the given <paramref name="matrix"/>.
+    /// </summary>
+    /// <typeparam name="T">The type of the matrix</typeparam>
+    /// <param name="matrix">The matrix that should be transposed.</param>
+    /// <returns>The transposed matrix.</returns>
+    public static T[,] Transpose<T>(this T[,] matrix) {
+      var result = new T[matrix.GetLength(1), matrix.GetLength(0)];
       for (int i = 0; i < matrix.GetLength(0); i++)
         for (int j = 0; j < matrix.GetLength(1); j++)
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Analyzers/BestGQAPSolutionAnalyzer.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Analyzers/BestGQAPSolutionAnalyzer.cs	(revision 7806)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Analyzers/BestGQAPSolutionAnalyzer.cs	(revision 7807)
@@ -157,6 +157,6 @@
       int bestIndex;
       var tmp = qualities.Select((x, index) => new { Index = index, Value = x.Value });
-      if (maximization) bestIndex = tmp.ChooseMax(x => x.Value).Index;
-      else bestIndex = tmp.ChooseMin(x => x.Value).Index;
+      if (maximization) bestIndex = tmp.MaxItems(x => x.Value).First().Index;
+      else bestIndex = tmp.MinItems(x => x.Value).First().Index;
 
       if (bestKnownQuality == null || HasSolutionImproved(bestKnownQuality.Value, qualities[bestIndex].Value, maximization)) {
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/Crossovers/GQAPPathRelinking.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/Crossovers/GQAPPathRelinking.cs	(revision 7806)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/Crossovers/GQAPPathRelinking.cs	(revision 7807)
@@ -183,9 +183,9 @@
         if (B.Any()) {
           GQAPSolution pi;
-          if (maximization.Value) pi = B.ChooseProportionalRandom(random, 1, x => x.Quality.Value, false, true).First();
-          else pi = B.ChooseProportionalRandom(random, 1, x => 1.0 / x.Quality.Value, false, true).First();
+          if (maximization.Value) pi = B.SampleProportional(random, 1, B.Select(x => x.Quality.Value), false).First();
+          else pi = B.SampleProportional(random, 1, B.Select(x => 1.0 / x.Quality.Value), false).First();
           var diff = IntegerVectorEqualityComparer.GetDifferingIndices(pi.Assignment, target);
           var I = phi.Except(diff);
-          var i = I.ChooseUniformRandom(random);
+          var i = I.SampleRandom(random);
           fix.Add(i);
           nonFix.Remove(i);
@@ -226,6 +226,6 @@
           var T = nonFix.Where(x => x != equipment && assignment[x] == l && demands[x] <= maxSlack);
           if (T.Any()) {
-            int i = T.ChooseProportionalRandom(random, 1, x => demands[x], false, true).First();
-            var j = Enumerable.Range(0, capacities.Length).Where(x => slack[x] >= demands[i]).ChooseUniformRandom(random);
+            int i = T.SampleProportional(random, 1, T.Select(x => demands[x]), false).First();
+            var j = Enumerable.Range(0, capacities.Length).Where(x => slack[x] >= demands[i]).SampleRandom(random);
             result[i] = j;
             slack[j] -= demands[i];
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/Manipulators/DemandEquivalentSwapEquipmentManipluator.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/Manipulators/DemandEquivalentSwapEquipmentManipluator.cs	(revision 7806)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/Manipulators/DemandEquivalentSwapEquipmentManipluator.cs	(revision 7807)
@@ -80,5 +80,5 @@
           groupedLocations[location2].Remove(equipment2);
           if (!groupedLocations[location2].Any()) break;
-          equipment2 = groupedLocations[location2].ChooseUniformRandom(random);
+          equipment2 = groupedLocations[location2].SampleRandom(random);
         }
       }
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/Manipulators/RelocateEquipmentManipluator.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/Manipulators/RelocateEquipmentManipluator.cs	(revision 7806)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/Manipulators/RelocateEquipmentManipluator.cs	(revision 7807)
@@ -79,13 +79,13 @@
       }
 
-      var sourceLocation = overbookedLocations.ChooseUniformRandom(random);
-      int equipmentToRelocate = groupedLocations[sourceLocation.Key].ChooseUniformRandom(random);
+      var sourceLocation = overbookedLocations.SampleRandom(random);
+      int equipmentToRelocate = groupedLocations[sourceLocation.Key].SampleRandom(random);
       var bestFreeLocations = freeLocations.Where(x => capacities[x.Key] > x.Value + demands[equipmentToRelocate]);
 
       if (bestFreeLocations.Any()) { // a feasible solution will still be feasible, an infeasible solution might become feasible
-        var selected = bestFreeLocations.ChooseUniformRandom(random);
+        var selected = bestFreeLocations.SampleRandom(random);
         assignment[equipmentToRelocate] = sourceLocation.Key;
       } else { // the solution will become infeasible
-        sourceLocation = freeLocations.ChooseUniformRandom(random);
+        sourceLocation = freeLocations.SampleRandom(random);
         assignment[equipmentToRelocate] = sourceLocation.Key;
       }
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/SolutionCreators/GreedyRandomizedSolutionCreator.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/SolutionCreators/GreedyRandomizedSolutionCreator.cs	(revision 7806)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/SolutionCreators/GreedyRandomizedSolutionCreator.cs	(revision 7807)
@@ -84,5 +84,5 @@
         do {
           if (L.Any() && random.NextDouble() < threshold) {
-            int l = L.ChooseUniformRandom(random);
+            int l = L.SampleRandom(random);
             L.Remove(l);
             CL.Add(l);
@@ -90,9 +90,9 @@
           }
           if (T.Any()) {
-            int f = T.ChooseUniformRandom(random);
+            int f = T.SampleRandom(random);
             T.Remove(f);
             F.Remove(f);
             CF.Add(f);
-            int l = WithSlackGreaterOrEqual(CL, demands[f], slack).ChooseUniformRandom(random);
+            int l = WithSlackGreaterOrEqual(CL, demands[f], slack).SampleRandom(random);
             assignment.Add(f, l);
             slack[l] -= demands[f];
@@ -108,6 +108,6 @@
           // complete the solution and remember the one with least violation
           while (F.Any()) {
-            var f = F.ChooseMax(x => demands[x]);
-            var l = L.ChooseMax(x => slack[x]);
+            var f = F.MaxItems(x => demands[x]).SampleRandom(random);
+            var l = L.MaxItems(x => slack[x]).SampleRandom(random);
             F.Remove(f);
             assignment.Add(f, l);
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/SolutionCreators/RandomButFeasibleSolutionCreator.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/SolutionCreators/RandomButFeasibleSolutionCreator.cs	(revision 7806)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/SolutionCreators/RandomButFeasibleSolutionCreator.cs	(revision 7807)
@@ -77,5 +77,5 @@
         foreach (var equipment in Enumerable.Range(0, demands.Length).Shuffle(random)) {
           var freeLocations = GetFreeLocations(equipment, demands, slack);
-          assignment[equipment] = freeLocations.ChooseUniformRandom(random);
+          assignment[equipment] = freeLocations.SampleRandom(random);
           slack[assignment[equipment]] -= demands[equipment];
         }
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/SolutionCreators/SlackMinimizationSolutionCreator.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/SolutionCreators/SlackMinimizationSolutionCreator.cs	(revision 7806)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/SolutionCreators/SlackMinimizationSolutionCreator.cs	(revision 7807)
@@ -111,6 +111,6 @@
           // complete the solution
           while (remainingEquipment.Any()) {
-            var f = remainingEquipment.ChooseMax(x => demands[x]);
-            var l = Enumerable.Range(0, capacities.Length).ChooseMax(x => slack[x]);
+            var f = remainingEquipment.MaxItems(x => demands[x]).SampleRandom(random);
+            var l = Enumerable.Range(0, capacities.Length).MaxItems(x => slack[x]).SampleRandom(random);
             remainingEquipment.Remove(f);
             assignment.Add(f, l);
@@ -133,5 +133,5 @@
       if (!feasibleEquipment.Any()) yield break;
       if (depth == 0) {
-        var e = feasibleEquipment.ChooseMax(x => demands[x]);
+        var e = feasibleEquipment.MaxItems(x => demands[x]).First();
         yield return e;
         yield break;
@@ -164,5 +164,5 @@
                 && slack[assignment[e]] + demands[e] - demands[x] >= 0);
           if (!partners.Any()) continue;
-          var f = partners.ChooseUniformRandom(random);
+          var f = partners.SampleRandom(random);
           int h = assignment[e];
           assignment[e] = assignment[f];
