示例#1
0
        public IBitset Or(IBitset otherSet)
        {
            IBitset result = this.Clone();

            result.OrWith(otherSet);
            return(result);
        }
示例#2
0
        public virtual void OrWithTest()
        {
            int[] first  = SetGenerator.GetRandomArray(TEST_SET_LENGTH);
            int[] second = SetGenerator.GetRandomArray(TEST_SET_LENGTH);
            int[] result = first.Union(second).ToArray();

            IBitset testSet = CreateSetFromIndices(first, TEST_SET_LENGTH);

            testSet.OrWith(CreateSetFromIndices(second, TEST_SET_LENGTH));

            Assert.AreEqual(CreateSetFromIndices(result, TEST_SET_LENGTH), testSet, generateMessage("OrWith", first, second, result));
        }