public final class PlusMult extends DoubleDoubleFunction
| Constructor and Description |
|---|
PlusMult(double multiplicator) |
| Modifier and Type | Method and Description |
|---|---|
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) |
isAssociativeAndCommutative, isDensifying, isLikeMultpublic double apply(double a,
double b)
apply in class DoubleDoubleFunctiona - a double for the first argumentb - a double for the second argumentpublic 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)
Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.