| 1 |
package ml; |
| 2 |
|
| 3 |
public class ExtendedMSig extends Function { |
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
private ExtendedMSig() {} |
| 10 |
|
| 11 |
@Override |
| 12 |
public double activate(double x) {return Functions.emSig(x);} |
| 13 |
|
| 14 |
@Override |
| 15 |
public double derivativeX(double x) {return Functions.emSigDerivativeX(x);} |
| 16 |
|
| 17 |
@Override |
| 18 |
public double derivativeFX(double fx) {throw new RuntimeException("Cannot be calculated.");} |
| 19 |
|
| 20 |
@Override |
| 21 |
public double derivativeXFX(double x, double fx) {return Functions.emSigDerivativeXFX(x, fx);} |
| 22 |
|
| 23 |
@Override |
| 24 |
public int type() {return type;} |
| 25 |
|
| 26 |
@Override |
| 27 |
public String name() {return name;} |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
static final String name="EMSIG"; |
| 34 |
static final int type=Function.toType(name, true); |
| 35 |
static final ExtendedMSig instance=new ExtendedMSig(); |
| 36 |
|
| 37 |
} |