Class CROperatorBilinearSplineND
java.lang.Object
org.ddogleg.chainrule.ops.CROperatorBilinearND
org.ddogleg.chainrule.ops.CROperatorBilinearSplineND
- All Implemented Interfaces:
CROperatorBackwardsJac<double[]>, CROperatorForward<double[]>
Implementation of CROperatorBilinearND where the knots are also splines which use linear interpolation.
A knot's coefficients are samples on a regular grid spanning valueMin to valueMax, so coefs
samples make coefs - 1 buckets. Values outside that range are clamped to the nearest end rather than
extrapolated, which bounds what this returns no matter what it is handed.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intWhich bucket the lower extent is inprotected doubleThe weight assigned to the upper end of the bucket.doubleThe min and max expected values ofvaluedoubleThe min and max expected values ofvalue -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconfigure(ConfigGridSplineND grid) protected doubleevaluate(int knot, int polyOffset) Values the specified polynomial encoded in the knot usingvalue.protected doubleevaluateDerivative(int knot, int polyOffset) Piecewise linear, so this is the bucket's slope.protected voidfunctionDerivatives(double[] derivatives) Only the two samples bracketing the value contribute, and they contribute their interpolation weights.Retrieve a serialized description of the settingsvoidsetSettings(Map<String, String> settings) Reconfigures the block using the specified settingsprotected voidsetValue(double value) Assigns the valueMethods inherited from class CROperatorBilinearND
configureGrid, forward, getArrayType, getInputCount, getInputSize, getOutputSize, jacobian, jacobianKnot, jacobianValue, jacobianWeights, knotOffset, setInputMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CROperatorForward
normalizeAfterStep
-
Field Details
-
valueMin
public double valueMinThe min and max expected values ofvalue -
valueMax
public double valueMaxThe min and max expected values ofvalue -
bucket
protected int bucketWhich bucket the lower extent is in -
bucketFrac1
protected double bucketFrac1The weight assigned to the upper end of the bucket. 0 to 1, inclusive
-
-
Constructor Details
-
CROperatorBilinearSplineND
public CROperatorBilinearSplineND()
-
-
Method Details
-
configure
-
evaluate
protected double evaluate(int knot, int polyOffset) Values the specified polynomial encoded in the knot usingvalue.- Specified by:
evaluatein classCROperatorBilinearND
-
evaluateDerivative
protected double evaluateDerivative(int knot, int polyOffset) Piecewise linear, so this is the bucket's slope. Exactly zero where the value clamped, since moving further out changes nothing- Specified by:
evaluateDerivativein classCROperatorBilinearND
-
functionDerivatives
protected void functionDerivatives(double[] derivatives) Only the two samples bracketing the value contribute, and they contribute their interpolation weights. The rest of the knot is untouched by this observation- Specified by:
functionDerivativesin classCROperatorBilinearND
-
setValue
protected void setValue(double value) Description copied from class:CROperatorBilinearNDAssigns the value- Overrides:
setValuein classCROperatorBilinearND
-
getSettings
Description copied from interface:CROperatorForwardRetrieve a serialized description of the settings- Specified by:
getSettingsin interfaceCROperatorForward<double[]>- Overrides:
getSettingsin classCROperatorBilinearND
-
setSettings
Description copied from interface:CROperatorForwardReconfigures the block using the specified settings- Specified by:
setSettingsin interfaceCROperatorForward<double[]>- Overrides:
setSettingsin classCROperatorBilinearND
-