revised = revisedDecimals; else if (OWLRealUtils.isRational(n)) revised = revisedRationals; else
revised = revisedDecimals; else if (OWLRealUtils.isRational(n)) revised = revisedRationals; else
if (OWLRealUtils.isRational(n)) for (final ContinuousRealInterval i : _rationalIntervals) if (i.contains(n))
if (OWLRealUtils.isRational(n)) for (final ContinuousRealInterval i : _rationalIntervals) if (i.contains(n))
@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; }