Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SortUint64s ¶ added in v1.6.1
func SortUint64s(x []uint64)
SortUint64s sorts a slice of uint64s.
Types ¶
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
Tree implements a radix tree. This can be treated as a Dictionary abstract data type. The main advantage over a standard hash map is prefix-based lookups and ordered iteration. The tree is safe for concurrent access.
func NewFromMap ¶
NewFromMap returns a new tree containing the keys from an existing map
func (*Tree) DeletePrefix ¶
DeletePrefix is used to delete the subtree under a prefix Returns how many nodes were deleted Use this to delete large subtrees efficiently
func (*Tree) Insert ¶
Insert is used to add a newentry or update an existing entry. Returns if inserted.
Click to show internal directories.
Click to hide internal directories.