BitsetsNET.Tests.SetGenerator.GetContiguousArray C# (CSharp) Метод

GetContiguousArray() публичный статический Метод

public static GetContiguousArray ( int start, int end ) : int[]
start int
end int
Результат int[]
        public static int[] GetContiguousArray(int start, int end)
        {
            int[] set = new int[end - start];
            for (int i = start; i < end; i++)
            {
                set[i - start] = i;
            }

            return set;
        }

Usage Example

Пример #1
0
        public virtual void CardinalityTest()
        {
            int[]   set     = SetGenerator.GetContiguousArray(1, 5000);
            IBitset testSet = CreateSetFromIndices(set, set.Max() + 1);

            int expected = set.Length;
            int actual   = testSet.Cardinality();

            Assert.AreEqual(expected, actual);
        }
All Usage Examples Of BitsetsNET.Tests.SetGenerator::GetContiguousArray