public class SigmoidFunction extends AbstractFunction implements DifferentiableFunction
DIMENSION_PROPERTY
Constructor and Description |
---|
SigmoidFunction()
Default parameters (inflection=0; slope=1/4; low=0; high=1).
|
SigmoidFunction(float inflection,
float slope,
float low,
float high) |
Modifier and Type | Method and Description |
---|---|
Function |
clone() |
Function |
getDerivative() |
float |
getHigh() |
float |
getInflection() |
float |
getLow() |
float |
getSlope() |
float |
map(float[] from) |
void |
setHigh(float high) |
void |
setInflection(float inflection) |
void |
setLow(float low) |
void |
setSlope(float slope) |
getCode, getDimension, getName, multiMap, setCode, setName
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDimension, multiMap
public SigmoidFunction()
public SigmoidFunction(float inflection, float slope, float low, float high)
inflection
- Inflection pointslope
- Slope at inflection point (usually 1/4)low
- Result for inputs much lower than inflection pointhigh
- Result for inputs much higher than inflection pointpublic float getInflection()
public void setInflection(float inflection)
inflection
- Inflection pointpublic float getSlope()
public void setSlope(float slope)
slope
- Slope at inflection pointpublic float getLow()
public void setLow(float low)
low
- Result for inputs much lower than inflection pointpublic float getHigh()
public void setHigh(float high)
high
- Result for inputs much higher than inflection pointpublic Function getDerivative()
getDerivative
in interface DifferentiableFunction
DifferentiableFunction.getDerivative()
public float map(float[] from)
map
in interface Function
map
in class AbstractFunction
from
- Must have same length as getDimension()Function.map(float[])
public Function clone() throws java.lang.CloneNotSupportedException
clone
in interface Function
clone
in class AbstractFunction
java.lang.CloneNotSupportedException
- is super does not support clone