Documentation
¶
Index ¶
- type AvlTree
- func (a *AvlTree[K, V]) Delete(k K)
- func (a *AvlTree[K, V]) Draw()
- func (a *AvlTree[K, V]) First() (v V, ok bool)
- func (a *AvlTree[K, V]) Get(k K) (v V)
- func (a *AvlTree[K, V]) GetWithBool(k K) (v V, ok bool)
- func (a *AvlTree[K, V]) Last() (v V, ok bool)
- func (a *AvlTree[K, V]) Len() int
- func (a *AvlTree[K, V]) Range(callback func(k K, v V) bool)
- func (a *AvlTree[K, V]) RangePrev(callback func(k K, v V) bool)
- func (a *AvlTree[K, V]) Remove(k K) *AvlTree[K, V]
- func (a *AvlTree[K, V]) Set(k K, v V)
- func (a *AvlTree[K, V]) SetWithPrev(k K, v V) (prev V, replaced bool)
- func (a *AvlTree[K, V]) TopMax(limit int, callback func(k K, v V) bool)
- func (a *AvlTree[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 AvlTree ¶
type AvlTree[K constraints.Ordered, V any] struct { // contains filtered or unexported fields }
avl tree的结构
func (*AvlTree[K, V]) GetWithBool ¶ added in v0.0.6
从avl tree找到需要的值
func (*AvlTree[K, V]) SetWithPrev ¶
设置接口, 如果有值, 把prev值带返回, 并且被替换, 没有就新加
Click to show internal directories.
Click to hide internal directories.