@Override protected Number increment(final Number n) { return OWLRealUtils.integerIncrement(n); }
@Override protected Number increment(final Number n) { return OWLRealUtils.integerIncrement(n); }
public Number size() { if (!_finite) throw new IllegalStateException(); else if (_point) return 1; else return integerIncrement(integerDifference(_upper, _lower)); }
public Number size() { if (!_finite) throw new IllegalStateException(); else if (_point) return 1; else return integerIncrement(integerDifference(_upper, _lower)); }
@Override public Number next() { if (_next == null) throw new NoSuchElementException(); final Number n = _next; if (_last != null && OWLRealUtils.compare(_next, _last) == 0) _next = null; else _next = _increment ? OWLRealUtils.integerIncrement(_next) : OWLRealUtils.integerDecrement(_next); return n; }
@Override public Number next() { if (_next == null) throw new NoSuchElementException(); final Number n = _next; if (_last != null && OWLRealUtils.compare(_next, _last) == 0) _next = null; else _next = _increment ? OWLRealUtils.integerIncrement(_next) : OWLRealUtils.integerDecrement(_next); return n; }
@Override public Number size() { if (getLower() == null || getUpper() == null) throw new IllegalStateException(); return OWLRealUtils.integerIncrement(OWLRealUtils.integerDifference(getUpper(), getLower())); }
@Override public Number size() { if (getLower() == null || getUpper() == null) throw new IllegalStateException(); return OWLRealUtils.integerIncrement(OWLRealUtils.integerDifference(getUpper(), getLower())); }
@Deprecated @Override public int size() { if (!_finite) throw new IllegalStateException(); Number sum = 0; for (final IntegerInterval i : _intIntervals) { sum = OWLRealUtils.integerSum(sum, i.size()); if (OWLRealUtils.compare(Integer.MAX_VALUE, sum) <= 0) return Integer.MAX_VALUE; } for (final ContinuousRealInterval i : _decimalIntervals) if (!OWLRealUtils.isInteger(i.getLower())) { sum = OWLRealUtils.integerIncrement(sum); if (OWLRealUtils.compare(Integer.MAX_VALUE, sum) <= 0) return Integer.MAX_VALUE; } for (final ContinuousRealInterval i : _rationalIntervals) if (!OWLRealUtils.isInteger(i.getLower()) && !OWLRealUtils.isRational(i.getLower())) { sum = OWLRealUtils.integerIncrement(sum); if (OWLRealUtils.compare(Integer.MAX_VALUE, sum) <= 0) return Integer.MAX_VALUE; } return sum.intValue(); }
@Deprecated @Override public int size() { if (!_finite) throw new IllegalStateException(); Number sum = 0; for (final IntegerInterval i : _intIntervals) { sum = OWLRealUtils.integerSum(sum, i.size()); if (OWLRealUtils.compare(Integer.MAX_VALUE, sum) <= 0) return Integer.MAX_VALUE; } for (final ContinuousRealInterval i : _decimalIntervals) if (!OWLRealUtils.isInteger(i.getLower())) { sum = OWLRealUtils.integerIncrement(sum); if (OWLRealUtils.compare(Integer.MAX_VALUE, sum) <= 0) return Integer.MAX_VALUE; } for (final ContinuousRealInterval i : _rationalIntervals) if (!OWLRealUtils.isInteger(i.getLower()) && !OWLRealUtils.isRational(i.getLower())) { sum = OWLRealUtils.integerIncrement(sum); if (OWLRealUtils.compare(Integer.MAX_VALUE, sum) <= 0) return Integer.MAX_VALUE; } return sum.intValue(); }
@Override public boolean containsAtLeast(final int n) { if (!_finite || n <= 0) return true; Number sum = 0; for (final IntegerInterval i : _intIntervals) { sum = OWLRealUtils.integerSum(sum, i.size()); if (OWLRealUtils.compare(n, sum) <= 0) return true; } for (final ContinuousRealInterval i : _decimalIntervals) if (!OWLRealUtils.isInteger(i.getLower())) { sum = OWLRealUtils.integerIncrement(sum); if (OWLRealUtils.compare(n, sum) <= 0) return true; } for (final ContinuousRealInterval i : _rationalIntervals) if (!OWLRealUtils.isInteger(i.getLower()) && !OWLRealUtils.isRational(i.getLower())) { sum = OWLRealUtils.integerIncrement(sum); if (OWLRealUtils.compare(n, sum) <= 0) return true; } return false; }
@Override public boolean containsAtLeast(final int n) { if (!_finite || n <= 0) return true; Number sum = 0; for (final IntegerInterval i : _intIntervals) { sum = OWLRealUtils.integerSum(sum, i.size()); if (OWLRealUtils.compare(n, sum) <= 0) return true; } for (final ContinuousRealInterval i : _decimalIntervals) if (!OWLRealUtils.isInteger(i.getLower())) { sum = OWLRealUtils.integerIncrement(sum); if (OWLRealUtils.compare(n, sum) <= 0) return true; } for (final ContinuousRealInterval i : _rationalIntervals) if (!OWLRealUtils.isInteger(i.getLower()) && !OWLRealUtils.isRational(i.getLower())) { sum = OWLRealUtils.integerIncrement(sum); if (OWLRealUtils.compare(n, sum) <= 0) return true; } return false; }
_lower = integerIncrement(lower); else _lower = roundDown(lower);
_lower = integerIncrement(lower); else _lower = roundDown(lower);
lower = cl; else lower = OWLRealUtils.integerIncrement(cl);
lower = cl; else lower = OWLRealUtils.integerIncrement(cl);
lower = OWLRealUtils.integerIncrement(lower); inclusiveLower = true; change = true;
lower = OWLRealUtils.integerIncrement(lower); inclusiveLower = true; change = true;