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()
FloatFunctiondomainDimension in interface FloatFunctionprotected abstract void calculate(float[] x)
public float[] initial()
HasFloatInitialinitial in interface HasFloatInitialprotected static void copy(float[] y,
float[] x)
public float valueAt(float[] x)
FloatFunctionvalueAt in interface FloatFunctionx - a double[] inputpublic float[] derivativeAt(float[] x)
DiffFloatFunctionderivativeAt in interface DiffFloatFunctionx - a double[] input vector