Parallel Colt 0.7.2

cern.jet.math.tint
Class IntPlusMultFirst

java.lang.Object
  extended by cern.jet.math.tint.IntPlusMultFirst
All Implemented Interfaces:
IntIntFunction

public final class IntPlusMultFirst
extends Object
implements IntIntFunction

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
 int multiplicator
          Public read/write access to avoid frequent object construction.
 
Method Summary
 int apply(int a, int b)
          Returns the result of the function evaluation.
static IntPlusMultFirst minusMult(int constant)
          a - b*constant.
static IntPlusMultFirst plusMult(int constant)
          a + b*constant.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

multiplicator

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

Method Detail

apply

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

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

minusMult

public static IntPlusMultFirst minusMult(int constant)
a - b*constant.


plusMult

public static IntPlusMultFirst plusMult(int constant)
a + b*constant.


Parallel Colt 0.7.2

Jump to the Parallel Colt Homepage