public void BubbleTest() { Initialize(); var bubble = new BubbleAlgorithm(Items.ToArray()); bubble.Sort(cancellationTokenSource.Token); var collection = bubble.GetCollection(); for (int i = 0; i < bubble.CollectionSize; i++) { Assert.AreEqual(Sorted[i], collection[i]); } }
/// <summary> /// Sorting an double array with using bubble algorithm. /// </summary> /// <param name="array">Double array to sort.</param> public static void Bubble(double[] array) => BubbleAlgorithm.Sort(array);
/// <summary> /// Sorting an float array with using bubble algorithm. /// </summary> /// <param name="array">Float array to sort.</param> public static void Bubble(float[] array) => BubbleAlgorithm.Sort(array);