Documentation
¶
Overview ¶
Package itree provides an interval tree implementation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comparable ¶
Comparable is an interface for types that can be compared.
type ITree ¶
type ITree[K Comparable[K], V any] struct { // contains filtered or unexported fields }
ITree represents an interval tree.
func NewITree ¶
func NewITree[K Comparable[K], V any]() *ITree[K, V]
NewITree creates a new interval tree.
type Interval ¶
type Interval[V Comparable[V]] struct { Low V High V }
Interval represents the `[Low, High]` interval (inclusive).
func NewInterval ¶
func NewInterval[V Comparable[V]](low, high V) Interval[V]
NewInterval creates a new interval with the given low and high values.
type Node ¶
type Node[K Comparable[K], V any] struct { // contains filtered or unexported fields }
Node represents a node in the interval tree.
Click to show internal directories.
Click to hide internal directories.