Parallel Colt 0.7.2

cern.jet.math.tint
Class IntMult

java.lang.Object
  extended by cern.jet.math.tint.IntMult
All Implemented Interfaces:
IntFunction

public final class IntMult
extends Object
implements IntFunction

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

a is variable, constant is fixed, but for performance reasons publicly accessible. Intended to be passed to matrix.assign(function) methods.


Field Summary
 int multiplicator
          Public read/write access to avoid frequent object construction.
 
Method Summary
 int apply(int a)
          Returns the result of the function evaluation.
static IntMult div(int constant)
          a / constant.
static IntMult mult(int constant)
          a * 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)
Returns the result of the function evaluation.

Specified by:
apply in interface IntFunction
Parameters:
a - argument passed to the function.
Returns:
the result of the function.

div

public static IntMult div(int constant)
a / constant.


mult

public static IntMult mult(int constant)
a * constant.


Parallel Colt 0.7.2

Jump to the Parallel Colt Homepage