Documentation ¶
Index ¶
- func UseLHS[T any](a, _ T) T
- func UseRHS[T any](_, b T) T
- type Builder
- func (b *Builder[T]) Add(args *CombineArgs[T], v T)
- func (b *Builder[T]) Borrow() Tree[T]
- func (b *Builder[T]) Count() int
- func (b *Builder[T]) Finish() Tree[T]
- func (b Builder[T]) Format(state fmt.State, verb rune)
- func (b *Builder[T]) Get(args *EqArgs[T], el T) *T
- func (b *Builder[T]) Remove(args *EqArgs[T], v T)
- func (b Builder[T]) String() string
- type CombineArgs
- type EqArgs
- type Less
- type NodeArgs
- type Tree
- func (t Tree[T]) Combine(args *CombineArgs[T], u Tree[T]) (out Tree[T])
- func (t Tree[T]) Count() int
- func (t Tree[T]) Difference(args *EqArgs[T], u Tree[T]) (out Tree[T])
- func (t Tree[T]) Equal(args *EqArgs[T], u Tree[T]) bool
- func (t Tree[T]) Format(f fmt.State, verb rune)
- func (t Tree[T]) Gauge() depth.Gauge
- func (t Tree[T]) Get(args *EqArgs[T], v T) *T
- func (t Tree[T]) Intersection(args *EqArgs[T], u Tree[T]) (out Tree[T])
- func (t Tree[T]) Iterator() iterator.Iterator[T]
- func (t Tree[T]) Map(args *CombineArgs[T], f func(v T) T) (out Tree[T])
- func (t Tree[T]) OrderedIterator(less Less[T], n int) iterator.Iterator[T]
- func (t Tree[T]) Reduce(args NodeArgs, r func(values ...T) T) (_ T, _ bool)
- func (t Tree[T]) String() string
- func (t Tree[T]) SubsetOf(args *EqArgs[T], u Tree[T]) bool
- func (t Tree[T]) Vet()
- func (t Tree[T]) Where(args *WhereArgs[T]) (out Tree[T])
- func (t Tree[T]) With(args *CombineArgs[T], v T) (out Tree[T])
- func (t Tree[T]) Without(args *EqArgs[T], v T) (out Tree[T])
- type WhereArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Builder ¶
type Builder[T any] struct { // contains filtered or unexported fields }
Builder[T] provides a more efficient way to build nodes incrementally.
func NewBuilder ¶
func (*Builder[T]) Add ¶
func (b *Builder[T]) Add(args *CombineArgs[T], v T)
type CombineArgs ¶
func DefaultNPCombineArgs ¶
func DefaultNPCombineArgs[T any]() *CombineArgs[T]
DefaultNPCombineArgs provides default combiner with non-parallel behaviour.
func DefaultNPKeyCombineArgs ¶
func DefaultNPKeyCombineArgs[T any]() *CombineArgs[T]
func NewCombineArgs ¶
func NewCombineArgs[T any](ea *EqArgs[T], combine func(a, b T) T) *CombineArgs[T]
func (*CombineArgs[T]) Flip ¶
func (a *CombineArgs[T]) Flip() *CombineArgs[T]
type EqArgs ¶
func DefaultNPEqArgs ¶
DefaultNPEqArgs provides default equality with non-parallel behaviour.
func DefaultNPKeyEqArgs ¶
type NodeArgs ¶
func NewNodeArgs ¶
type Tree ¶
type Tree[T any] struct { // contains filtered or unexported fields }
func (Tree[T]) Intersection ¶
func (Tree[T]) Map ¶
func (t Tree[T]) Map(args *CombineArgs[T], f func(v T) T) (out Tree[T])
func (Tree[T]) OrderedIterator ¶
func (Tree[T]) With ¶
func (t Tree[T]) With(args *CombineArgs[T], v T) (out Tree[T])
Click to show internal directories.
Click to hide internal directories.