Package extra166y
Class ParallelDoubleArrayWithDoubleMapping
- java.lang.Object
-
- extra166y.AbstractParallelAnyArray
-
- extra166y.ParallelDoubleArrayWithDoubleMapping
-
- Direct Known Subclasses:
ParallelDoubleArrayWithFilter
public abstract class ParallelDoubleArrayWithDoubleMapping extends AbstractParallelAnyArray
A prefix view of ParallelArray 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
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ParallelDoubleArrayall()Returns a new ParallelDoubleArray holding elementsvoidapply(Ops.DoubleProcedure procedure)Applies the given procedure to elementsdoublemax()Returns the maximum element, or -Double.MAX_VALUE if emptydoublemax(Ops.DoubleComparator comparator)Returns the maximum element, or -Double.MAX_VALUE if emptydoublemin()Returns the minimum element, or Double.MAX_VALUE if emptydoublemin(Ops.DoubleComparator comparator)Returns the minimum element, or Double.MAX_VALUE if emptydoublereduce(Ops.DoubleReducer reducer, double base)Returns reduction of elementsjava.lang.Iterable<java.lang.Double>sequentially()Returns an Iterable view to sequentially step through mapped elements also obeying bound and filter constraints, without performing computations to evaluate them in paralleldoublesum()Returns the sum of elementsParallelDoubleArray.SummaryStatisticssummary()Returns summary statistics, using natural comparatorParallelDoubleArray.SummaryStatisticssummary(Ops.DoubleComparator comparator)Returns summary statisticsabstract ParallelDoubleArrayWithDoubleMappingwithIndexedMapping(Ops.IntAndDoubleToDouble 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 ParallelDoubleArrayWithLongMappingwithIndexedMapping(Ops.IntAndDoubleToLong 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> ParallelDoubleArrayWithMapping<V>withIndexedMapping(Ops.IntAndDoubleToObject<? 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.ParallelDoubleArrayWithDoubleMappingwithMapping(Ops.BinaryDoubleOp combiner, ParallelDoubleArrayWithDoubleMapping other)Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.ParallelDoubleArrayWithLongMappingwithMapping(Ops.DoubleAndDoubleToLong combiner, ParallelDoubleArrayWithDoubleMapping other)Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.<V> ParallelDoubleArrayWithMapping<V>withMapping(Ops.DoubleAndDoubleToObject<? 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.ParallelDoubleArrayWithDoubleMappingwithMapping(Ops.DoubleAndLongToDouble combiner, ParallelLongArrayWithLongMapping other)Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.ParallelDoubleArrayWithLongMappingwithMapping(Ops.DoubleAndLongToLong combiner, ParallelLongArrayWithLongMapping other)Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.<V> ParallelDoubleArrayWithMapping<V>withMapping(Ops.DoubleAndLongToObject<? 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>
ParallelDoubleArrayWithDoubleMappingwithMapping(Ops.DoubleAndObjectToDouble<? 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>
ParallelDoubleArrayWithLongMappingwithMapping(Ops.DoubleAndObjectToLong<? 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.DoubleAndObjectToObject<? 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 ParallelDoubleArrayWithDoubleMappingwithMapping(Ops.DoubleOp op)Returns an operation prefix that causes a method to operate on mapped elements of the array using the given op.abstract ParallelDoubleArrayWithLongMappingwithMapping(Ops.DoubleToLong op)Returns 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.DoubleToObject<? 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.DoubleProcedure procedure)
Applies the given procedure to elements- Parameters:
procedure- the procedure
-
reduce
public double reduce(Ops.DoubleReducer reducer, double base)
Returns reduction of elements- Parameters:
reducer- the reducerbase- the result for an empty array- Returns:
- reduction
-
min
public double min()
Returns the minimum element, or Double.MAX_VALUE if empty- Returns:
- minimum element, or Double.MAX_VALUE if empty
-
min
public double min(Ops.DoubleComparator comparator)
Returns the minimum element, or Double.MAX_VALUE if empty- Parameters:
comparator- the comparator- Returns:
- minimum element, or Double.MAX_VALUE if empty
-
max
public double max()
Returns the maximum element, or -Double.MAX_VALUE if empty- Returns:
- maximum element, or -Double.MAX_VALUE if empty
-
max
public double max(Ops.DoubleComparator comparator)
Returns the maximum element, or -Double.MAX_VALUE if empty- Parameters:
comparator- the comparator- Returns:
- maximum element, or -Double.MAX_VALUE if empty
-
sum
public double sum()
Returns the sum of elements- Returns:
- the sum of elements
-
summary
public ParallelDoubleArray.SummaryStatistics summary(Ops.DoubleComparator comparator)
Returns summary statistics- Parameters:
comparator- the comparator to use for locating minimum and maximum elements- Returns:
- the summary.
-
summary
public ParallelDoubleArray.SummaryStatistics summary()
Returns summary statistics, using natural comparator- Returns:
- the summary.
-
all
public ParallelDoubleArray all()
Returns a new ParallelDoubleArray holding elements- Returns:
- a new ParallelDoubleArray holding elements
-
withMapping
public abstract ParallelDoubleArrayWithDoubleMapping withMapping(Ops.DoubleOp 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 ParallelDoubleArrayWithLongMapping withMapping(Ops.DoubleToLong 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> ParallelDoubleArrayWithMapping<U> withMapping(Ops.DoubleToObject<? 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> ParallelDoubleArrayWithMapping<W> withMapping(Ops.DoubleAndObjectToObject<? 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> ParallelDoubleArrayWithMapping<V> withMapping(Ops.DoubleAndDoubleToObject<? 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> ParallelDoubleArrayWithMapping<V> withMapping(Ops.DoubleAndLongToObject<? 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> ParallelDoubleArrayWithDoubleMapping withMapping(Ops.DoubleAndObjectToDouble<? 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 ParallelDoubleArrayWithDoubleMapping withMapping(Ops.BinaryDoubleOp 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 ParallelDoubleArrayWithDoubleMapping withMapping(Ops.DoubleAndLongToDouble 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> ParallelDoubleArrayWithLongMapping withMapping(Ops.DoubleAndObjectToLong<? 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 ParallelDoubleArrayWithLongMapping withMapping(Ops.DoubleAndDoubleToLong 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 ParallelDoubleArrayWithLongMapping withMapping(Ops.DoubleAndLongToLong 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> ParallelDoubleArrayWithMapping<V> withIndexedMapping(Ops.IntAndDoubleToObject<? 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.IntAndDoubleToDouble 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 ParallelDoubleArrayWithLongMapping withIndexedMapping(Ops.IntAndDoubleToLong 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.Double> 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
-
-