concepts.math.range.Range#
- class Range[source]#
- Bases: - object- A range of values, handles wraparound. - Methods - contains(x)- Return whether the value is in the range. - difference(config1, config2)- Return the difference between two configurations. - make_in_range(value)- Return the value if it is in range, otherwise return None. - sample()- Sample a value from the range. - Attributes - The lower bound of the range. - The upper bound of the range. - Whether the range wraps around, i.e. whether the upper bound is adjacent to the lower bound. - __new__(**kwargs)#