org.codehaus.gpars

groovyx.gpars.extra166y
[Java] Class ParallelDoubleArray

java.lang.Object
  AbstractParallelAnyArray.DUPap
      groovyx.gpars.extra166y.ParallelDoubleArray

public class ParallelDoubleArray
extends DUPap

An array of doubles supporting parallel operations. This class provides methods supporting the same operations as ParallelArray, but specialized for scalar doubles. It additionally provides a few methods specific to numerical values.


Nested Class Summary
class ParallelDoubleArray.AsList

class ParallelDoubleArray.ListIter

static class ParallelDoubleArray.ParallelDoubleArrayIterator

static interface ParallelDoubleArray.SummaryStatistics

Summary statistics for a possibly bounded, filtered, and/or mapped ParallelDoubleArray.

 
Field Summary
ParallelDoubleArray.AsList listView

 
Constructor Summary
protected ParallelDoubleArray(ForkJoinPool executor, double[] array, int limit)

Constructor for use by subclasses to create a new ParallelDoubleArray using the given executor, and initially using the supplied array, with effective size bound by the given limit.

ParallelDoubleArray(ForkJoinPool executor, double[] array)

Trusted internal version of protected constructor.

 
Method Summary
ParallelDoubleArray addAll(double[] other)

Equivalent to asList().addAll but specialized for array arguments and likely to be more efficient.

ParallelDoubleArray addAll(ParallelDoubleArrayWithDoubleMapping other)

Appends all (possibly bounded, filtered, or mapped) elements of the given ParallelDoubleArray, resizing and/or reallocating this array if necessary.

ParallelDoubleArray all()

Returns a new ParallelDoubleArray holding all elements

ParallelDoubleArray allUniqueElements()

Returns a new ParallelDoubleArray containing only the unique elements of this array (that is, without any duplicates).

void appendElement(double e)

void apply(DoubleProcedure procedure)

Applies the given procedure to elements

java.util.List asList()

Returns a view of this ParallelDoubleArray as a List.

int binarySearch(double target)

Assuming this array is sorted, returns the index of an element equal to given target, or -1 if not present.

int binarySearch(double target, DoubleComparator comparator)

Assuming this array is sorted with respect to the given comparator, returns the index of an element equal to given target, or -1 if not present.

static ParallelDoubleArray create(int size, ForkJoinPool executor)

Creates a new ParallelDoubleArray using the given executor and an array of the given size

static ParallelDoubleArray createEmpty(int size, ForkJoinPool executor)

Creates a new ParallelDoubleArray using the given executor and an array of the given size, but with an initial effective size of zero, enabling incremental insertion via ParallelDoubleArray#asList#asList operations.

static ParallelDoubleArray createFromCopy(double[] source, ForkJoinPool executor)

Creates a new ParallelDoubleArray using the given executor and initially holding copies of the given source elements.

static ParallelDoubleArray createFromCopy(int size, double[] source, ForkJoinPool executor)

Creates a new ParallelDoubleArray using an array of the given size, initially holding copies of the given source truncated or padded with zeros to obtain the specified length.

static ParallelDoubleArray createUsingHandoff(double[] handoff, ForkJoinPool executor)

Creates a new ParallelDoubleArray initially using the given array and executor.

ParallelDoubleArray cumulate(DoubleReducer reducer, double base)

Replaces each element with the running cumulation of applying the given reducer.

ParallelDoubleArray cumulateSum()

Replaces each element with the running sum

static ForkJoinPool defaultExecutor()

Returns a common default executor for use in ParallelArrays.

double get(int i)

Returns the element of the array at the given index

double[] getArray()

Returns the underlying array used for computations

ForkJoinPool getExecutor()

Returns the executor used for computations

boolean hasAllEqualElements(ParallelDoubleArrayWithDoubleMapping other)

Returns true if all elements at the same relative positions of this and other array are equal.

int indexOf(double target)

Returns the index of some element equal to given target, or -1 if not present

void insertElementAt(int index, double e)

void insertSlotsAt(int index, int len)

Makes len slots available at index.

java.util.Iterator iterator()

Returns an iterator stepping through each element of the array up to the current limit.

double max(DoubleComparator comparator)

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

double max()

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

double min(DoubleComparator comparator)

Returns the minimum element, or Double.MAX_VALUE if empty

double min()

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

double precumulate(DoubleReducer reducer, double base)

Replaces each element with the cumulation of applying the given reducer to all previous values, and returns the total reduction.

double precumulateSum()

Replaces each element with its prefix sum

double reduce(DoubleReducer reducer, double base)

Returns reduction of elements

ParallelDoubleArray removeAll(DoublePredicate selector)

Removes from the array all elements for which the given selector holds.

ParallelDoubleArray removeConsecutiveDuplicates()

Removes consecutive elements that are equal, shifting others leftward, and possibly decreasing size.

void removeSlotAt(int index)

void removeSlotsAt(int fromIndex, int toIndex)

ParallelDoubleArray replaceWithGeneratedValue(DoubleGenerator generator)

Replaces elements with the results of applying the given generator.

ParallelDoubleArray replaceWithMappedIndex(IntToDouble op)

Replaces elements with the results of applying the given op to their indices.

ParallelDoubleArray replaceWithMappedIndex(IntAndDoubleToDouble op)

Replaces elements with the results of applying the given mapping to each index and current element value

ParallelDoubleArray replaceWithMapping(DoubleOp op)

Replaces elements with the results of applying the given op to their current values.

ParallelDoubleArray replaceWithMapping(BinaryDoubleOp combiner, ParallelDoubleArrayWithDoubleMapping other)

Replaces elements with results of applying op(thisElement, otherElement)

ParallelDoubleArray replaceWithMapping(BinaryDoubleOp combiner, double[] other)

Replaces elements with results of applying op(thisElement, otherElement)

ParallelDoubleArray replaceWithValue(double value)

Replaces elements with the given value.

void resizeArray(int newCap)

int seqIndexOf(double target)

int seqLastIndexOf(double target)

void set(int i, double x)

Sets the element of the array at the given index to the given value

void setLimit(int newLimit)

Ensures that the underlying array can be accessed up to the given upper bound, reallocating and copying the underlying array to expand if necessary.

int size()

Returns the effective size of the underlying array.

ParallelDoubleArray sort(DoubleComparator comparator)

Sorts the array.

ParallelDoubleArray sort()

Sorts the array, assuming all elements are Comparable.

double sum()

Returns the sum of elements

SummaryStatistics summary(DoubleComparator comparator)

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

SummaryStatistics summary()

Returns summary statistics, using natural comparator

java.lang.String toString()

Equivalent to asList().toString()

ParallelDoubleArrayWithBounds withBounds(int firstIndex, int upperBound)

Returns an operation prefix that causes a method to operate only on the elements of the array between firstIndex (inclusive) and upperBound (exclusive).

ParallelDoubleArrayWithFilter withFilter(DoublePredicate selector)

Returns an operation prefix that causes a method to operate only on the elements of the array for which the given selector returns true

ParallelDoubleArrayWithFilter withFilter(BinaryDoublePredicate selector, ParallelDoubleArrayWithDoubleMapping other)

Returns an operation prefix that causes a method to operate only on elements for which the given binary selector returns true

ParallelDoubleArrayWithFilter withIndexedFilter(IntAndDoublePredicate selector)

Returns an operation prefix that causes a method to operate only on elements for which the given indexed selector returns true

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, 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, 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, and produces a new value.

ParallelDoubleArrayWithMapping withMapping(DoubleToObject op)

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

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

 

Field Detail

listView

ParallelDoubleArray.AsList listView


 
Constructor Detail

ParallelDoubleArray

protected ParallelDoubleArray(ForkJoinPool executor, double[] array, int limit)
Constructor for use by subclasses to create a new ParallelDoubleArray using the given executor, and initially using the supplied array, with effective size bound by the given limit. This constructor is designed to enable extensions via subclassing. To create a ParallelDoubleArray, use create, createEmpty, createUsingHandoff or createFromCopy.
Parameters:
executor - the executor
array - the array
limit - the upper bound limit


ParallelDoubleArray

ParallelDoubleArray(ForkJoinPool executor, double[] array)
Trusted internal version of protected constructor.


 
Method Detail

addAll

public ParallelDoubleArray addAll(double[] other)
Equivalent to asList().addAll but specialized for array arguments and likely to be more efficient.
Parameters:
other - the elements to add
Returns:
this (to simplify use in expressions)


addAll

public ParallelDoubleArray addAll(ParallelDoubleArrayWithDoubleMapping other)
Appends all (possibly bounded, filtered, or mapped) elements of the given ParallelDoubleArray, resizing and/or reallocating this array if necessary.
Parameters:
other - the elements to add
Returns:
this (to simplify use in expressions)


all

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


allUniqueElements

public ParallelDoubleArray allUniqueElements()
Returns a new ParallelDoubleArray containing only the unique elements of this array (that is, without any duplicates).
Returns:
the new ParallelDoubleArray


appendElement

final void appendElement(double e)


apply

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


asList

public java.util.List asList()
Returns a view of this ParallelDoubleArray as a List. This List has the same structural and performance characteristics as java.util.ArrayList, and may be used to modify, replace or extend the bounds of the array underlying this ParallelDoubleArray. The methods supported by this list view are not in general implemented as parallel operations. This list is also not itself thread-safe. In particular, performing list updates while other parallel operations are in progress has undefined (and surely undesired) effects.
Returns:
a list view


binarySearch

public int binarySearch(double target)
Assuming this array is sorted, returns the index of an element equal to given target, or -1 if not present. If the array is not sorted, the results are undefined.
Parameters:
target - the element to search for
Returns:
the index or -1 if not present


binarySearch

public int binarySearch(double target, DoubleComparator comparator)
Assuming this array is sorted with respect to the given comparator, returns the index of an element equal to given target, or -1 if not present. If the array is not sorted, the results are undefined.
Parameters:
target - the element to search for
comparator - the comparator
Returns:
the index or -1 if not present


create

public static ParallelDoubleArray create(int size, ForkJoinPool executor)
Creates a new ParallelDoubleArray using the given executor and an array of the given size
Parameters:
size - the array size
executor - the executor


createEmpty

public static ParallelDoubleArray createEmpty(int size, ForkJoinPool executor)
Creates a new ParallelDoubleArray using the given executor and an array of the given size, but with an initial effective size of zero, enabling incremental insertion via ParallelDoubleArray#asList#asList operations.
Parameters:
size - the array size
executor - the executor


createFromCopy

public static ParallelDoubleArray createFromCopy(double[] source, ForkJoinPool executor)
Creates a new ParallelDoubleArray using the given executor and initially holding copies of the given source elements.
Parameters:
source - the source of initial elements
executor - the executor


createFromCopy

public static ParallelDoubleArray createFromCopy(int size, double[] source, ForkJoinPool executor)
Creates a new ParallelDoubleArray using an array of the given size, initially holding copies of the given source truncated or padded with zeros to obtain the specified length.
Parameters:
source - the source of initial elements
size - the array size
executor - the executor


createUsingHandoff

public static ParallelDoubleArray createUsingHandoff(double[] handoff, ForkJoinPool executor)
Creates a new ParallelDoubleArray initially using the given array and executor. In general, the handed off array should not be used for other purposes once constructing this ParallelDoubleArray. The given array may be internally replaced by another array in the course of methods that add or remove elements.
Parameters:
handoff - the array
executor - the executor


cumulate

public ParallelDoubleArray cumulate(DoubleReducer reducer, double base)
Replaces each element with the running cumulation of applying the given reducer. For example, if the contents are the numbers 1, 2, 3, and the reducer operation adds numbers, then after invocation of this method, the contents would be 1, 3, 6 (that is, 1, 1+2, 1+2+3);
Parameters:
reducer - the reducer
base - the result for an empty array
Returns:
this (to simplify use in expressions)


cumulateSum

public ParallelDoubleArray cumulateSum()
Replaces each element with the running sum
Returns:
this (to simplify use in expressions)


defaultExecutor

public static ForkJoinPool defaultExecutor()
Returns a common default executor for use in ParallelArrays. This executor arranges enough parallelism to use most, but not necessarily all, of the available processors on this system.
Returns:
the executor


get

public double get(int i)
Returns the element of the array at the given index
Parameters:
i - the index
Returns:
the element of the array at the given index


getArray

public double[] getArray()
Returns the underlying array used for computations
Returns:
the array


getExecutor

public ForkJoinPool getExecutor()
Returns the executor used for computations
Returns:
the executor


hasAllEqualElements

public boolean hasAllEqualElements(ParallelDoubleArrayWithDoubleMapping other)
Returns true if all elements at the same relative positions of this and other array are equal.
Parameters:
other - the other array
Returns:
true if equal


indexOf

public int indexOf(double target)
Returns the index of some element equal to given target, or -1 if not present
Parameters:
target - the element to search for
Returns:
the index or -1 if not present


insertElementAt

final void insertElementAt(int index, double e)


insertSlotsAt

final void insertSlotsAt(int index, int len)
Makes len slots available at index.


iterator

public java.util.Iterator iterator()
Returns an iterator stepping through each element of the array up to the current limit. This iterator does not support the remove operation. However, a full ListIterator supporting add, remove, and set operations is available via asList.
Returns:
an iterator stepping through each element.


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


max

public double max()
Returns the maximum element, or -Double.MAX_VALUE if empty
Returns:
maximum 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


min

public double min()
Returns the minimum element, or Double.MAX_VALUE if empty,
Returns:
minimum element, or Double.MAX_VALUE if empty


precumulate

public double precumulate(DoubleReducer reducer, double base)
Replaces each element with the cumulation of applying the given reducer to all previous values, and returns the total reduction. For example, if the contents are the numbers 1, 2, 3, and the reducer operation adds numbers, then after invocation of this method, the contents would be 0, 1, 3 (that is, 0, 0+1, 0+1+2, and the return value would be 6 (that is, 1+2+3);
Parameters:
reducer - the reducer
base - the result for an empty array
Returns:
the total reduction


precumulateSum

public double precumulateSum()
Replaces each element with its prefix sum
Returns:
the total sum


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


removeAll

public ParallelDoubleArray removeAll(DoublePredicate selector)
Removes from the array all elements for which the given selector holds.
Parameters:
selector - the selector
Returns:
this (to simplify use in expressions)


removeConsecutiveDuplicates

public ParallelDoubleArray removeConsecutiveDuplicates()
Removes consecutive elements that are equal, shifting others leftward, and possibly decreasing size. This method may be used after sorting to ensure that this ParallelDoubleArray contains a set of unique elements.
Returns:
this (to simplify use in expressions)


removeSlotAt

final void removeSlotAt(int index)


removeSlotsAt

final void removeSlotsAt(int fromIndex, int toIndex)


replaceWithGeneratedValue

public ParallelDoubleArray replaceWithGeneratedValue(DoubleGenerator generator)
Replaces elements with the results of applying the given generator. For example, to fill the array with uniform random values, use replaceWithGeneratedValue(Ops.doubleRandom())
Parameters:
generator - the generator
Returns:
this (to simplify use in expressions)


replaceWithMappedIndex

public ParallelDoubleArray replaceWithMappedIndex(IntToDouble op)
Replaces elements with the results of applying the given op to their indices.
Parameters:
op - the op
Returns:
this (to simplify use in expressions)


replaceWithMappedIndex

public ParallelDoubleArray replaceWithMappedIndex(IntAndDoubleToDouble op)
Replaces elements with the results of applying the given mapping to each index and current element value
Parameters:
op - the op
Returns:
this (to simplify use in expressions)


replaceWithMapping

public ParallelDoubleArray replaceWithMapping(DoubleOp op)
Replaces elements with the results of applying the given op to their current values.
Parameters:
op - the op
Returns:
this (to simplify use in expressions)


replaceWithMapping

public ParallelDoubleArray replaceWithMapping(BinaryDoubleOp combiner, ParallelDoubleArrayWithDoubleMapping other)
Replaces elements with results of applying op(thisElement, otherElement)
throws:
ArrayIndexOutOfBoundsException if other array has fewer elements than this array.
Parameters:
other - the other array
combiner - the combiner
Returns:
this (to simplify use in expressions)


replaceWithMapping

public ParallelDoubleArray replaceWithMapping(BinaryDoubleOp combiner, double[] other)
Replaces elements with results of applying op(thisElement, otherElement)
throws:
ArrayIndexOutOfBoundsException if other array has fewer elements than this array.
Parameters:
other - the other array
combiner - the combiner
Returns:
this (to simplify use in expressions)


replaceWithValue

public ParallelDoubleArray replaceWithValue(double value)
Replaces elements with the given value.
Parameters:
value - the value
Returns:
this (to simplify use in expressions)


resizeArray

final void resizeArray(int newCap)


seqIndexOf

final int seqIndexOf(double target)


seqLastIndexOf

final int seqLastIndexOf(double target)


set

public void set(int i, double x)
Sets the element of the array at the given index to the given value
Parameters:
i - the index
x - the value


setLimit

public final void setLimit(int newLimit)
Ensures that the underlying array can be accessed up to the given upper bound, reallocating and copying the underlying array to expand if necessary. Or, if the given limit is less than the length of the underlying array, causes computations to ignore elements past the given limit.
throws:
IllegalArgumentException if newLimit less than zero.
Parameters:
newLimit - the new upper bound


size

public int size()
Returns the effective size of the underlying array. The effective size is the current limit, if used (see setLimit), or the length of the array otherwise.
Returns:
the effective size of array


sort

public ParallelDoubleArray sort(DoubleComparator comparator)
Sorts the array. Unlike Arrays.sort, this sort does not guarantee that elements with equal keys maintain their relative position in the array.
Parameters:
comparator - the comparator to use
Returns:
this (to simplify use in expressions)


sort

public ParallelDoubleArray sort()
Sorts the array, assuming all elements are Comparable. Unlike Arrays.sort, this sort does not guarantee that elements with equal keys maintain their relative position in the array.
throws:
ClassCastException if any element is not Comparable.
Returns:
this (to simplify use in expressions)


sum

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


summary

public SummaryStatistics summary(DoubleComparator 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, using natural comparator
Returns:
the summary.


toString

public java.lang.String toString()
Equivalent to asList().toString()
Returns:
a string representation


withBounds

public ParallelDoubleArrayWithBounds withBounds(int firstIndex, int upperBound)
Returns an operation prefix that causes a method to operate only on the elements of the array between firstIndex (inclusive) and upperBound (exclusive).
Parameters:
firstIndex - the lower bound (inclusive)
upperBound - the upper bound (exclusive)
Returns:
operation prefix


withFilter

public ParallelDoubleArrayWithFilter withFilter(DoublePredicate selector)
Returns an operation prefix that causes a method to operate only on the elements of the array for which the given selector returns true
Parameters:
selector - the selector
Returns:
operation prefix


withFilter

public ParallelDoubleArrayWithFilter withFilter(BinaryDoublePredicate selector, ParallelDoubleArrayWithDoubleMapping other)
Returns an operation prefix that causes a method to operate only on elements for which the given binary selector returns true
Parameters:
selector - the selector
Returns:
operation prefix


withIndexedFilter

public ParallelDoubleArrayWithFilter withIndexedFilter(IntAndDoublePredicate selector)
Returns an operation prefix that causes a method to operate only on elements for which the given indexed selector returns true
Parameters:
selector - the selector
Returns:
operation prefix


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, 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, 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, and produces a new value.
Parameters:
mapper - the mapper
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 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(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–2012 Václav Pech. All Rights Reserved.