public void bottom_1()
{
Accord.Math.Random.Generator.Seed = 0;
for (int size = 1; size < 1000; size *= 10)
{
for (int n = 1; n < size; n += 10)
{
for (int i = 0; i < 100; i++)
{
int[] random = UniformDiscreteDistribution.Random(size);
int[] sorted = random.Sorted();
int[] expectedBottom = sorted.First(n);
int[] bottomIdx = random.Bottom(n);
int[] actualBottom = random.Submatrix(bottomIdx);
Assert.IsTrue(actualBottom.IsEqual(expectedBottom));
int[] expectedTop = sorted.Last(n).Reversed();
int[] topIdx = random.Top(n);
int[] actualTop = random.Submatrix(topIdx);
Assert.IsTrue(actualTop.IsEqual(expectedTop));
}
}
}
}