Feature: domains
New module domains
implements classes to represent parameter domains.
Main features are
-
in
-testing -
next_[largest,smallest,closest]
methods that return numbers from the domain next largest/smallest/closest to a test value -
&
composition, which returns a domain that is least inclusive out of the two operands (similar toset.intersection
)
Could also imagine |
composition (similar to set.union
).
Implemented so far are
-
DiscreteInterval
: basically likerange(start, stop)
. -
ContinuousInterval
: same except not limited to ints. -
ReciprocalDiscreteInterval
: a floating numerator divided by a discrete interval. -
BoundedSet
: Subclass offrozenset
with bounds.