Class SymOps

java.lang.Object
org.ddogleg.chainrule.sym.SymOps

public class SymOps extends Object
Static sugar over Sym.of(CROperatorBackwardsJac) for the operators that exist today. Nothing here is privileged: every method is one of(...).in(...) expression a user could write for their own operator.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Sym
    clampLower(Sym value, int dof, double minimum)
    Holds a value at or above a floor, for feeding something that cannot accept what a solver might step to
    static Sym
    concat(Sym... parts)
    Joins residual groups into one row block, in argument order
    static Sym
    divide(Sym vectorA, Sym vectorB)
    vectorA / vectorB: element-wise division between the two vectors
    static Sym
    divideDamped(Sym vector, Sym scalar, double beta)
    vector ./ (beta + scalar): divide each element by a damped scalar.
    static Sym
    divideVS(Sym vector, Sym scalar)
    vector ./ scalar: divide each element in vector by scalar
    static SymGrid
    grid(String name, ConfigGridCoefND config, int width, int height)
    A bilinear knot grid conditional on a value, read as grid(...).at(u).of(v)
    static Sym
    mult(Sym vectorA, Sym vectorB)
    vectorA * vectorB: element-wise multiplication between the two vectors
    static Sym
    multVS(Sym vector, Sym scalar)
    vector .* scalar: multiply each element in vector by scalar
    static Sym
    plus(int dof, Sym a, Sym b)
    a + b, element-wise over dof values
    static Sym
    remap(int outputSize, Sym src, int... mappings)
    Rearranges elements of a vector: mappings[i] says which output each input lands in, -1 drops it
    static Sym
    residual(double weight, Sym estimated, Sym observed)
    weight*(observed - estimated): the residual row(s) of one measurement.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SymOps

      public SymOps()
  • Method Details

    • plus

      public static Sym plus(int dof, Sym a, Sym b)
      a + b, element-wise over dof values
    • remap

      public static Sym remap(int outputSize, Sym src, int... mappings)
      Rearranges elements of a vector: mappings[i] says which output each input lands in, -1 drops it
    • grid

      public static SymGrid grid(String name, ConfigGridCoefND config, int width, int height)
      A bilinear knot grid conditional on a value, read as grid(...).at(u).of(v)
    • clampLower

      public static Sym clampLower(Sym value, int dof, double minimum)
      Holds a value at or above a floor, for feeding something that cannot accept what a solver might step to
    • residual

      public static Sym residual(double weight, Sym estimated, Sym observed)
      weight*(observed - estimated): the residual row(s) of one measurement. The observation is a terminal, so it is constant by construction
    • divide

      public static Sym divide(Sym vectorA, Sym vectorB)
      vectorA / vectorB: element-wise division between the two vectors
    • divideVS

      public static Sym divideVS(Sym vector, Sym scalar)
      vector ./ scalar: divide each element in vector by scalar
    • divideDamped

      public static Sym divideDamped(Sym vector, Sym scalar, double beta)
      vector ./ (beta + scalar): divide each element by a damped scalar. For a scalar at or above zero, beta > 0 keeps the denominator away from zero
    • mult

      public static Sym mult(Sym vectorA, Sym vectorB)
      vectorA * vectorB: element-wise multiplication between the two vectors
    • multVS

      public static Sym multVS(Sym vector, Sym scalar)
      vector .* scalar: multiply each element in vector by scalar
    • concat

      public static Sym concat(Sym... parts)
      Joins residual groups into one row block, in argument order