Documentation ¶
Index ¶
- type Color
- type Comparable
- type Direction
- type Interval
- type IntervalTree
- func (t *IntervalTree[T, V]) Find(min T, max T, out []*RBNode[Interval[T], Value[T, V]]) []*RBNode[Interval[T], Value[T, V]]
- func (t *IntervalTree[T, V]) FindIter(min T, max T, cb func(node *RBNode[Interval[T], Value[T, V]]) bool)
- func (t *IntervalTree[T, V]) Insert(min, max T, value V) *RBNode[Interval[T], Value[T, V]]
- type Option
- type RBNode
- type RBTree
- type Set
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comparable ¶
type Interval ¶
type Interval[T constraints.Ordered] struct { Min, Max T }
func (Interval[T]) SupersetOf ¶
type IntervalTree ¶
func NewIntervalTree ¶
func NewIntervalTree[T constraints.Ordered, V any]() *IntervalTree[T, V]
type Option ¶ added in v0.4.0
type Option[T any] struct { // contains filtered or unexported fields }
type RBNode ¶
type RBNode[K Comparable[K], V any] struct { Parent *RBNode[K, V] Children [2]*RBNode[K, V] Key K Values []V // contains filtered or unexported fields }
func NewRBNode ¶
func NewRBNode[K Comparable[K], V any](k K, v V) *RBNode[K, V]
type RBTree ¶
type RBTree[K Comparable[K], V any] struct { Root *RBNode[K, V] NumValues int AllowDuplicates bool Rotated func(node *RBNode[K, V]) }
type Set ¶ added in v0.4.0
type Set[T comparable] map[T]struct{}
type Value ¶
type Value[T constraints.Ordered, V any] struct { MaxSubtree T Value V }
Click to show internal directories.
Click to hide internal directories.