Skip to content

Releases: AlexandreDecan/portion

IntervalDict.combine

26 Sep 07:42
Compare
Choose a tag to compare

IntervalDict has a .combine method to merge its keys and values with another IntervalDict.

Discrete iteration & dict-like data structure

13 Sep 08:42
Compare
Choose a tag to compare
  • Discrete iteration on the values of an interval with iterate.
  • Map intervals to data with the dict-like IntervalDict structure.
  • Faster comparisons between arbitrary values and intervals.
  • Deprecate permissive in .overlaps in favour of adjacent.
  • Fix .union when intervals share a bound, one inclusive and one exclusive (#12).
  • Fix .overlaps when intervals share a lower bound, and one interval is contained within the other one (#13).

Interval bounds & transformations

15 Dec 10:19
Compare
Choose a tag to compare
  • Intervals have a left, lower, upper, and right attribute that refer to its enclosure.
  • Intervals have a replace method to create new intervals based on the current one. This method accepts both values and functions.
  • Intervals have an apply method to apply a function on the underlying atomic intervals.
  • Intervals can be compared with single values as well.
  • I.empty() returns the same instance to save memory.
  • Infinities are singleton objects.
  • Set len(I.empty()) = 1 and I.empty()[0] == I.empty().to_atomic() for consistency.

Import from and export to Python built-in data types.

06 Dec 12:42
Compare
Choose a tag to compare

Import from and export to Python built-in data types (a list of 4-uples) with from_data and to_data (#6).

Add support for customized infinity representation in to_string and from_string (#3).

29 Aug 19:27
Compare
Choose a tag to compare

Fix #2 - Invalid .overlaps

29 Jul 08:45
Compare
Choose a tag to compare

Fix invalid repr for atomic singleton intervals

21 Jun 11:20
Compare
Choose a tag to compare
1.5.3

Fix invalid repr for singleton intervals

Fix invalid comparisons between AtomicInterval and Interval

15 Jun 12:29
Compare
Choose a tag to compare

1.5.1 - Bug fix for empty intervals

25 Apr 07:01
Compare
Choose a tag to compare

Fix #1 - empty intervals now resolve to (I.inf, -I.inf)

1.5.0

17 Apr 13:08
Compare
Choose a tag to compare
1.5.0