jbarrier

edu.bonn.cs.net.jbarrier.barrier
Class ReductionOperator

java.lang.Object
  extended by edu.bonn.cs.net.jbarrier.barrier.ReductionOperator
Direct Known Subclasses:
ReductionOperator.MaximumReduction, ReductionOperator.MinimumReduction, ReductionOperator.SumReduction

public abstract class ReductionOperator
extends java.lang.Object

Abstract base class for reduction operators.

Version:
1.0
Author:
Patrick Peschlow, Ivan Castilla Rodriguez

Nested Class Summary
static class ReductionOperator.MaximumReduction
          Maximum reduction operator.
static class ReductionOperator.MinimumReduction
          Minimum reduction operator.
static class ReductionOperator.SumReduction
          Sum reduction operator.
 
Constructor Summary
ReductionOperator()
           
 
Method Summary
protected abstract  double operator(double value1, double value2)
          Operator on operands of type double.
protected abstract  float operator(float value1, float value2)
          Operator on operands of type float.
protected abstract  int operator(int value1, int value2)
          Operator on operands of type int.
protected abstract  long operator(long value1, long value2)
          Operator on operands of type long.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReductionOperator

public ReductionOperator()
Method Detail

operator

protected abstract int operator(int value1,
                                int value2)
Operator on operands of type int.

Parameters:
value1 - the first operand
value2 - the second operand
Returns:
the result of the operator applied to the two operands

operator

protected abstract long operator(long value1,
                                 long value2)
Operator on operands of type long.

Parameters:
value1 - the first operand
value2 - the second operand
Returns:
the result of the operator applied to the two operands

operator

protected abstract float operator(float value1,
                                  float value2)
Operator on operands of type float.

Parameters:
value1 - the first operand
value2 - the second operand
Returns:
the result of the operator applied to the two operands

operator

protected abstract double operator(double value1,
                                   double value2)
Operator on operands of type double.

Parameters:
value1 - the first operand
value2 - the second operand
Returns:
the result of the operator applied to the two operands

jbarrier

Copyright 2010 Patrick Peschlow