Documentation ¶
Index ¶
- Constants
- type BitMap
- type ISet
- type SetAny
- type SetInt
- type SetStr
- type SetUInt64
- type SkipList
- func (s *SkipList) Delete(index uint64)
- func (s *SkipList) ForEach(f func(node *SkipNode) bool)
- func (s *SkipList) Insert(index uint64, value interface{})
- func (s *SkipList) Length() int32
- func (s *SkipList) Level() int
- func (s *SkipList) Search(index uint64) (*SkipNode, bool)
- func (s *SkipList) SearchRagne(minIndex, maxIndex uint64) ([]*SkipNode, bool)
- func (s *SkipList) Snapshot() []*SkipNode
- type SkipNode
Constants ¶
View Source
const (
PROBABILITY = 0.25
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BitMap ¶
type BitMap struct {
// contains filtered or unexported fields
}
一个uint64有64位可以保存64个数字 length代表bits切片长度, 保存的数字范围[0, length*64-1]
type SetInt ¶
type SetInt map[int]struct{}
type SetStr ¶
type SetStr map[string]struct{}
type SetUInt64 ¶
type SetUInt64 map[uint64]struct{}
type SkipList ¶
type SkipList struct {
// contains filtered or unexported fields
}
========================================================================== 定义跳表
func NewSkipList ¶
func (*SkipList) SearchRagne ¶
Click to show internal directories.
Click to hide internal directories.