Documentation
¶
Overview ¶
Package skiplist provides the implementation for skiplists.
Index ¶
Constants ¶
View Source
const ( // DefaultMaxLevel is the default max level for a skip list DefaultMaxLevel int = 12 // DefaultProbability is the default probability for deciding levels in a skip list DefaultProbability float64 = 0.25 )
Variables ¶
This section is empty.
Functions ¶
func MaxLevelOption ¶
MaxLevelOption creates an option that sets the max level for a skiplist.
func ProbabilityOption ¶
ProbabilityOption creates an option that sets the probability for deciding levels in a skiplist.
Types ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node represents a node in a skip list.
type SkipList ¶
type SkipList struct {
// contains filtered or unexported fields
}
SkipList implements a skip list data structure, and also satisfies the order.Statistic interface.
Click to show internal directories.
Click to hide internal directories.