Documentation ¶
Index ¶
- type Entry
- type Interval
- type IntervalST
- func (t *IntervalST[T]) Contains(interval Interval) bool
- func (t *IntervalST[T]) Get(interval Interval) (T, bool)
- func (t *IntervalST[T]) Put(interval Interval, value T)
- func (t *IntervalST[T]) Search(p Position) (*Interval, T, bool)
- func (t *IntervalST[T]) SearchAll(p Position) []Entry[T]
- func (t *IntervalST[T]) SearchInterval(interval Interval) (*Interval, T, bool)
- func (t *IntervalST[T]) Values() []T
- type MinPosition
- type Position
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interval ¶
type Interval struct {
Min, Max Position
}
func NewInterval ¶
func (Interval) Intersects ¶
type IntervalST ¶
type IntervalST[T any] struct { // contains filtered or unexported fields }
func (*IntervalST[T]) Contains ¶
func (t *IntervalST[T]) Contains(interval Interval) bool
func (*IntervalST[T]) Get ¶
func (t *IntervalST[T]) Get(interval Interval) (T, bool)
func (*IntervalST[T]) Put ¶
func (t *IntervalST[T]) Put(interval Interval, value T)
Put associates an interval with a value.
NOTE: does *not* check if the interval already exists
func (*IntervalST[T]) SearchAll ¶ added in v0.16.0
func (t *IntervalST[T]) SearchAll(p Position) []Entry[T]
func (*IntervalST[T]) SearchInterval ¶
func (t *IntervalST[T]) SearchInterval(interval Interval) (*Interval, T, bool)
func (*IntervalST[T]) Values ¶
func (t *IntervalST[T]) Values() []T
type MinPosition ¶
type MinPosition struct{}
func (MinPosition) Compare ¶
func (MinPosition) Compare(other Position) int
Click to show internal directories.
Click to hide internal directories.