V
- stream elementsT
- elements of the tensor to be producedO
- output (e.g. Tensor<T>
or Tensorbacked<T>
)public abstract class AbstractTensoricCollector<V,T,O> extends java.lang.Object implements java.util.stream.Collector<V,java.util.Map<Position,T>,O>
Collector
which is backed by a map of Position
to an arbitrary
value, from which a Tensor
or Tensorbacked
can be built in the finalization step.Constructor and Description |
---|
AbstractTensoricCollector(java.util.function.Function<V,Position> positionMapper,
java.util.function.Function<V,T> valueMapper) |
Modifier and Type | Method and Description |
---|---|
java.util.function.BiConsumer<java.util.Map<Position,T>,V> |
accumulator() |
java.util.Set<java.util.stream.Collector.Characteristics> |
characteristics() |
java.util.function.BinaryOperator<java.util.Map<Position,T>> |
combiner() |
java.util.function.Supplier<java.util.Map<Position,T>> |
supplier() |