Help us shape the future of Go! Take the 2026 Go Developer Survey

plus

package
v1.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 0 Imported by: 85

Documentation

Overview

Package btree/plus implements the ubiquitous B+ tree. As of this writing, the tree is not quite finished. The delete-node merge functionality needs to be added. There are also some performance improvements that can be made, with some possible concurrency mechanisms.

This is a mutable b-tree so it is not threadsafe.

Performance characteristics: Space: O(n) Insert: O(log n) Search: O(log n)

BenchmarkIteration-8 10000 109347 ns/op BenchmarkInsert-8 3000000 608 ns/op BenchmarkGet-8 3000000 627 ns/op

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Iterator

type Iterator interface {
	// Next will move the iterator to the next position and return
	// a bool indicating if there is a value.
	Next() bool
	// Value returns a Key at the associated iterator position.  Returns
	// nil if the iterator is exhausted or has never been nexted.
	Value() Key
	// contains filtered or unexported methods
}

Iterator will be called with matching keys until either false is returned or we run out of keys to iterate.

type Key

type Key interface {
	// Compare should return an int indicating how this key relates
	// to the provided key.  -1 will indicate less than, 0 will indicate
	// equality, and 1 will indicate greater than.  Duplicate keys
	// are allowed, but duplicate IDs are not.
	Compare(Key) int
}

type Keys

type Keys []Key

Keys is a typed list of Key interfaces.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL