isSubsetOf method

  1. @override
bool isSubsetOf(
  1. IntervalDomain other
)
override

Checks if this value is less than or equal to another (⊑).

Implementation

@override
bool isSubsetOf(IntervalDomain other) {
  if (isBottom) return true;
  if (other.isTop) return true;

  final minOk = other.min == null || (min != null && min! >= other.min!);
  final maxOk = other.max == null || (max != null && max! <= other.max!);

  return minOk && maxOk;
}