|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.mahout.math.function.DoubleDoubleFunction
org.apache.mahout.math.function.PlusMult
public final class PlusMult
Only for performance tuning of compute intensive linear algebraic computations. Constructs functions that return one of
| Constructor Summary | |
|---|---|
PlusMult(double multiplicator)
|
|
| Method Summary | |
|---|---|
double |
apply(double a,
double b)
Returns the result of the function evaluation. |
double |
getMultiplicator()
|
boolean |
isAssociative()
f(x, f(y, z)) = x + c * (y + c * z) = x + c * y + c^2 * z f(f(x, y), z) = (x + c * y) + c * z = x + c * y + c * z true only for c = 0 or c = 1 |
boolean |
isCommutative()
x + y * c = y + x * c iff c = 1 |
boolean |
isLikeLeftMult()
0 + y * c = y * c != 0 |
boolean |
isLikeRightMult()
x + 0 * c = x != 0 |
boolean |
isLikeRightPlus()
x + 0 * c = x |
static PlusMult |
minusMult(double constant)
a - b*constant. |
static PlusMult |
plusMult(double constant)
a + b*constant. |
void |
setMultiplicator(double multiplicator)
|
| Methods inherited from class org.apache.mahout.math.function.DoubleDoubleFunction |
|---|
isAssociativeAndCommutative, isDensifying, isLikeMult |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PlusMult(double multiplicator)
| Method Detail |
|---|
public double apply(double a,
double b)
apply in class DoubleDoubleFunctiona - a double for the first argumentb - a double for the second argument
public static PlusMult minusMult(double constant)
public static PlusMult plusMult(double constant)
public double getMultiplicator()
public boolean isLikeRightPlus()
isLikeRightPlus in class DoubleDoubleFunctionpublic boolean isLikeLeftMult()
isLikeLeftMult in class DoubleDoubleFunctionpublic boolean isLikeRightMult()
isLikeRightMult in class DoubleDoubleFunctionpublic boolean isCommutative()
isCommutative in class DoubleDoubleFunctionpublic boolean isAssociative()
isAssociative in class DoubleDoubleFunctionpublic void setMultiplicator(double multiplicator)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||