tree

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NLargeData = 128
)

Variables

This section is empty.

Functions

This section is empty.

Types

type N

type N[T point.P] struct {
	// contains filtered or unexported fields
}

func New

func New[T point.P](o O[T]) *N[T]

New recursively constructs a node object given the input data.

An input of an empty dataset will result in a leaf node being returned.

func (*N[T]) Axis

func (n *N[T]) Axis() vnd.D

func (*N[T]) Data

func (n *N[T]) Data() []T

func (*N[T]) Insert

func (n *N[T]) Insert(p T)

func (*N[T]) K

func (n *N[T]) K() vnd.D

func (*N[T]) L

func (n *N[T]) L() node.N[T]

func (*N[T]) Leaf

func (n *N[T]) Leaf() bool

func (*N[T]) Nil

func (n *N[T]) Nil() bool

func (*N[T]) Pivot

func (n *N[T]) Pivot() vnd.V

func (*N[T]) R

func (n *N[T]) R() node.N[T]

func (*N[T]) Remove

func (n *N[T]) Remove(v vnd.V, f func(p T) bool) (T, bool)

type O

type O[T point.P] struct {
	Data []T
	K    vnd.D

	// N is the nominal leaf size of a node.
	N int

	Axis vnd.D
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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