Browse Source

IntegerInterval:: contains

Former-commit-id: 76cbc553ec [formerly ca09cce781]
Former-commit-id: 74efc00e6d
tempestpy_adaptions
sjunges 8 years ago
parent
commit
7c85f0c46a
  1. 20
      src/storage/IntegerInterval.h

20
src/storage/IntegerInterval.h

@ -37,6 +37,26 @@ namespace storm {
return true; return true;
} }
bool contains(IntegerInterval const& i) const {
if (hasLeftBound()) {
if (!i.hasLeftBound()) {
return false;
}
if (leftBound.get() > i.getLeftBound().get()) {
return false;
}
}
if (hasRightBound()) {
if (!i.hasRightBound()) {
return false;
}
if (rightBound.get() < i.getRightBound().get()) {
return false;
}
}
return true;
}
boost::optional<int64_t> getLeftBound() const { boost::optional<int64_t> getLeftBound() const {
return leftBound; return leftBound;
} }

Loading…
Cancel
Save