Documentation
¶
Index ¶
- Variables
- type Comparator
- type Iterator
- type Skiplist
- func (this *Skiplist) Close() (err error)
- func (this *Skiplist) Count() int
- func (this *Skiplist) Delete(key interface{}) (iter *Iterator, err error)
- func (this *Skiplist) DeleteRange(key1, key2 interface{}) (iter *Iterator, err error)
- func (this *Skiplist) Insert(key, value interface{}) (*node, error)
- func (this *Skiplist) Level() int
- func (this *Skiplist) PrintStats()
- func (this *Skiplist) RealCount(i int) (c int)
- func (this *Skiplist) Select(key interface{}) (iter *Iterator, err error)
- func (this *Skiplist) SelectRange(key1, key2 interface{}) (iter *Iterator, err error)
- func (this *Skiplist) SetCompare(compare Comparator) (err error)
- func (this *Skiplist) SetMaxLevel(l int) (err error)
- func (this *Skiplist) SetProbability(p float32) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultMaxLevel int = 12 DefaultProbability float32 = 0.25 )
Functions ¶
This section is empty.
Types ¶
type Comparator ¶
var ( BuiltinLessThan Comparator = builtinLessThan BuiltinGreaterThan Comparator = builtinGreaterThan BuiltinEqual Comparator = builtinEqual )
type Skiplist ¶
type Skiplist struct {
// contains filtered or unexported fields
}
func New ¶
func New(compare Comparator) *Skiplist
func (*Skiplist) DeleteRange ¶
func (*Skiplist) PrintStats ¶
func (this *Skiplist) PrintStats()
func (*Skiplist) Select ¶
Select a list of nodes that match the key. The results are stored in the array pointed to by results
func (*Skiplist) SelectRange ¶
func (*Skiplist) SetCompare ¶
func (this *Skiplist) SetCompare(compare Comparator) (err error)
func (*Skiplist) SetMaxLevel ¶
func (*Skiplist) SetProbability ¶
Click to show internal directories.
Click to hide internal directories.