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 Type
    Method
    Description
    void
    forward(CRArray<T> output)
    Performs forward pass of the function.
    Primitive data type for the array
    int
    Number of inputs
    int
    getInputSize(int which)
    Returns the specified input's vector size
    int
    Returns the output vector's size
    default Map<String,String>
    Retrieve a serialized description of the settings
    default void
    normalizeAfterStep(int which, CRArray<T> params)
    This function is called after an iteration and will normalize an input's values.
    void
    setInput(int which, CRArray<T> input)
    Specifies the value of an input's vector.
    default void
    Reconfigures the block using the specified settings
  • Method Details

    • setInput

      void setInput(int which, CRArray<T> input)

      Specifies the value of an input's vector.

      The implementation can safely save the array input points at along with its offset. Neither the values at that offset nor the array itself will change until after forward(CRArray) or a derived function such as CROperatorBackwardsJac.jacobian(CRMatrix, List) has been called. The input reference itself cannot be saved: the caller is free to recycle the CRArray the moment the call returns, including pointing it at another offset.

      Parameters:
      which - Which input
      input - 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

      default void normalizeAfterStep(int which, CRArray<T> params)
      This function is called after an iteration and will normalize an input's values. The meaning of the values should not change.
    • getSettings

      default Map<String,String> getSettings()
      Retrieve a serialized description of the settings
    • setSettings

      default void setSettings(Map<String,String> settings)
      Reconfigures the block using the specified settings
    • forward

      void forward(CRArray<T> output)
      Performs forward pass of the function. Must have already updated setInput(int, CRArray).
      Parameters:
      output - (Output) Output vector. Modified.
    • getOutputSize

      int getOutputSize()
      Returns the output vector's size
    • getArrayType

      Class<T> getArrayType()
      Primitive data type for the array