/// <summary>Note: The neededBounds iterator must be unsigned (easier understanding what's happening) </summary> protected internal virtual void AssertIntRangeSplit(int lower, int upper, int precisionStep, bool useBitSet, System.Collections.IEnumerator neededBounds) { OpenBitSet bits = useBitSet?new OpenBitSet(upper - lower + 1):null; NumericUtils.SplitIntRange(new AnonymousClassIntRangeBuilder(lower, upper, useBitSet, bits, neededBounds, this), precisionStep, lower, upper); if (useBitSet) { // after flipping all bits in the range, the cardinality should be zero bits.Flip(0, upper - lower + 1); Assert.IsTrue(bits.IsEmpty(), "The sub-range concenated should match the whole range"); } }
// INFO: Tests for trieCodeLong()/trieCodeInt() not needed because implicitely tested by range filter tests /// <summary>Note: The neededBounds iterator must be unsigned (easier understanding what's happening) </summary> internal virtual void AssertLongRangeSplit(long lower, long upper, int precisionStep, bool useBitSet, IEnumerator <long> neededBounds, IEnumerator <int> neededShifts) { OpenBitSet bits = useBitSet ? new OpenBitSet(upper - lower + 1) : null; NumericUtils.SplitLongRange( new AnonymousClassLongRangeBuilder(lower, upper, useBitSet, bits, neededBounds, neededShifts, this), precisionStep, lower, upper); if (useBitSet) { // after flipping all bits in the range, the cardinality should be zero bits.Flip(0, upper - lower + 1); Assert.IsTrue(bits.IsEmpty(), "The sub-range concenated should match the whole range"); } }