public abstract class AbstractCachingDiffFloatFunction extends java.lang.Object implements DiffFloatFunction, HasFloatInitial
Modifier and Type | Field and Description |
---|---|
protected float[] |
derivative |
protected float |
value |
Constructor and Description |
---|
AbstractCachingDiffFloatFunction() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
calculate(float[] x)
Calculate the value at x and the derivative and save them in the respective fields
|
protected static void |
copy(float[] y,
float[] x) |
float[] |
derivativeAt(float[] x)
Returns the first-derivative vector at the input location.
|
abstract int |
domainDimension()
Returns the number of dimensions in the function's domain
|
float[] |
initial()
Returns the intitial point in the domain (but not necessarily a feasible one).
|
float |
valueAt(float[] x)
Returns the value of the function at a single point.
|
public abstract int domainDimension()
FloatFunction
domainDimension
in interface FloatFunction
protected abstract void calculate(float[] x)
public float[] initial()
HasFloatInitial
initial
in interface HasFloatInitial
protected static void copy(float[] y, float[] x)
public float valueAt(float[] x)
FloatFunction
valueAt
in interface FloatFunction
x
- a double[]
inputpublic float[] derivativeAt(float[] x)
DiffFloatFunction
derivativeAt
in interface DiffFloatFunction
x
- a double[]
input vector