Class SymFunction
java.lang.Object
org.ddogleg.chainrule.sym.SymFunction
A compiled
Sym expression. The caller binds each terminal to storage with feed(Sym, double[]) once, then
mutates that storage — contents or offset — inside its loop and calls run(CRArray). There is no
per-iteration lookup: the handles are raw CRArrays and the loop touches them directly.-
Field Summary
FieldsModifier and TypeFieldDescriptionWhere Jacobian entries land, and the row the caller says the current observation starts at.int -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMovingCapture(Sym terminal, int block, int slot, IntSupplier column) Declares an input whose Jacobian column moves as the evaluation walks, published from the supplier when the entry is captured.CRArray<double[]> Binds the terminal to a freshly allocated array of its declared size.CRArray<double[]> Binds the terminal to the caller's own storage.voidPublishes Jacobian entries toout.voidmapParamColumn(Sym terminal, int column) Declares where a parameter's column is, for a terminal whose storage is not the solver's parameter array.voidDeclares the Jacobian column of everyparamside feed from its handle's current offset.voidRuns the forward pass with the current terminal values and writes the residual rows at the output's offsetvoidRuns forward then differentiates, publishing rows atjacobianRow.CRArray<double[]> The handle backing a terminal, creating it on first use.
-
Field Details
-
jacobianOut
Where Jacobian entries land, and the row the caller says the current observation starts at. The row is a raw field for the same reason the feeds are raw arrays -
jacobianRow
public int jacobianRow
-
-
Method Details
-
feed
-
feed
-
mapParamColumns
public void mapParamColumns()Declares the Jacobian column of everyparamside feed from its handle's current offset. Call once after binding, and again whenever a handle's offset moved (a new view's pose). Columns are the offsets themselves, so params must be slices of the solver's parameter array -
mapParamColumn
Declares where a parameter's column is, for a terminal whose storage is not the solver's parameter array. A column below zero says the value is not being estimated, so nothing is published for it and it is left undifferentiated -
jacobianTo
Publishes Jacobian entries toout. Static columns come frommapParamColumns(); a grid read's knot columns move per observation, so they are captured from the operator, which knows where its knots were sliced from -
runJacobian
public void runJacobian()Runs forward then differentiates, publishing rows atjacobianRow. The caller advances the row between observations, mirroring how it advances the residual output's offset -
run
Runs the forward pass with the current terminal values and writes the residual rows at the output's offset -
addMovingCapture
Declares an input whose Jacobian column moves as the evaluation walks, published from the supplier when the entry is captured. For extensions choosing parameters per evaluation. The terminal is whatmapParamColumn(Sym, int)disables the capture through when the values it reads are not parameters of the solve -
terminal
-