org.codehaus.gpars

groovyx.gpars.extra166y
[Java] Class ParallelDoubleArrayWithDoubleMapping

java.lang.Object
  groovyx.gpars.extra166y.AbstractParallelAnyArray.DPap
      groovyx.gpars.extra166y.ParallelDoubleArrayWithDoubleMapping

public abstract class ParallelDoubleArrayWithDoubleMapping
extends DPap

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.


Constructor Summary
ParallelDoubleArrayWithDoubleMapping(ForkJoinPool ex, int origin, int fence, double[] array)

 
Method Summary
ParallelDoubleArray all()

Returns a new ParallelDoubleArray holding elements.

void apply(DoubleProcedure procedure)

Applies the given procedure to elements.

double max()

Returns the maximum element, or -Double.MAX_VALUE if empty.

double max(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(DoubleComparator comparator)

Returns the minimum element, or Double.MAX_VALUE if empty.

double reduce(DoubleReducer reducer, double base)

Returns reduction of elements.

java.lang.Iterable 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.

double sum()

Returns the sum of elements.

SummaryStatistics summary(DoubleComparator comparator)

Returns summary statistics.

SummaryStatistics summary()

Returns summary statistics, using natural comparator.

ParallelDoubleArrayWithMapping withIndexedMapping(IntAndDoubleToObject 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.

ParallelDoubleArrayWithDoubleMapping withIndexedMapping(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.

ParallelDoubleArrayWithLongMapping withIndexedMapping(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.

ParallelDoubleArrayWithDoubleMapping withMapping(DoubleOp op)

Returns an operation prefix that causes a method to operate on mapped elements of the array using the given op.

ParallelDoubleArrayWithLongMapping withMapping(DoubleToLong op)

Returns an operation prefix that causes a method to operate on mapped elements of the array using the given op.

ParallelDoubleArrayWithMapping withMapping(DoubleToObject op)

Returns an operation prefix that causes a method to operate on mapped elements of the array using the given op.

ParallelDoubleArrayWithMapping withMapping(DoubleAndObjectToObject combiner, ParallelArrayWithMapping other)

Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.

ParallelDoubleArrayWithMapping withMapping(DoubleAndDoubleToObject combiner, ParallelDoubleArrayWithDoubleMapping other)

Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.

ParallelDoubleArrayWithMapping withMapping(DoubleAndLongToObject combiner, ParallelLongArrayWithLongMapping other)

Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.

ParallelDoubleArrayWithDoubleMapping withMapping(DoubleAndObjectToDouble combiner, ParallelArrayWithMapping other)

Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.

ParallelDoubleArrayWithDoubleMapping withMapping(BinaryDoubleOp combiner, ParallelDoubleArrayWithDoubleMapping other)

Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.

ParallelDoubleArrayWithDoubleMapping withMapping(DoubleAndLongToDouble combiner, ParallelLongArrayWithLongMapping other)

Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.

ParallelDoubleArrayWithLongMapping withMapping(DoubleAndObjectToLong combiner, ParallelArrayWithMapping other)

Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.

ParallelDoubleArrayWithLongMapping withMapping(DoubleAndDoubleToLong combiner, ParallelDoubleArrayWithDoubleMapping other)

Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.

ParallelDoubleArrayWithLongMapping withMapping(DoubleAndLongToLong combiner, ParallelLongArrayWithLongMapping other)

Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.

 

Constructor Detail

ParallelDoubleArrayWithDoubleMapping

ParallelDoubleArrayWithDoubleMapping(ForkJoinPool ex, int origin, int fence, double[] array)


 
Method Detail

all

public ParallelDoubleArray all()
Returns a new ParallelDoubleArray holding elements.
Returns:
a new ParallelDoubleArray holding elements


apply

public void apply(DoubleProcedure procedure)
Applies the given procedure to elements.
Parameters:
procedure - the procedure


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(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


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(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


reduce

public double reduce(DoubleReducer reducer, double base)
Returns reduction of elements.
Parameters:
reducer - the reducer
base - the result for an empty array
Returns:
reduction


sequentially

public java.lang.Iterable 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


sum

public double sum()
Returns the sum of elements.
Returns:
the sum of elements


summary

public SummaryStatistics summary(DoubleComparator comparator)
Returns summary statistics.
Parameters:
comparator - the comparator to use for locating minimum and maximum elements
Returns:
the summary


summary

public SummaryStatistics summary()
Returns summary statistics, using natural comparator.
Returns:
the summary


withIndexedMapping

public ParallelDoubleArrayWithMapping withIndexedMapping(IntAndDoubleToObject 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 ParallelDoubleArrayWithDoubleMapping withIndexedMapping(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 ParallelDoubleArrayWithLongMapping withIndexedMapping(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


withMapping

public ParallelDoubleArrayWithDoubleMapping withMapping(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 ParallelDoubleArrayWithLongMapping withMapping(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 ParallelDoubleArrayWithMapping withMapping(DoubleToObject 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 ParallelDoubleArrayWithMapping withMapping(DoubleAndObjectToObject combiner, ParallelArrayWithMapping other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.
throws:
IllegalArgumentException if other array is a filtered view (all filters must precede all mappings)
Parameters:
combiner - the combiner
other - the other array
Returns:
operation prefix


withMapping

public ParallelDoubleArrayWithMapping withMapping(DoubleAndDoubleToObject combiner, ParallelDoubleArrayWithDoubleMapping other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.
throws:
IllegalArgumentException if other array is a filtered view (all filters must precede all mappings)
Parameters:
combiner - the combiner
other - the other array
Returns:
operation prefix


withMapping

public ParallelDoubleArrayWithMapping withMapping(DoubleAndLongToObject combiner, ParallelLongArrayWithLongMapping other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.
throws:
IllegalArgumentException if other array is a filtered view (all filters must precede all mappings)
Parameters:
combiner - the combiner
other - the other array
Returns:
operation prefix


withMapping

public ParallelDoubleArrayWithDoubleMapping withMapping(DoubleAndObjectToDouble combiner, ParallelArrayWithMapping other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.
throws:
IllegalArgumentException if other array is a filtered view (all filters must precede all mappings)
Parameters:
combiner - the combiner
other - the other array
Returns:
operation prefix


withMapping

public ParallelDoubleArrayWithDoubleMapping withMapping(BinaryDoubleOp combiner, ParallelDoubleArrayWithDoubleMapping other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.
throws:
IllegalArgumentException if other array is a filtered view (all filters must precede all mappings)
Parameters:
combiner - the combiner
other - the other array
Returns:
operation prefix


withMapping

public ParallelDoubleArrayWithDoubleMapping withMapping(DoubleAndLongToDouble combiner, ParallelLongArrayWithLongMapping other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.
throws:
IllegalArgumentException if other array is a filtered view (all filters must precede all mappings)
Parameters:
combiner - the combiner
other - the other array
Returns:
operation prefix


withMapping

public ParallelDoubleArrayWithLongMapping withMapping(DoubleAndObjectToLong combiner, ParallelArrayWithMapping other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.
throws:
IllegalArgumentException if other array is a filtered view (all filters must precede all mappings)
Parameters:
combiner - the combiner
other - the other array
Returns:
operation prefix


withMapping

public ParallelDoubleArrayWithLongMapping withMapping(DoubleAndDoubleToLong combiner, ParallelDoubleArrayWithDoubleMapping other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.
throws:
IllegalArgumentException if other array is a filtered view (all filters must precede all mappings)
Parameters:
combiner - the combiner
other - the other array
Returns:
operation prefix


withMapping

public ParallelDoubleArrayWithLongMapping withMapping(DoubleAndLongToLong combiner, ParallelLongArrayWithLongMapping other)
Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.
throws:
IllegalArgumentException if other array is a filtered view (all filters must precede all mappings)
Parameters:
combiner - the combiner
other - the other array
Returns:
operation prefix


 

Copyright © 2008–2013 Václav Pech. All Rights Reserved.