Versions in this module Expand all Collapse all v1 v1.0.0 May 10, 2026 Changes in this version + var ErrInvalidInterval = errors.New("rangeable: invalid interval") + type Interval struct + Hi int + Lo int + func NewInterval(lo, hi int) (Interval, error) + func (iv Interval) Contains(coord int) bool + type InvalidIntervalError struct + End int + Start int + func (e *InvalidIntervalError) Error() string + func (e *InvalidIntervalError) Is(target error) bool + type Option func(*config) + func WithIntMaxSentinel(v int) Option + type Rangeable struct + func New[E comparable](opts ...Option) *Rangeable[E] + func (r *Rangeable[E]) At(i int) Slot[E] + func (r *Rangeable[E]) Copy() *Rangeable[E] + func (r *Rangeable[E]) Each(fn func(element E, intervals []Interval)) + func (r *Rangeable[E]) GetRange(element E) []Interval + func (r *Rangeable[E]) Insert(element E, start, end int) error + func (r *Rangeable[E]) IsEmpty() bool + func (r *Rangeable[E]) Size() int + func (r *Rangeable[E]) Transitions(from int, to *int) ([]TransitionEvent[E], error) + func (r *Rangeable[E]) Version() int + type Slot struct + Objs []E + func (s Slot[E]) IsEmpty() bool + func (s Slot[E]) Size() int + type TransitionEvent struct + Coordinate *int + Element E + Kind TransitionKind + type TransitionKind int + const Close + const Open + func (k TransitionKind) String() string