Package extra166y
Class ParallelDoubleArrayWithLongMapping
java.lang.Object
extra166y.AbstractParallelAnyArray
extra166y.ParallelDoubleArrayWithLongMapping
A prefix view of ParallelDoubleArray 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 ParallelDoubleArray or its other prefix classes.
-
Method Summary
Modifier and TypeMethodDescriptionall()Returns a new ParallelLongArray holding mappingsvoidapply(Ops.LongProcedure procedure) Applies the given procedurelongmax()Returns the maximum element, or Long.MIN_VALUE if emptylongmax(Ops.LongComparator comparator) Returns the maximum element, or Long.MIN_VALUE if emptylongmin()Returns the minimum element, or Long.MAX_VALUE if emptylongmin(Ops.LongComparator comparator) Returns the minimum element, or Long.MAX_VALUE if emptylongreduce(Ops.LongReducer reducer, long base) Returns reduction of mapped elementsReturns an Iterable view to sequentially step through mapped elements also obeying bound and filter constraints, without performing computations to evaluate them in parallellongsum()Returns the sum of elementssummary()Returns summary statistics, using natural comparatorsummary(Ops.LongComparator comparator) Returns summary statisticsabstract ParallelDoubleArrayWithDoubleMappingReturns 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 ParallelDoubleArrayWithLongMappingReturns 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> ParallelDoubleArrayWithMapping<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.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.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.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.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.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.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.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.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.<V,W, X> ParallelDoubleArrayWithMapping <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 ParallelDoubleArrayWithLongMappingReturns an operation prefix that causes a method to operate on mapped elements of the array using the given op.abstract ParallelDoubleArrayWithDoubleMappingReturns an operation prefix that causes a method to operate on mapped elements of the array using the given op.abstract <U> ParallelDoubleArrayWithMapping<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 Details
-
apply
Applies the given procedure- Parameters:
procedure- the procedure
-
reduce
Returns reduction of mapped 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
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
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
Returns summary statistics- Parameters:
comparator- the comparator to use for locating minimum and maximum elements- Returns:
- the summary.
-
summary
Returns summary statistics, using natural comparator- Returns:
- the summary.
-
all
Returns a new ParallelLongArray holding mappings- Returns:
- a new ParallelLongArray holding mappings
-
withMapping
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
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
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, ParallelDoubleArrayWithMapping<W> withMappingX> (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:
IllegalArgumentException- if other array is a filtered view (all filters must precede all mappings).
-
withMapping
public <V> ParallelDoubleArrayWithMapping<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:
IllegalArgumentException- if other array is a filtered view (all filters must precede all mappings).
-
withMapping
public <V> ParallelDoubleArrayWithMapping<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:
IllegalArgumentException- if other array is a filtered view (all filters must precede all mappings).
-
withMapping
public <V,W> ParallelDoubleArrayWithDoubleMapping 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:
IllegalArgumentException- if other array is a filtered view (all filters must precede all mappings).
-
withMapping
public ParallelDoubleArrayWithDoubleMapping 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:
IllegalArgumentException- if other array is a filtered view (all filters must precede all mappings).
-
withMapping
public ParallelDoubleArrayWithDoubleMapping 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:
IllegalArgumentException- if other array is a filtered view (all filters must precede all mappings).
-
withMapping
public <V,W> ParallelDoubleArrayWithLongMapping 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:
IllegalArgumentException- if other array is a filtered view (all filters must precede all mappings).
-
withMapping
public ParallelDoubleArrayWithLongMapping 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:
IllegalArgumentException- if other array is a filtered view (all filters must precede all mappings).
-
withMapping
public ParallelDoubleArrayWithLongMapping 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:
IllegalArgumentException- if other array is a filtered view (all filters must precede all mappings).
-
withIndexedMapping
public abstract <V> ParallelDoubleArrayWithMapping<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 ParallelDoubleArrayWithDoubleMapping 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
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
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
-