Skip to content
/ go-btree Public

BTree provides a simple, ordered, in-memory data structure for Go programs.

License

Notifications You must be signed in to change notification settings

sylr/go-btree

Repository files navigation

sylr.dev/btree/v2 Go Reference codecov

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 https://pkg.go.dev/github.com/petar/GoLLRB/llrb, and is meant to allow btree to act as a drop-in replacement for gollrb trees.

See https://pkg.go.dev/sylr.dev/btree/v2 for documentation.

Fork disclaimer

sylr.dev/btree/v2 is a fork of github.com/google/btree with the following adaptations:

  • The copy-on-write mechanism has been removed
  • The non-generic implementation has been removed
  • The generic implementation now rely on an Item[T] interface.
type Item[T any] interface {
	Less(T) bool
	DeepCopy() T
}

About

BTree provides a simple, ordered, in-memory data structure for Go programs.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages