Parallel Colt 0.7.2

cern.jet.math.tfloat
Class FloatPlusMultFirst

java.lang.Object
  extended by cern.jet.math.tfloat.FloatPlusMultFirst
All Implemented Interfaces:
FloatFloatFunction

public final class FloatPlusMultFirst
extends Object
implements FloatFloatFunction

Only for performance tuning of compute intensive linear algebraic computations. Constructs functions that return one of

a and b are variables, constant is fixed, but for performance reasons publicly accessible. Intended to be passed to matrix.assign(otherMatrix,function) methods.


Field Summary
 float multiplicator
          Public read/write access to avoid frequent object construction.
 
Method Summary
 float apply(float a, float b)
          Returns the result of the function evaluation.
static FloatPlusMultFirst minusDiv(float constant)
          a/constant - b.
static FloatPlusMultFirst minusMult(float constant)
          a*constant - b.
static FloatPlusMultFirst plusDiv(float constant)
          a/constant + b.
static FloatPlusMultFirst plusMult(float constant)
          a*constant + b.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

multiplicator

public float multiplicator
Public read/write access to avoid frequent object construction.

Method Detail

apply

public final float apply(float a,
                         float b)
Returns the result of the function evaluation.

Specified by:
apply in interface FloatFloatFunction
Parameters:
a - the first argument passed to the function.
b - the second argument passed to the function.
Returns:
the result of the function.

minusDiv

public static FloatPlusMultFirst minusDiv(float constant)
a/constant - b.


minusMult

public static FloatPlusMultFirst minusMult(float constant)
a*constant - b.


plusDiv

public static FloatPlusMultFirst plusDiv(float constant)
a/constant + b.


plusMult

public static FloatPlusMultFirst plusMult(float constant)
a*constant + b.


Parallel Colt 0.7.2

Jump to the Parallel Colt Homepage