Documentation ¶
Overview ¶
Package lazylog provides an interval tree backed by an AVL tree. In addition, the interval tree supports shifting intervals in amortized constant time using lazy shifts.
Index ¶
Constants ¶
View Source
const ShiftThreshold = -1
ShiftThreshold is the number of shifts to accumulate before applying all shifts.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
func (*Tree) Add ¶
Adds the given interval to the tree. An id should also be given to the interval to uniquely identify it if any other intervals begin at the same location.
func (*Tree) FindLargest ¶
Search for the interval starting at pos with the given id. Returns nil if no such interval exists.
func (*Tree) RemoveAndShift ¶
Click to show internal directories.
Click to hide internal directories.