org.codehaus.gpars

groovyx.gpars.extra166y
[Java] Class ParallelDoubleArrayWithMapping

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

public abstract class ParallelDoubleArrayWithMapping
extends DPap

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.


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

 
Method Summary
ParallelArray all()

Returns a new ParallelArray holding elements.

ParallelArray all(java.lang.Class elementType)

Returns a new ParallelArray with the given element type holding elements.

java.lang.Object any()

Returns mapping of some element matching bound and filter constraints, or null if none.

void apply(Procedure procedure)

Applies the given procedure to mapped elements.

java.lang.Object max(java.util.Comparator comparator)

Returns the maximum mapped element, or null if empty.

java.lang.Object max()

Returns the maximum mapped element, or null if empty, assuming that all elements are Comparables.

java.lang.Object min(java.util.Comparator comparator)

Returns the minimum mapped element, or null if empty.

java.lang.Object min()

Returns the minimum mapped element, or null if empty, assuming that all elements are Comparables.

java.lang.Object reduce(Reducer reducer, java.lang.Object base)

Returns reduction of mapped 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.

SummaryStatistics summary(java.util.Comparator comparator)

Returns summary statistics, using the given comparator to locate minimum and maximum elements.

SummaryStatistics summary()

Returns summary statistics, assuming that all elements are Comparables.

ParallelDoubleArrayWithMapping withIndexedMapping(IntAndObjectToObject 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(IntAndObjectToDouble 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(IntAndObjectToLong 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.

ParallelDoubleArrayWithMapping withMapping(Op op)

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

ParallelDoubleArrayWithDoubleMapping withMapping(ObjectToDouble op)

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

ParallelDoubleArrayWithLongMapping withMapping(ObjectToLong op)

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

ParallelDoubleArrayWithMapping withMapping(BinaryOp 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(ObjectAndDoubleToObject 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(ObjectAndLongToObject 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(ObjectAndObjectToDouble 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(ObjectAndDoubleToDouble 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(ObjectAndLongToDouble 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(ObjectAndObjectToLong 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(ObjectAndDoubleToLong 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(ObjectAndLongToLong 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

ParallelDoubleArrayWithMapping

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


 
Method Detail

all

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


all

public ParallelArray all(java.lang.Class elementType)
Returns a new ParallelArray with the given element type holding elements.
Parameters:
elementType - the type of the elements
Returns:
a new ParallelArray holding elements


any

public java.lang.Object any()
Returns mapping of some element matching bound and filter constraints, or null if none.
Returns:
mapping of matching element, or null if none


apply

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


max

public java.lang.Object max(java.util.Comparator comparator)
Returns the maximum mapped element, or null if empty.
Parameters:
comparator - the comparator
Returns:
maximum mapped element, or null if empty


max

public java.lang.Object max()
Returns the maximum mapped element, or null if empty, assuming that all elements are Comparables.
throws:
ClassCastException if any element is not Comparable
Returns:
maximum mapped element, or null if empty


min

public java.lang.Object min(java.util.Comparator comparator)
Returns the minimum mapped element, or null if empty.
Parameters:
comparator - the comparator
Returns:
minimum mapped element, or null if empty


min

public java.lang.Object min()
Returns the minimum mapped element, or null if empty, assuming that all elements are Comparables.
throws:
ClassCastException if any element is not Comparable
Returns:
minimum mapped element, or null if empty


reduce

public java.lang.Object reduce(Reducer reducer, java.lang.Object base)
Returns reduction of mapped 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


summary

public SummaryStatistics summary(java.util.Comparator comparator)
Returns summary statistics, using the given comparator to locate minimum and maximum elements.
Parameters:
comparator - the comparator to use for locating minimum and maximum elements
Returns:
the summary


summary

public SummaryStatistics summary()
Returns summary statistics, assuming that all elements are Comparables.
Returns:
the summary


withIndexedMapping

public ParallelDoubleArrayWithMapping withIndexedMapping(IntAndObjectToObject 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(IntAndObjectToDouble 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(IntAndObjectToLong 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 ParallelDoubleArrayWithMapping withMapping(Op op)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given op applied to current op's results.
Parameters:
op - the op
Returns:
operation prefix


withMapping

public ParallelDoubleArrayWithDoubleMapping withMapping(ObjectToDouble op)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given op applied to current op's results.
Parameters:
op - the op
Returns:
operation prefix


withMapping

public ParallelDoubleArrayWithLongMapping withMapping(ObjectToLong op)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given op applied to current op's results.
Parameters:
op - the op
Returns:
operation prefix


withMapping

public ParallelDoubleArrayWithMapping withMapping(BinaryOp 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(ObjectAndDoubleToObject 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(ObjectAndLongToObject 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(ObjectAndObjectToDouble 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(ObjectAndDoubleToDouble 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(ObjectAndLongToDouble 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 combiner
other - the other array
Returns:
operation prefix


withMapping

public ParallelDoubleArrayWithLongMapping withMapping(ObjectAndObjectToLong 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(ObjectAndDoubleToLong 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(ObjectAndLongToLong 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.