Interface CROperatorForward<T>
- All Known Subinterfaces:
CROperatorBackwardsGrad<T>, CROperatorBackwardsJac<T>
- All Known Implementing Classes:
CRErrorHuberNorm, CRErrorVectorSW, CRLossHuber, CROperatorBilinearND, CROperatorBilinearPolyND, CROperatorBilinearSplineND, CROperatorClampLower, CROperatorConcat, CROperatorDivide, CROperatorDivideVS, CROperatorDivideVSDamped, CROperatorGridBilinearWeights, CROperatorMeanVector, CROperatorMult, CROperatorMultVS, CROperatorPlus, CROperatorPlusAB, CROperatorRemapParams, CRPenaltyL2
public interface CROperatorForward<T>
Operator in forward direction. Takes in N inputs of CRArray and produces a single output. Can be chained
together using JacobianSerialChain. Typically, the first input is the output of the previous element
in the chain.
- Input: Set of encoded structures, e.g. 3D point, SE3, curve, ... etc.
- Settings: High level configurations, e.g. 3D or homogenous points.
- Output: Resulting output, a single array
-
Method Summary
Modifier and TypeMethodDescriptionvoidPerforms forward pass of the function.Primitive data type for the arrayintNumber of inputsintgetInputSize(int which) Returns the specified input's vector sizeintReturns the output vector's sizeRetrieve a serialized description of the settingsdefault voidnormalizeAfterStep(int which, CRArray<T> params) This function is called after an iteration and will normalize an input's values.voidSpecifies the value of an input's vector.default voidsetSettings(Map<String, String> settings) Reconfigures the block using the specified settings
-
Method Details
-
setInput
Specifies the value of an input's vector.
The implementation can safely save the array
inputpoints at along with its offset. Neither the values at that offset nor the array itself will change until afterforward(CRArray)or a derived function such asCROperatorBackwardsJac.jacobian(CRMatrix, List)has been called. Theinputreference itself cannot be saved: the caller is free to recycle theCRArraythe moment the call returns, including pointing it at another offset.- Parameters:
which- Which inputinput- The input's value. This reference can't be saved internally but the array and offset can be.
-
getInputSize
int getInputSize(int which) Returns the specified input's vector size -
getInputCount
int getInputCount()Number of inputs -
normalizeAfterStep
-
getSettings
-
setSettings
-
forward
Performs forward pass of the function. Must have already updatedsetInput(int, CRArray).- Parameters:
output- (Output) Output vector. Modified.
-
getOutputSize
int getOutputSize()Returns the output vector's size -
getArrayType
-