Package com.graphbuilder.math.func
Class TanhFunction
java.lang.Object
com.graphbuilder.math.func.TanhFunction
- All Implemented Interfaces:
Function
The hyperbolic tangent function.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptNumParam(int numParam) Returns true only for 1 parameter, false otherwise.doubleof(double[] d, int numParam) Returns the value of (ex - e-x)/(ex + e-x), where x is the value at index location 0 and e is the base of natural logarithms.toString()
-
Constructor Details
-
TanhFunction
public TanhFunction()
-
-
Method Details
-
of
public double of(double[] d, int numParam) Returns the value of (ex - e-x)/(ex + e-x), where x is the value at index location 0 and e is the base of natural logarithms. -
acceptNumParam
public boolean acceptNumParam(int numParam) Returns true only for 1 parameter, false otherwise.- Specified by:
acceptNumParamin interfaceFunction
-
toString
-