Documentation
¶
Index ¶
- type Btree
- func (b *Btree[K, V]) Delete(k K)
- func (b *Btree[K, V]) DeleteWithPrev(k K) (prev V, deleted bool)
- func (b *Btree[K, V]) Draw()
- func (b *Btree[K, V]) Get(k K) (v V)
- func (b *Btree[K, V]) GetWithBool(k K) (v V, ok bool)
- func (b *Btree[K, V]) Len() int
- func (b *Btree[K, V]) Range(callback func(k K, v V) bool)
- func (b *Btree[K, V]) RangePrev(callback func(k K, v V) bool) *Btree[K, V]
- func (b *Btree[K, V]) Set(k K, v V)
- func (b *Btree[K, V]) SetWithPrev(k K, v V) (prev V, replaced bool)
- func (b *Btree[K, V]) TopMax(limit int, callback func(k K, v V) bool)
- func (b *Btree[K, V]) TopMin(limit int, callback func(k K, v V) bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Btree ¶
type Btree[K constraints.Ordered, V any] struct { // contains filtered or unexported fields }
btree头结点
func (*Btree[K, V]) DeleteWithPrev ¶
删除接口, 返回旧值
func (*Btree[K, V]) GetWithBool ¶ added in v0.0.6
找到ok为true 找不到ok为false
func (*Btree[K, V]) SetWithPrev ¶
设置接口, 如果有值, 把prev值带返回, 并且被替换, 没有就新加
Click to show internal directories.
Click to hide internal directories.