groovyx.gpars.extra166y
Class PAS.FJDStats

java.lang.Object
  extended by jsr166y.ForkJoinTask<java.lang.Void>
      extended by jsr166y.RecursiveAction
          extended by groovyx.gpars.extra166y.PAS.FJBase
              extended by groovyx.gpars.extra166y.PAS.FJDStats
All Implemented Interfaces:
ParallelDoubleArray.SummaryStatistics, java.io.Serializable, java.util.concurrent.Future<java.lang.Void>
Enclosing class:
PAS

static final class PAS.FJDStats
extends PAS.FJBase
implements ParallelDoubleArray.SummaryStatistics


Field Summary
(package private)  Ops.DoubleComparator comparator
           
(package private)  int indexOfMax
           
(package private)  int indexOfMin
           
(package private)  double max
           
(package private)  double min
           
(package private)  int size
           
(package private)  double sum
           
 
Fields inherited from class groovyx.gpars.extra166y.PAS.FJBase
hi, lo, next, pap
 
Constructor Summary
PAS.FJDStats(AbstractParallelAnyArray pap, int lo, int hi, PAS.FJBase next, Ops.DoubleComparator comparator)
           
 
Method Summary
(package private)  void atLeaf(int l, int h)
          Leaf computation
 double average()
          Returns the arithmetic average of all elements
(package private)  void filteredAtLeaf(int l, int h)
           
 int indexOfMax()
          Returns the index of the maximum element, or -1 if empty
 int indexOfMin()
          Returns the index of the minimum element, or -1 if empty
 double max()
          Returns the maximum element, or -Double.MAX_VALUE if empty
 double min()
          Returns the minimum element, or Double.MAX_VALUE if empty
(package private)  PAS.FJBase newSubtask(int l, int h, PAS.FJBase r)
          Factory method to create new subtask, normally of current type
(package private)  void onReduce(PAS.FJBase right)
          Operation performed after joining right subtask -- default noop
 int size()
          Returns the number of elements
 double sum()
          Returns the sum of all elements
 java.lang.String toString()
           
(package private)  void updateMax(int i, double x)
           
(package private)  void updateMin(int i, double x)
           
 
Methods inherited from class groovyx.gpars.extra166y.PAS.FJBase
compute, internalCompute
 
Methods inherited from class jsr166y.RecursiveAction
exec, getRawResult, setRawResult
 
Methods inherited from class jsr166y.ForkJoinTask
adapt, adapt, adapt, cancel, complete, completeExceptionally, fork, get, get, getException, getPool, getQueuedTaskCount, getSurplusQueuedTaskCount, helpQuiesce, inForkJoinPool, invoke, invokeAll, invokeAll, invokeAll, isCancelled, isCompletedAbnormally, isCompletedNormally, isDone, join, peekNextLocalTask, pollNextLocalTask, pollTask, quietlyInvoke, quietlyJoin, reinitialize, tryUnfork
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

comparator

final Ops.DoubleComparator comparator

size

int size

min

double min

max

double max

sum

double sum

indexOfMin

int indexOfMin

indexOfMax

int indexOfMax
Constructor Detail

PAS.FJDStats

PAS.FJDStats(AbstractParallelAnyArray pap,
             int lo,
             int hi,
             PAS.FJBase next,
             Ops.DoubleComparator comparator)
Method Detail

size

public int size()
Description copied from interface: ParallelDoubleArray.SummaryStatistics
Returns the number of elements

Specified by:
size in interface ParallelDoubleArray.SummaryStatistics

min

public double min()
Description copied from interface: ParallelDoubleArray.SummaryStatistics
Returns the minimum element, or Double.MAX_VALUE if empty

Specified by:
min in interface ParallelDoubleArray.SummaryStatistics

max

public double max()
Description copied from interface: ParallelDoubleArray.SummaryStatistics
Returns the maximum element, or -Double.MAX_VALUE if empty

Specified by:
max in interface ParallelDoubleArray.SummaryStatistics

sum

public double sum()
Description copied from interface: ParallelDoubleArray.SummaryStatistics
Returns the sum of all elements

Specified by:
sum in interface ParallelDoubleArray.SummaryStatistics

average

public double average()
Description copied from interface: ParallelDoubleArray.SummaryStatistics
Returns the arithmetic average of all elements

Specified by:
average in interface ParallelDoubleArray.SummaryStatistics

indexOfMin

public int indexOfMin()
Description copied from interface: ParallelDoubleArray.SummaryStatistics
Returns the index of the minimum element, or -1 if empty

Specified by:
indexOfMin in interface ParallelDoubleArray.SummaryStatistics

indexOfMax

public int indexOfMax()
Description copied from interface: ParallelDoubleArray.SummaryStatistics
Returns the index of the maximum element, or -1 if empty

Specified by:
indexOfMax in interface ParallelDoubleArray.SummaryStatistics

newSubtask

PAS.FJBase newSubtask(int l,
                      int h,
                      PAS.FJBase r)
Description copied from class: PAS.FJBase
Factory method to create new subtask, normally of current type

Specified by:
newSubtask in class PAS.FJBase

onReduce

void onReduce(PAS.FJBase right)
Description copied from class: PAS.FJBase
Operation performed after joining right subtask -- default noop

Overrides:
onReduce in class PAS.FJBase

updateMin

void updateMin(int i,
               double x)

updateMax

void updateMax(int i,
               double x)

atLeaf

void atLeaf(int l,
            int h)
Description copied from class: PAS.FJBase
Leaf computation

Specified by:
atLeaf in class PAS.FJBase

filteredAtLeaf

void filteredAtLeaf(int l,
                    int h)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

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