org.codehaus.gpars

groovyx.gpars.extra166y
[Java] Class ParallelDoubleArrayWithLongMapping

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

public abstract class ParallelDoubleArrayWithLongMapping
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
ParallelDoubleArrayWithLongMapping(ForkJoinPool ex, int origin, int fence, double[] array)

 
Method Summary
ParallelLongArray all()

Returns a new ParallelLongArray holding mappings

void apply(LongProcedure procedure)

Applies the given procedure

long max()

Returns the maximum element, or Long.MIN_VALUE if empty

long max(LongComparator comparator)

Returns the maximum element, or Long.MIN_VALUE if empty

long min()

Returns the minimum element, or Long.MAX_VALUE if empty

long min(LongComparator comparator)

Returns the minimum element, or Long.MAX_VALUE if empty

long reduce(LongReducer reducer, long 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

long sum()

Returns the sum of elements

SummaryStatistics summary(LongComparator comparator)

Returns summary statistics

SummaryStatistics summary()

Returns summary statistics, using natural comparator

ParallelDoubleArrayWithMapping withIndexedMapping(IntAndLongToObject 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(IntAndLongToDouble 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(IntAndLongToLong 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(LongToDouble op)

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

ParallelDoubleArrayWithLongMapping withMapping(LongOp op)

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

ParallelDoubleArrayWithMapping withMapping(LongToObject op)

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

ParallelDoubleArrayWithMapping withMapping(LongAndObjectToObject 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(LongAndDoubleToObject 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(LongAndLongToObject 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(LongAndObjectToDouble 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(LongAndDoubleToDouble 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(LongAndLongToDouble 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(LongAndObjectToLong 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(LongAndDoubleToLong 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(BinaryLongOp 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

ParallelDoubleArrayWithLongMapping

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


 
Method Detail

all

public ParallelLongArray all()
Returns a new ParallelLongArray holding mappings
Returns:
a new ParallelLongArray holding mappings


apply

public void apply(LongProcedure procedure)
Applies the given procedure
Parameters:
procedure - the procedure


max

public long max()
Returns the maximum element, or Long.MIN_VALUE if empty
Returns:
maximum element, or Long.MIN_VALUE if empty


max

public long max(LongComparator comparator)
Returns the maximum element, or Long.MIN_VALUE if empty
Parameters:
comparator - the comparator
Returns:
maximum element, or Long.MIN_VALUE if empty


min

public long min()
Returns the minimum element, or Long.MAX_VALUE if empty
Returns:
minimum element, or Long.MAX_VALUE if empty


min

public long min(LongComparator comparator)
Returns the minimum element, or Long.MAX_VALUE if empty
Parameters:
comparator - the comparator
Returns:
minimum element, or Long.MAX_VALUE if empty


reduce

public long reduce(LongReducer reducer, long 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


sum

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


summary

public SummaryStatistics summary(LongComparator 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(IntAndLongToObject 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(IntAndLongToDouble 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(IntAndLongToLong 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(LongToDouble 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(LongOp 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(LongToObject 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(LongAndObjectToObject 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(LongAndDoubleToObject 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(LongAndLongToObject 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(LongAndObjectToDouble 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(LongAndDoubleToDouble 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(LongAndLongToDouble 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(LongAndObjectToLong 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(LongAndDoubleToLong 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(BinaryLongOp 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.