reduce

package
v1.2.103 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReduceOp3

func NewReduceOp3(seed optional.Optional, reducer binary.BiFunction, combiner binary.BiFunction) terminal.Operation

Types

type AccumulatingSink

type AccumulatingSink interface {
	Combine(other AccumulatingSink)
}

*

  • A type of {@code TerminalSink} that implements an associative reducing
  • operation on elements of type {@code T} and producing a result of type
  • {@code R}. *
  • @param <T> the type of input element to the combining operation
  • @param <R> the result type
  • @param <K> the type of the {@code AccumulatingSink}.

type ReduceOp

type ReduceOp struct {
	terminal.TODOOperation
	// contains filtered or unexported fields
}

func NewReduceOp

func NewReduceOp(sinkNewer func() *ReducingSink) *ReduceOp

func (ReduceOp) EvaluateParallel

func (op ReduceOp) EvaluateParallel(ctx context.Context, spliterator spliterator.Spliterator) optional.Optional

func (ReduceOp) EvaluateSequential

func (op ReduceOp) EvaluateSequential(ctx context.Context, spliterator spliterator.Spliterator) optional.Optional

func (ReduceOp) MakeSink

func (op ReduceOp) MakeSink() *ReducingSink

type ReduceTask

type ReduceTask struct {
	terminal.TODOTask
	// contains filtered or unexported fields
}

func NewReduceTask

func NewReduceTask(op ReduceOp, spliterator spliterator.Spliterator) *ReduceTask

func NewReduceTaskFromParent

func NewReduceTaskFromParent(parent *ReduceTask, spliterator spliterator.Spliterator) *ReduceTask

func (*ReduceTask) DoLeaf

func (t *ReduceTask) DoLeaf(ctx context.Context) terminal.Sink

func (*ReduceTask) MakeChild

func (t *ReduceTask) MakeChild(spliterator spliterator.Spliterator) terminal.Task

func (*ReduceTask) OnCompletion

func (t *ReduceTask) OnCompletion(caller terminal.Task)

type ReducingSink

type ReducingSink struct {
	terminal.TODOSink
	// contains filtered or unexported fields
}

func NewReducingSink

func NewReducingSink(seed optional.Optional, reducer binary.BiFunction, combiner binary.BiFunction) *ReducingSink

func (*ReducingSink) Accept

func (sink *ReducingSink) Accept(t interface{})

func (*ReducingSink) Begin

func (sink *ReducingSink) Begin(size int)

func (*ReducingSink) Combine

func (sink *ReducingSink) Combine(other terminal.Sink)

func (*ReducingSink) Get

func (sink *ReducingSink) Get() optional.Optional

Jump to

Keyboard shortcuts

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