package
3.3.0+incompatible
Repository: https://github.com/google/agi.git
Documentation: pkg.go.dev

# Functions

Contains returns true if the value is found inside on of the intervals.
IndexOf returns the index of the span the value is a part of, or -1 if not found.
Intersect finds the intervals from the list that overlap with the specified span.
Merge adds a span to the list, merging it with existing spans if it overlaps them, and returns the index of that span.
Remove strips the specified span from the list, cutting it out of any overlapping intervals.
Replace cuts the span out of any existing intervals, and then adds a new interval, and returns its index.
Search finds the first interval in the list that the supplied predicate returns true for.
Update modifies the values in `span` by applying the function `f`.

# Structs

U64Range is an interval specified by a beginning and size.
U64Span is the base interval type understood by the algorithms in this package.

# Interfaces

List is the interface to an object that can be used as an interval list by the algorithms in this package.
MutableList is a mutable form of a List.

# Type aliases

Predicate is used as the condition for a Search.
U64RangeList implements List for an array of U64Range intervals.
U64SpanList implements List for an array of U64Span intervals.