jsr166y.forkjoin
Class ParallelDoubleArray.WithDoubleMapping

java.lang.Object
  extended by jsr166y.forkjoin.ParallelDoubleArray.WithDoubleMapping
Direct Known Subclasses:
ParallelDoubleArray.WithFilter
Enclosing class:
ParallelDoubleArray

public abstract static class ParallelDoubleArray.WithDoubleMapping
extends java.lang.Object

A modifier for parallel array operations to apply to mappings of elements to doubles, not to the elements themselves


Method Summary
abstract  ParallelDoubleArray all()
          Returns a new ParallelDoubleArray holding elements
abstract  int anyIndex()
          Returns the index of some element matching bound and filter constraints, or -1 if none.
 void apply(Ops.DoubleProcedure procedure)
          Applies the given procedure to elements
 double max()
          Returns the maximum element, or -Double.MAX_VALUE if empty
 double max(Ops.DoubleComparator comparator)
          Returns the maximum element, or -Double.MAX_VALUE if empty
 double min()
          Returns the minimum element, or Double.MAX_VALUE if empty
 double min(Ops.DoubleComparator comparator)
          Returns the minimum element, or Double.MAX_VALUE if empty
 double reduce(Ops.DoubleReducer reducer, double base)
          Returns reduction of elements
abstract  int size()
          Return the number of elements selected using bound or filter restrictions.
 double sum()
          Returns the sum of elements
 ParallelDoubleArray.SummaryStatistics summary()
          Returns summary statistics, using natural comparator
 ParallelDoubleArray.SummaryStatistics summary(Ops.DoubleComparator comparator)
          Returns summary statistics
abstract  ParallelDoubleArray.WithDoubleMapping withMapping(Ops.DoubleMapper mapper)
          Returns an operation prefix that causes a method to operate on mapped elements of the array using the given mapper.
abstract
<U> ParallelDoubleArray.WithMapping<U>
withMapping(Ops.MapperFromDouble<? extends U> mapper)
          Returns an operation prefix that causes a method to operate on mapped elements of the array using the given mapper.
abstract  ParallelDoubleArray.WithLongMapping withMapping(Ops.MapperFromDoubleToLong mapper)
          Returns an operation prefix that causes a method to operate on mapped elements of the array using the given mapper.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 reducer
base - 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 abstract ParallelDoubleArray all()
Returns a new ParallelDoubleArray holding elements

Returns:
a new ParallelDoubleArray holding elements

size

public abstract int size()
Return the number of elements selected using bound or filter restrictions. Note that this method must evaluate all selectors to return its result.

Returns:
the number of elements

anyIndex

public abstract int anyIndex()
Returns the index of some element matching bound and filter constraints, or -1 if none.

Returns:
index of matching element, or -1 if none.

withMapping

public abstract ParallelDoubleArray.WithDoubleMapping withMapping(Ops.DoubleMapper mapper)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given mapper.

Parameters:
mapper - the mapper
Returns:
operation prefix

withMapping

public abstract ParallelDoubleArray.WithLongMapping withMapping(Ops.MapperFromDoubleToLong mapper)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given mapper.

Parameters:
mapper - the mapper
Returns:
operation prefix

withMapping

public abstract <U> ParallelDoubleArray.WithMapping<U> withMapping(Ops.MapperFromDouble<? extends U> mapper)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given mapper.

Parameters:
mapper - the mapper
Returns:
operation prefix