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, isLikeMult
public double apply(double a, double b)
apply
in class DoubleDoubleFunction
a
- 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 DoubleDoubleFunction
public boolean isLikeLeftMult()
isLikeLeftMult
in class DoubleDoubleFunction
public boolean isLikeRightMult()
isLikeRightMult
in class DoubleDoubleFunction
public boolean isCommutative()
isCommutative
in class DoubleDoubleFunction
public boolean isAssociative()
isAssociative
in class DoubleDoubleFunction
public void setMultiplicator(double multiplicator)
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.