org.codehaus.gpars

groovyx.gpars.extra166y
[Java] Class ParallelLongArrayWithDoubleMapping

java.lang.Object
  groovyx.gpars.extra166y.AbstractParallelAnyArray.LPap
      groovyx.gpars.extra166y.ParallelLongArrayWithDoubleMapping

public abstract class ParallelLongArrayWithDoubleMapping
extends LPap

A prefix view of ParallelLongArray 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 ParallelLongArray or its other prefix classes.


Constructor Summary
ParallelLongArrayWithDoubleMapping(ForkJoinPool ex, int origin, int fence, long[] array)

 
Method Summary
ParallelDoubleArray all()

Returns a new ParallelDoubleArray holding mappings.

void apply(DoubleProcedure procedure)

Applies the given procedure.

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

double sum()

Returns the sum of elements.

SummaryStatistics summary(DoubleComparator comparator)

Returns summary statistics.

SummaryStatistics summary()

Returns summary statistics, using natural comparator.

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

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

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

ParallelLongArrayWithLongMapping withMapping(DoubleToLong op)

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

ParallelLongArrayWithDoubleMapping withMapping(DoubleOp op)

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

ParallelLongArrayWithMapping withMapping(DoubleToObject op)

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

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

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

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

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

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

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

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

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

ParallelLongArrayWithLongMapping 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

ParallelLongArrayWithDoubleMapping

ParallelLongArrayWithDoubleMapping(ForkJoinPool ex, int origin, int fence, long[] array)


 
Method Detail

all

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


apply

public void apply(DoubleProcedure procedure)
Applies the given procedure.
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 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 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 ParallelLongArrayWithMapping 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 ParallelLongArrayWithDoubleMapping 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 ParallelLongArrayWithLongMapping 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 ParallelLongArrayWithLongMapping 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 ParallelLongArrayWithDoubleMapping 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 ParallelLongArrayWithMapping 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 ParallelLongArrayWithMapping 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 ParallelLongArrayWithMapping 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 ParallelLongArrayWithMapping 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 ParallelLongArrayWithDoubleMapping 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 ParallelLongArrayWithDoubleMapping 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 ParallelLongArrayWithDoubleMapping 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 ParallelLongArrayWithLongMapping 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 ParallelLongArrayWithLongMapping 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 ParallelLongArrayWithLongMapping 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.