Package extra166y
Class ParallelLongArrayWithLongMapping
- java.lang.Object
-
- extra166y.AbstractParallelAnyArray
-
- extra166y.ParallelLongArrayWithLongMapping
-
- Direct Known Subclasses:
ParallelLongArrayWithFilter
public abstract class ParallelLongArrayWithLongMapping extends AbstractParallelAnyArray
A prefix view of ParallelLongArray that causes operations to apply to mappings of elements, not to the elements themselves. Instances of this class may be constructed only via prefix methods of ParallelLongArray or its other prefix classes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ParallelLongArray
all()
Returns a new ParallelLongArray holding elementsvoid
apply(Ops.LongProcedure procedure)
Applies the given procedure to elementslong
max()
Returns the maximum element, or Long.MIN_VALUE if emptylong
max(Ops.LongComparator comparator)
Returns the maximum element, or Long.MIN_VALUE if emptylong
min()
Returns the minimum element, or Long.MAX_VALUE if emptylong
min(Ops.LongComparator comparator)
Returns the minimum element, or Long.MAX_VALUE if emptylong
reduce(Ops.LongReducer reducer, long base)
Returns reduction of elementsjava.lang.Iterable<java.lang.Long>
sequentially()
Returns an Iterable view to sequentially step through mapped elements also obeying bound and filter constraints, without performing computations to evaluate them in parallellong
sum()
Returns the sum of elementsParallelLongArray.SummaryStatistics
summary()
Returns summary statistics, using natural comparatorParallelLongArray.SummaryStatistics
summary(Ops.LongComparator comparator)
Returns summary statisticsabstract ParallelLongArrayWithDoubleMapping
withIndexedMapping(Ops.IntAndLongToDouble mapper)
Returns an operation prefix that causes a method to operate on mappings of this array using the given mapper that accepts as arguments an element's current index and value (as mapped by preceding mappings, if any), and produces a new value.abstract ParallelLongArrayWithLongMapping
withIndexedMapping(Ops.IntAndLongToLong mapper)
Returns an operation prefix that causes a method to operate on mappings of this array using the given mapper that accepts as arguments an element's current index and value (as mapped by preceding mappings, if any), and produces a new value.abstract <V> ParallelLongArrayWithMapping<V>
withIndexedMapping(Ops.IntAndLongToObject<? extends V> mapper)
Returns an operation prefix that causes a method to operate on mappings of this array using the given mapper that accepts as arguments an element's current index and value (as mapped by preceding mappings, if any), and produces a new value.ParallelLongArrayWithLongMapping
withMapping(Ops.BinaryLongOp combiner, ParallelLongArrayWithLongMapping other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.ParallelLongArrayWithDoubleMapping
withMapping(Ops.LongAndDoubleToDouble combiner, ParallelDoubleArrayWithDoubleMapping other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.ParallelLongArrayWithLongMapping
withMapping(Ops.LongAndDoubleToLong combiner, ParallelDoubleArrayWithDoubleMapping other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.<V> ParallelLongArrayWithMapping<V>
withMapping(Ops.LongAndDoubleToObject<? extends V> combiner, ParallelDoubleArrayWithDoubleMapping other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.ParallelLongArrayWithDoubleMapping
withMapping(Ops.LongAndLongToDouble combiner, ParallelLongArrayWithLongMapping other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.<V> ParallelLongArrayWithMapping<V>
withMapping(Ops.LongAndLongToObject<? extends V> combiner, ParallelLongArrayWithLongMapping other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.<V,W>
ParallelLongArrayWithDoubleMappingwithMapping(Ops.LongAndObjectToDouble<? super V> combiner, ParallelArrayWithMapping<W,V> other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.<V,W>
ParallelLongArrayWithLongMappingwithMapping(Ops.LongAndObjectToLong<? super V> combiner, ParallelArrayWithMapping<W,V> other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.<V,W,X>
ParallelLongArrayWithMapping<W>withMapping(Ops.LongAndObjectToObject<? super V,? extends W> combiner, ParallelArrayWithMapping<X,V> other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.abstract ParallelLongArrayWithLongMapping
withMapping(Ops.LongOp op)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given op.abstract ParallelLongArrayWithDoubleMapping
withMapping(Ops.LongToDouble op)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given op.abstract <U> ParallelLongArrayWithMapping<U>
withMapping(Ops.LongToObject<? extends U> op)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given op.-
Methods inherited from class extra166y.AbstractParallelAnyArray
anyIndex, isEmpty, size
-
-
-
-
Method Detail
-
apply
public void apply(Ops.LongProcedure procedure)
Applies the given procedure to elements- Parameters:
procedure
- the procedure
-
reduce
public long reduce(Ops.LongReducer reducer, long base)
Returns reduction of elements- Parameters:
reducer
- the reducerbase
- the result for an empty array- Returns:
- reduction
-
min
public long min()
Returns the minimum element, or Long.MAX_VALUE if empty- Returns:
- minimum element, or Long.MAX_VALUE if empty
-
min
public long min(Ops.LongComparator comparator)
Returns the minimum element, or Long.MAX_VALUE if empty- Parameters:
comparator
- the comparator- Returns:
- minimum element, or Long.MAX_VALUE if empty
-
max
public long max()
Returns the maximum element, or Long.MIN_VALUE if empty- Returns:
- maximum element, or Long.MIN_VALUE if empty
-
max
public long max(Ops.LongComparator comparator)
Returns the maximum element, or Long.MIN_VALUE if empty- Parameters:
comparator
- the comparator- Returns:
- maximum element, or Long.MIN_VALUE if empty
-
sum
public long sum()
Returns the sum of elements- Returns:
- the sum of elements
-
summary
public ParallelLongArray.SummaryStatistics summary(Ops.LongComparator comparator)
Returns summary statistics- Parameters:
comparator
- the comparator to use for locating minimum and maximum elements- Returns:
- the summary.
-
summary
public ParallelLongArray.SummaryStatistics summary()
Returns summary statistics, using natural comparator- Returns:
- the summary.
-
all
public ParallelLongArray all()
Returns a new ParallelLongArray holding elements- Returns:
- a new ParallelLongArray holding elements
-
withMapping
public abstract ParallelLongArrayWithLongMapping withMapping(Ops.LongOp op)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given op.- Parameters:
op
- the op- Returns:
- operation prefix
-
withMapping
public abstract ParallelLongArrayWithDoubleMapping withMapping(Ops.LongToDouble op)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given op.- Parameters:
op
- the op- Returns:
- operation prefix
-
withMapping
public abstract <U> ParallelLongArrayWithMapping<U> withMapping(Ops.LongToObject<? extends U> op)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given op.- Parameters:
op
- the op- Returns:
- operation prefix
-
withMapping
public <V,W,X> ParallelLongArrayWithMapping<W> withMapping(Ops.LongAndObjectToObject<? super V,? extends W> combiner, ParallelArrayWithMapping<X,V> other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.- Parameters:
combiner
- the combinerother
- the other array- Returns:
- operation prefix
- Throws:
java.lang.IllegalArgumentException
- if other array is a filtered view (all filters must precede all mappings).
-
withMapping
public <V> ParallelLongArrayWithMapping<V> withMapping(Ops.LongAndDoubleToObject<? extends V> combiner, ParallelDoubleArrayWithDoubleMapping other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.- Parameters:
combiner
- the combinerother
- the other array- Returns:
- operation prefix
- Throws:
java.lang.IllegalArgumentException
- if other array is a filtered view (all filters must precede all mappings).
-
withMapping
public <V> ParallelLongArrayWithMapping<V> withMapping(Ops.LongAndLongToObject<? extends V> combiner, ParallelLongArrayWithLongMapping other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.- Parameters:
combiner
- the combinerother
- the other array- Returns:
- operation prefix
- Throws:
java.lang.IllegalArgumentException
- if other array is a filtered view (all filters must precede all mappings).
-
withMapping
public <V,W> ParallelLongArrayWithDoubleMapping withMapping(Ops.LongAndObjectToDouble<? super V> combiner, ParallelArrayWithMapping<W,V> other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.- Parameters:
combiner
- the combinerother
- the other array- Returns:
- operation prefix
- Throws:
java.lang.IllegalArgumentException
- if other array is a filtered view (all filters must precede all mappings).
-
withMapping
public ParallelLongArrayWithDoubleMapping withMapping(Ops.LongAndDoubleToDouble combiner, ParallelDoubleArrayWithDoubleMapping other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.- Parameters:
combiner
- the combinerother
- the other array- Returns:
- operation prefix
- Throws:
java.lang.IllegalArgumentException
- if other array is a filtered view (all filters must precede all mappings).
-
withMapping
public ParallelLongArrayWithDoubleMapping withMapping(Ops.LongAndLongToDouble combiner, ParallelLongArrayWithLongMapping other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.- Parameters:
combiner
- the combinerother
- the other array- Returns:
- operation prefix
- Throws:
java.lang.IllegalArgumentException
- if other array is a filtered view (all filters must precede all mappings).
-
withMapping
public <V,W> ParallelLongArrayWithLongMapping withMapping(Ops.LongAndObjectToLong<? super V> combiner, ParallelArrayWithMapping<W,V> other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.- Parameters:
combiner
- the combinerother
- the other array- Returns:
- operation prefix
- Throws:
java.lang.IllegalArgumentException
- if other array is a filtered view (all filters must precede all mappings).
-
withMapping
public ParallelLongArrayWithLongMapping withMapping(Ops.LongAndDoubleToLong combiner, ParallelDoubleArrayWithDoubleMapping other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.- Parameters:
combiner
- the combinerother
- the other array- Returns:
- operation prefix
- Throws:
java.lang.IllegalArgumentException
- if other array is a filtered view (all filters must precede all mappings).
-
withMapping
public ParallelLongArrayWithLongMapping withMapping(Ops.BinaryLongOp combiner, ParallelLongArrayWithLongMapping other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.- Parameters:
combiner
- the combinerother
- the other array- Returns:
- operation prefix
- Throws:
java.lang.IllegalArgumentException
- if other array is a filtered view (all filters must precede all mappings).
-
withIndexedMapping
public abstract <V> ParallelLongArrayWithMapping<V> withIndexedMapping(Ops.IntAndLongToObject<? extends V> mapper)
Returns an operation prefix that causes a method to operate on mappings of this array using the given mapper that accepts as arguments an element's current index and value (as mapped by preceding mappings, if any), and produces a new value.- Parameters:
mapper
- the mapper- Returns:
- operation prefix
-
withIndexedMapping
public abstract ParallelLongArrayWithDoubleMapping withIndexedMapping(Ops.IntAndLongToDouble mapper)
Returns an operation prefix that causes a method to operate on mappings of this array using the given mapper that accepts as arguments an element's current index and value (as mapped by preceding mappings, if any), and produces a new value.- Parameters:
mapper
- the mapper- Returns:
- operation prefix
-
withIndexedMapping
public abstract ParallelLongArrayWithLongMapping withIndexedMapping(Ops.IntAndLongToLong mapper)
Returns an operation prefix that causes a method to operate on mappings of this array using the given mapper that accepts as arguments an element's current index and value (as mapped by preceding mappings, if any), and produces a new value.- Parameters:
mapper
- the mapper- Returns:
- operation prefix
-
sequentially
public java.lang.Iterable<java.lang.Long> sequentially()
Returns an Iterable view to sequentially step through mapped elements also obeying bound and filter constraints, without performing computations to evaluate them in parallel- Returns:
- the Iterable view
-
-