https://github.com/invenia/intervals.jl
Non-iterable ranges
https://github.com/invenia/intervals.jl
inclusivity intervals julia julialang
Last synced: 3 months ago
JSON representation
Non-iterable ranges
- Host: GitHub
- URL: https://github.com/invenia/intervals.jl
- Owner: invenia
- License: mit
- Created: 2018-01-17T00:00:03.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-01-03T14:51:16.000Z (over 1 year ago)
- Last Synced: 2025-04-08T22:23:04.492Z (3 months ago)
- Topics: inclusivity, intervals, julia, julialang
- Language: Julia
- Homepage:
- Size: 771 KB
- Stars: 35
- Watchers: 5
- Forks: 18
- Open Issues: 74
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Intervals
[](https://invenia.github.io/Intervals.jl/stable)
[](https://invenia.github.io/Intervals.jl/latest)
[](https://github.com/Invenia/Intervals.jl/actions?query=workflow%3ACI)
[](https://codecov.io/gh/invenia/Intervals.jl)
[](https://github.com/invenia/BlueStyle)This package defines:
* `AbstractInterval`, along with its subtypes:
* `Interval{T,L,R}`, which represents a non-iterable range between two endpoints of type `T`
with left/right bounds types respectively being `L` and `R`
* `AnchoredInterval{P,T,L,R}`, which represents a non-iterable range defined by a single
value `anchor::T` and the value type `P` which represents the span of the range. Left/right bounds types are specifed
by `L` and `R` respectively
* `HourEnding`, a type alias for `AnchoredInterval{Hour(-1)}`
* `HourBeginning`, a type alias for `AnchoredInterval{Hour(1)}`
* `HE` and `HB`, pseudoconstructors for `HourEnding` and `HourBeginning` that round the
anchor up (`HE`) or down (`HB`) to the nearest hour
* `Bound`, abstract type for all possible bounds type classifications:
* `Closed`, indicating the endpoint value of the interval is included
* `Open`, indicating the endpoint value of the interval is not included
* `Unbounded`, indicating the endpoint value is effectively infinite