groovyx.gpars.extra166y
Class ParallelDoubleArrayWithFilter

java.lang.Object
  extended by groovyx.gpars.extra166y.AbstractParallelAnyArray
      extended by groovyx.gpars.extra166y.AbstractParallelAnyArray.DPap
          extended by groovyx.gpars.extra166y.ParallelDoubleArrayWithDoubleMapping
              extended by groovyx.gpars.extra166y.ParallelDoubleArrayWithFilter
Direct Known Subclasses:
AbstractParallelAnyArray.DFPap, AbstractParallelAnyArray.DRPap, ParallelDoubleArrayWithBounds

public abstract class ParallelDoubleArrayWithFilter
extends ParallelDoubleArrayWithDoubleMapping

A prefix view of ParallelDoubleArray that causes operations to apply only to elements for which a selector returns true. Instances of this class may be constructed only via prefix methods of ParallelDoubleArray or its other prefix classes.


Nested Class Summary
 
Nested classes/interfaces inherited from class groovyx.gpars.extra166y.AbstractParallelAnyArray
AbstractParallelAnyArray.AndPredicate<T>, AbstractParallelAnyArray.DDCPap, AbstractParallelAnyArray.DDMPap, AbstractParallelAnyArray.DFDCPap, AbstractParallelAnyArray.DFDMPap, AbstractParallelAnyArray.DFLCPap, AbstractParallelAnyArray.DFLMPap, AbstractParallelAnyArray.DFOCPap<U>, AbstractParallelAnyArray.DFOMPap<U>, AbstractParallelAnyArray.DFPap, AbstractParallelAnyArray.DLCPap, AbstractParallelAnyArray.DLMPap, AbstractParallelAnyArray.DOCPap<U>, AbstractParallelAnyArray.DOMPap<U>, AbstractParallelAnyArray.DPap, AbstractParallelAnyArray.DRDCPap, AbstractParallelAnyArray.DRDMPap, AbstractParallelAnyArray.DRLCPap, AbstractParallelAnyArray.DRLMPap, AbstractParallelAnyArray.DROCPap<U>, AbstractParallelAnyArray.DROMPap<U>, AbstractParallelAnyArray.DRPap, AbstractParallelAnyArray.DUDCPap, AbstractParallelAnyArray.DUDMPap, AbstractParallelAnyArray.DULCPap, AbstractParallelAnyArray.DULMPap, AbstractParallelAnyArray.DUOCPap<U>, AbstractParallelAnyArray.DUOMPap<U>, AbstractParallelAnyArray.DUPap, AbstractParallelAnyArray.FilteredAsDoubleIterator, AbstractParallelAnyArray.FilteredAsLongIterator, AbstractParallelAnyArray.FilteredIterator<U>, AbstractParallelAnyArray.LDCPap, AbstractParallelAnyArray.LDMPap, AbstractParallelAnyArray.LFDCPap, AbstractParallelAnyArray.LFDMPap, AbstractParallelAnyArray.LFLCPap, AbstractParallelAnyArray.LFLMPap, AbstractParallelAnyArray.LFOCPap<U>, AbstractParallelAnyArray.LFOMPap<U>, AbstractParallelAnyArray.LFPap, AbstractParallelAnyArray.LLCPap, AbstractParallelAnyArray.LLMPap, AbstractParallelAnyArray.LOCPap<U>, AbstractParallelAnyArray.LOMPap<U>, AbstractParallelAnyArray.LPap, AbstractParallelAnyArray.LRDCPap, AbstractParallelAnyArray.LRDMPap, AbstractParallelAnyArray.LRLCPap, AbstractParallelAnyArray.LRLMPap, AbstractParallelAnyArray.LROCPap<U>, AbstractParallelAnyArray.LROMPap<U>, AbstractParallelAnyArray.LRPap, AbstractParallelAnyArray.LUDCPap, AbstractParallelAnyArray.LUDMPap, AbstractParallelAnyArray.LULCPap, AbstractParallelAnyArray.LULMPap, AbstractParallelAnyArray.LUOCPap<U>, AbstractParallelAnyArray.LUOMPap<U>, AbstractParallelAnyArray.LUPap, AbstractParallelAnyArray.ODCPap<T>, AbstractParallelAnyArray.ODMPap<T>, AbstractParallelAnyArray.OFDCPap<T>, AbstractParallelAnyArray.OFDMPap<T>, AbstractParallelAnyArray.OFLCPap<T>, AbstractParallelAnyArray.OFLMPap<T>, AbstractParallelAnyArray.OFOCPap<T,U>, AbstractParallelAnyArray.OFOMPap<T,U>, AbstractParallelAnyArray.OFPap<T>, AbstractParallelAnyArray.OLCPap<T>, AbstractParallelAnyArray.OLMPap<T>, AbstractParallelAnyArray.OOCPap<T,U>, AbstractParallelAnyArray.OOMPap<T,U>, AbstractParallelAnyArray.OPap<T>, AbstractParallelAnyArray.ORDCPap<T>, AbstractParallelAnyArray.ORDMPap<T>, AbstractParallelAnyArray.ORLCPap<T>, AbstractParallelAnyArray.ORLMPap<T>, AbstractParallelAnyArray.OROCPap<T,U>, AbstractParallelAnyArray.OROMPap<T,U>, AbstractParallelAnyArray.ORPap<T>, AbstractParallelAnyArray.OUDCPap<T>, AbstractParallelAnyArray.OUDMPap<T>, AbstractParallelAnyArray.OULCPap<T>, AbstractParallelAnyArray.OULMPap<T>, AbstractParallelAnyArray.OUOCPap<T,U>, AbstractParallelAnyArray.OUOMPap<T,U>, AbstractParallelAnyArray.OUPap<T>, AbstractParallelAnyArray.Sequentially<U>, AbstractParallelAnyArray.SequentiallyAsDouble, AbstractParallelAnyArray.SequentiallyAsLong, AbstractParallelAnyArray.UnfilteredAsDoubleIterator, AbstractParallelAnyArray.UnfilteredAsLongIterator, AbstractParallelAnyArray.UnfilteredIterator<U>
 
Field Summary
 
Fields inherited from class groovyx.gpars.extra166y.AbstractParallelAnyArray.DPap
array
 
Fields inherited from class groovyx.gpars.extra166y.AbstractParallelAnyArray
ex, fence, origin, threshold
 
Constructor Summary
ParallelDoubleArrayWithFilter(jsr166y.ForkJoinPool ex, int origin, int fence, double[] array)
           
 
Method Summary
 ParallelDoubleArray allUniqueElements()
          Returns a new ParallelDoubleArray containing only unique elements (that is, without any duplicates).
(package private)  double dget(int i)
           
 boolean hasAllEqualElements(ParallelDoubleArrayWithDoubleMapping other)
          Returns true if all elements at the same relative positions of this and other array are equal.
(package private)  void leafTransfer(int lo, int hi, double[] dest, int offset)
           
(package private)  void leafTransferByIndex(int[] indices, int loIdx, int hiIdx, double[] dest, int offset)
           
 ParallelDoubleArrayWithFilter replaceWithGeneratedValue(Ops.DoubleGenerator generator)
          Replaces elements with results of applying the given generator.
 ParallelDoubleArrayWithFilter replaceWithMappedIndex(Ops.IntAndDoubleToDouble op)
          Replaces elements with the results of applying the given mapping to each index and current element value
 ParallelDoubleArrayWithFilter replaceWithMappedIndex(Ops.IntToDouble op)
          Replaces elements with the results of applying the given op to their indices
 ParallelDoubleArrayWithFilter replaceWithMapping(Ops.BinaryDoubleOp combiner, double[] other)
          Replaces elements with results of applying op(thisElement, otherElement)
 ParallelDoubleArrayWithFilter replaceWithMapping(Ops.BinaryDoubleOp combiner, ParallelDoubleArrayWithDoubleMapping other)
          Replaces elements with results of applying op(thisElement, otherElement)
 ParallelDoubleArrayWithFilter replaceWithMapping(Ops.DoubleOp op)
          Replaces elements with the results of applying the given op to their current values.
 ParallelDoubleArrayWithFilter replaceWithValue(double value)
          Replaces elements with the given value.
 ParallelDoubleArrayWithFilter withFilter(Ops.BinaryDoublePredicate selector, ParallelDoubleArrayWithDoubleMapping other)
          Returns an operation prefix that causes a method to operate only on elements for which the current selector (if present) and the given binary selector returns true
abstract  ParallelDoubleArrayWithFilter withFilter(Ops.DoublePredicate selector)
          Returns an operation prefix that causes a method to operate only on elements for which the current selector (if present) and the given selector returns true
abstract  ParallelDoubleArrayWithFilter withIndexedFilter(Ops.IntAndDoublePredicate selector)
          Returns an operation prefix that causes a method to operate only on elements for which the current selector (if present) and the given indexed selector returns true
 
Methods inherited from class groovyx.gpars.extra166y.ParallelDoubleArrayWithDoubleMapping
all, apply, max, max, min, min, reduce, sequentially, sum, summary, summary, withIndexedMapping, withIndexedMapping, withIndexedMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping
 
Methods inherited from class groovyx.gpars.extra166y.AbstractParallelAnyArray.DPap
dgetArray, leafMoveByIndex, leafMoveSelected, lget, oget
 
Methods inherited from class groovyx.gpars.extra166y.AbstractParallelAnyArray
allDoubles, allLongs, allObjects, anyIndex, boundsCheck, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedSelector, compoundIndexedSelector, compoundIndexedSelector, compoundIndexedSelector, compoundIndexedSelector, compoundIndexedSelector, compoundIndexedSelector, compoundIndexedSelector, compoundIndexedSelector, computeThreshold, getThreshold, hasFilter, hasMap, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedSelector, indexedSelector, indexedSelector, isEmpty, isSelected, leafApply, leafApply, leafApply, leafBinaryIndexMap, leafBinaryIndexMap, leafBinaryIndexMap, leafCombineInPlace, leafCombineInPlace, leafCombineInPlace, leafCombineInPlace, leafCombineInPlace, leafCombineInPlace, leafFill, leafFill, leafFill, leafGenerate, leafGenerate, leafGenerate, leafIndexMap, leafIndexMap, leafIndexMap, leafIndexSelected, leafReduce, leafReduce, leafReduce, leafTransfer, leafTransfer, leafTransferByIndex, leafTransferByIndex, leafTransform, leafTransform, leafTransform, lgetArray, ogetArray, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParallelDoubleArrayWithFilter

ParallelDoubleArrayWithFilter(jsr166y.ForkJoinPool ex,
                              int origin,
                              int fence,
                              double[] array)
Method Detail

replaceWithMapping

public ParallelDoubleArrayWithFilter replaceWithMapping(Ops.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)

replaceWithMappedIndex

public ParallelDoubleArrayWithFilter replaceWithMappedIndex(Ops.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 ParallelDoubleArrayWithFilter replaceWithMappedIndex(Ops.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)

replaceWithGeneratedValue

public ParallelDoubleArrayWithFilter replaceWithGeneratedValue(Ops.DoubleGenerator generator)
Replaces elements with results of applying the given generator.

Parameters:
generator - the generator
Returns:
this (to simplify use in expressions)

replaceWithValue

public ParallelDoubleArrayWithFilter replaceWithValue(double value)
Replaces elements with the given value.

Parameters:
value - the value
Returns:
this (to simplify use in expressions)

replaceWithMapping

public ParallelDoubleArrayWithFilter replaceWithMapping(Ops.BinaryDoubleOp combiner,
                                                        ParallelDoubleArrayWithDoubleMapping other)
Replaces elements with results of applying op(thisElement, otherElement)

Parameters:
other - the other array
combiner - the combiner
Returns:
this (to simplify use in expressions)

replaceWithMapping

public ParallelDoubleArrayWithFilter replaceWithMapping(Ops.BinaryDoubleOp combiner,
                                                        double[] other)
Replaces elements with results of applying op(thisElement, otherElement)

Parameters:
other - the other array
combiner - the combiner
Returns:
this (to simplify use in expressions)

allUniqueElements

public ParallelDoubleArray allUniqueElements()
Returns a new ParallelDoubleArray containing only unique elements (that is, without any duplicates).

Returns:
the new ParallelDoubleArray

withFilter

public abstract ParallelDoubleArrayWithFilter withFilter(Ops.DoublePredicate selector)
Returns an operation prefix that causes a method to operate only on elements for which the current selector (if present) and the given selector returns true

Parameters:
selector - the selector
Returns:
operation prefix

withFilter

public ParallelDoubleArrayWithFilter withFilter(Ops.BinaryDoublePredicate selector,
                                                ParallelDoubleArrayWithDoubleMapping other)
Returns an operation prefix that causes a method to operate only on elements for which the current selector (if present) and the given binary selector returns true

Parameters:
selector - the selector
Returns:
operation prefix

withIndexedFilter

public abstract ParallelDoubleArrayWithFilter withIndexedFilter(Ops.IntAndDoublePredicate selector)
Returns an operation prefix that causes a method to operate only on elements for which the current selector (if present) and the given indexed selector returns true

Parameters:
selector - the selector
Returns:
operation prefix

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

leafTransfer

final void leafTransfer(int lo,
                        int hi,
                        double[] dest,
                        int offset)
Overrides:
leafTransfer in class AbstractParallelAnyArray

leafTransferByIndex

final void leafTransferByIndex(int[] indices,
                               int loIdx,
                               int hiIdx,
                               double[] dest,
                               int offset)
Overrides:
leafTransferByIndex in class AbstractParallelAnyArray

dget

final double dget(int i)
Specified by:
dget in class AbstractParallelAnyArray

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