Class GridCoefND

java.lang.Object
org.ddogleg.chainrule.grid.GridCoefND

public class GridCoefND extends Object

A grid with a set of coefficients at every vertex that act as a set of parameters for a function, such as a polynomial or spline. The shape lives in config and the coefficients stored in a flat array, laid out knot by knot in row major order.

Storage format

  • name: string terminating with '\n'
  • config: yaml serialized config on a single line terminating with '\n'
  • length: string terminating with '\n'
  • parameters: big endian double array
  • Field Details

    • config

      public final ConfigGridCoefND config
      Shape of the grid. Says how long parameters has to be
    • parameters

      public double[] parameters
      Coefficients for every knot, config.dof() of them
  • Constructor Details

    • GridCoefND

      public GridCoefND()
    • GridCoefND

      public GridCoefND(ConfigGridCoefND config)
  • Method Details

    • configure

      public GridCoefND configure(ConfigGridCoefND config)
      Sets the shape and sizes the coefficients to match, leaving them at zero
    • configure

      public GridCoefND configure(ConfigGridCoefND config, int minAxis)
      configure(ConfigGridCoefND) with the per-axis knot minimum given, so a nearest-neighbor field can store a 1x1 grid
    • setTo

      public GridCoefND setTo(GridCoefND src)
    • reset

      public GridCoefND reset()
    • isIdentical

      public boolean isIdentical(GridCoefND o)
      True if every field matches exactly. Coefficients are compared bit for bit, since this is used to check that saving and loading changed nothing