Categorygithub.com/google/btree
modulepackage
1.1.3
Repository: https://github.com/google/btree.git
Documentation: pkg.go.dev

# README

BTree implementation for Go

This package provides an in-memory B-Tree implementation for Go, useful as an ordered, mutable data structure.

The API is based off of the wonderful http://godoc.org/github.com/petar/GoLLRB/llrb, and is meant to allow btree to act as a drop-in replacement for gollrb trees.

See http://godoc.org/github.com/google/btree for documentation.

# Functions

Less[T] returns a default LessFunc that uses the '<' operator for types that support it.
New creates a new B-Tree with the given degree.
NewFreeList creates a new free list.
NewFreeListG creates a new free list.
NewG creates a new B-Tree with the given degree.
NewOrderedG creates a new B-Tree for ordered types.
NewWithFreeList creates a new B-Tree that uses the given node free list.
NewWithFreeListG creates a new B-Tree that uses the given node free list.

# Constants

# Structs

BTreeG is a generic implementation of a B-Tree.
FreeListG represents a free list of btree nodes.

# Interfaces

Item represents a single object in the tree.
Ordered represents the set of types for which the '<' operator work.

# Type aliases

Int implements the Item interface for integers.
ItemIteratorG allows callers of {A/De}scend* to iterate in-order over portions of the tree.
LessFunc[T] determines how to order a type 'T'.