Skip to content

Releases: salt-die/mind_the_gaps

New compactified string construction.

17 Feb 15:03
Compare
Choose a tag to compare

Changed in v0.5.0

  • from_string now allows singleton intervals to be expressed more compactly like, e.g., "{[0]}".
  • The string representation of Gaps uses above compactification.

Fix incorrect result for overlaps on singletons.

17 Feb 12:51
Compare
Choose a tag to compare

Changes in v0.4.0

  • Fix incorrect result for overlaps on singletons.
  • Refactor _merge. Logic is simpler while handling above case correctly.
  • Add tests for these singletons.
  • Additional tests covering more complex interval sets.

Minor fixes for Endpoint and Gaps binary operators.

17 Feb 05:50
Compare
Choose a tag to compare

Changes in v0.3.4

  • Endpoint and Gaps binary operators return NotImplemented when relevant.
  • Gaps binary operators now correctly return subclass type.

Non-minimally expressed sets of intervals cleaned up during initialization.

11 Feb 00:03
Compare
Choose a tag to compare

Changes

  • Non-minimally expressed sets of intervals cleaned up during initialization.
  • Endpoint.__lt__ and Endpoint.__eq__ now make more mathematical sense.
  • Added py.typed

Minor bug fixes. (Re-release.)

10 Feb 10:20
Compare
Choose a tag to compare

No longer allowed to create gaps with intervals such as {(5, 5)} and {[0], [0]} since these aren't minimally expressed.

contains no longer errors for values larger than the last endpoint.

Minor bug fixes.

10 Feb 06:41
Compare
Choose a tag to compare

No longer allowed to create gaps with intervals such as {(5, 5)} since this isn't minimally expressed.

__contains__ no longer errors for values larger than the last endpoint.

Removed `Gap.__invert__()` and made `Var` public.

07 Dec 04:47
Compare
Choose a tag to compare

Gap.__invert__ makes poor assumptions about the bounds of a Gaps generic type. It's better not to make any assumptions and remove this operator. PositiveInfinity and NegativeInfinity are also removed with this change. Gaps can still be inverted "by hand", e.g. my_gaps ^ Gaps([some_smallest_value < x, x < some_largest_value]).

Var is now public. Useful if x is already in your namespace.

Create gaps from strings or from `x`.

28 Nov 11:27
Compare
Choose a tag to compare
Pre-release

Create gaps from a string or from x, e.g.,

>>> from mind_the_gaps import Gaps, x
>>> 0 <= x
Endpoint(value=0, boundary='[')
>>> x < 1
Endpoint(value=1, boundary=')')
>>> print(Gaps([0 <= x, x < 1]))
{[0, 1)}
>>> print(Gaps.from_string("{[0, 1)}"))
{[0, 1)}

Initial alpha release.

26 Nov 10:34
Compare
Choose a tag to compare
Pre-release

Mind the gaps!

Gaps are sets of mutually exclusive sorted intervals that can be union-ed, intersected, xor-ed, or subtract-ed.