node

package
v0.62.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAnd

func NewAnd(left, right Node, reverse bool) *nodeAnd

func NewNAnd

func NewNAnd(negative, regular Node, reverse bool) *nodeNAnd

func NewNot

func NewNot(child Node, minVal, maxVal uint32, reverse bool) *nodeNot

func NewOr

func NewOr(left, right Node, reverse bool) *nodeOr

func NewRange

func NewRange(minVal, maxVal uint32, reverse bool) *nodeRange

func TreeFold

func TreeFold[V any](op func(V, V) V, def V, values []V) V

Types

type LessFn

type LessFn func(uint32, uint32) bool

func GetLessFn

func GetLessFn(reverse bool) LessFn

type Node

type Node interface {
	fmt.Stringer // for testing
	Next() (id uint32, has bool)
}

func BuildORTree

func BuildORTree(nodes []Node, reverse bool) Node

func MakeStaticNodes

func MakeStaticNodes(data [][]uint32) []Node

MakeStaticNodes is currently used only for tests

func NewStatic

func NewStatic(data []uint32, reverse bool) Node

type Sourced

type Sourced interface {
	fmt.Stringer // for testing
	// aggregation need source
	NextSourced() (id uint32, source uint32, has bool)
}

func BuildORTreeAgg

func BuildORTreeAgg(nodes []Node, reverse bool) Sourced

func NewNodeOrAgg

func NewNodeOrAgg(left, right Sourced, reverse bool) Sourced

func NewSourcedNodeWrapper

func NewSourcedNodeWrapper(d Node, source int) Sourced

func WrapWithSource

func WrapWithSource(nodes []Node) []Sourced

Jump to

Keyboard shortcuts

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