Parallel Colt 0.9.4

cern.jet.math.tlong
Class LongPlusMultFirst

java.lang.Object
  extended by cern.jet.math.tlong.LongPlusMultFirst
All Implemented Interfaces:
LongLongFunction

public final class LongPlusMultFirst
extends Object
implements LongLongFunction

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

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


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

Field Detail

multiplicator

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

Method Detail

apply

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

Specified by:
apply in interface LongLongFunction
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 LongPlusMultFirst minusMult(long constant)
a - b*constant.


plusMult

public static LongPlusMultFirst plusMult(long constant)
a + b*constant.


Parallel Colt 0.9.4

Jump to the Parallel Colt Homepage