org.apache.mahout.math.function
Class PlusMult

java.lang.Object
  extended by org.apache.mahout.math.function.PlusMult
All Implemented Interfaces:
DoubleDoubleFunction

public final class PlusMult
extends Object
implements DoubleDoubleFunction

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.


Constructor Summary
PlusMult(double multiplicator)
           
 
Method Summary
 double apply(double a, double b)
          Returns the result of the function evaluation.
 double getMultiplicator()
           
static PlusMult minusMult(double constant)
          a - b*constant.
static PlusMult plusMult(double constant)
          a + b*constant.
 void setMultiplicator(double multiplicator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlusMult

public PlusMult(double multiplicator)
Method Detail

apply

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

Specified by:
apply in interface DoubleDoubleFunction
Parameters:
a - a double for the first argument
b - a double for the second argument
Returns:
the result of applying the function

minusMult

public static PlusMult minusMult(double constant)
a - b*constant.


plusMult

public static PlusMult plusMult(double constant)
a + b*constant.


getMultiplicator

public double getMultiplicator()

setMultiplicator

public void setMultiplicator(double multiplicator)


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.