| 
org.codehaus.gpars | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectgroovyx.gpars.extra166y.AbstractParallelAnyArray.DPap
groovyx.gpars.extra166y.ParallelDoubleArrayWithDoubleMapping
groovyx.gpars.extra166y.ParallelDoubleArrayWithFilter
groovyx.gpars.extra166y.ParallelDoubleArrayWithBounds
public abstract class ParallelDoubleArrayWithBounds extends ParallelDoubleArrayWithFilter
A prefix view of ParallelDoubleArray that causes operations to apply only to elements within a given range. Instances of this class may be constructed only via prefix methods of ParallelDoubleArray or its other prefix classes.
| Constructor Summary | |
            ParallelDoubleArrayWithBounds(ForkJoinPool ex, int origin, int fence, double[] array)
             | 
        |
| Method Summary | |
|---|---|
            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.  | 
        
            ParallelDoubleArrayWithBounds
         | 
        
            cumulate(DoubleReducer reducer, double base)
            Replaces each element with the running cumulation of applying the given reducer.  | 
        
            ParallelDoubleArrayWithBounds
         | 
        
            cumulateSum()
            Replaces each element with the running sum.  | 
        
            int
         | 
        
            indexOf(double target)
            Returns the index of some element equal to given target, or -1 if not present.  | 
        
            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.  | 
        
            ParallelDoubleArrayWithBounds
         | 
        
            sort(DoubleComparator cmp)
            Sorts the elements.  | 
        
            ParallelDoubleArrayWithBounds
         | 
        
            sort()
            Sorts the elements, assuming all elements are Comparable.  | 
        
            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).  | 
        
| Methods inherited from class 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 | 
| Constructor Detail | 
|---|
ParallelDoubleArrayWithBounds(ForkJoinPool ex, int origin, int fence, double[] array)
| Method Detail | 
|---|
public int binarySearch(double target)
target -  the element to search for
public int binarySearch(double target, DoubleComparator comparator)
target -  the element to search forcomparator -  the comparator
public ParallelDoubleArrayWithBounds cumulate(DoubleReducer reducer, double base)
reducer -  the reducerbase -  the result for an empty array
public ParallelDoubleArrayWithBounds cumulateSum()
public int indexOf(double target)
target -  the element to search for
public double precumulate(DoubleReducer reducer, double base)
reducer -  the reducerbase -  the result for an empty array
public double precumulateSum()
public ParallelDoubleArrayWithBounds sort(DoubleComparator cmp)
cmp -  the comparator to use
public ParallelDoubleArrayWithBounds sort()
public ParallelDoubleArrayWithBounds withBounds(int firstIndex, int upperBound)
pa.withBounds(2, 8).withBounds(3, 5) indexes the
 5th (= 2+3) and 6th elements of pa. However, indices
 returned by methods such as indexOf are
 with respect to the underlying ParallelDoubleArray.
     firstIndex -  the lower bound (inclusive)upperBound -  the upper bound (exclusive)
Copyright © 2008–2013 Václav Pech. All Rights Reserved.