enriched package¶
Submodules¶
enriched.datetime_interval_set module¶
Interval and interval set subclassed to work with datetime values.
This serves also as prototype for other extension to specific ‘real-like’ domains for subclassing and which methods should be overridden (and how).
Everything else is inherited from the superclasses in a way that takes care of ensuring operations (utils, builders, algebraic operations) will stay in the correct domain.
- class enriched.datetime_interval_set.DatetimeInterval(begin, end)[source]¶
Bases:
BaseIntervalDomain-specific interval subclass. Below are the methods that one should override when creating a subclass.
For these intervals, values are datetime.
- static builder()[source]¶
Return a builder configured to make peg pairs into these types of intervals.
- metric¶
alias of
DatetimeMetric
- serializing_class = 'DatetimeInterval'¶
- serializing_version = 1¶
- class enriched.datetime_interval_set.DatetimeIntervalSet(intervals)[source]¶
Bases:
BaseIntervalSetDomain-specific interval-set subclass. Below are the methods that one should override when creating a subclass.
For these interval sets, values are datetime.
- static builder()[source]¶
Return a builder configured to make peg pairs into these types of interval sets.
- interval_class¶
alias of
DatetimeInterval
- serializing_class = 'DatetimeIntervalSet'¶
- serializing_version = 1¶
enriched.string_interval_set module¶
An example of interval/set kit that does not admit an underlying metric.
String form an ordered set, with e.g. “a” < “aa” < “aaa” < “aab” < “ab” < “b” and infinite new strings insertable inbetween, with no well-defined ‘distance’,
Useful mostly as a sanity check that a metric is not assumed anywhere.
Also, rather arbitrarily (for testing purposes), string-intervals are set to non-serializable.
Please refer to the Datetime case for relevant comments on the structure.
- class enriched.string_interval_set.StringInterval(begin, end)[source]¶
Bases:
BaseIntervalIntervals between strings.
- class enriched.string_interval_set.StringIntervalSet(intervals)[source]¶
Bases:
BaseIntervalSetA string-interval-set.
- interval_class¶
alias of
StringInterval