Package ffx.openmm

Class Discrete2DFunction

java.lang.Object
ffx.openmm.TabulatedFunction
ffx.openmm.Discrete2DFunction

public class Discrete2DFunction extends TabulatedFunction
This is a TabulatedFunction that computes a discrete two dimensional function f(x,y). To evaluate it, x and y are each rounded to the nearest integer and the table element with those indices is returned. If either index is outside the range [0, size), the result is undefined.
  • Constructor Details

    • Discrete2DFunction

      public Discrete2DFunction(int xsize, int ysize, com.sun.jna.ptr.PointerByReference values)
      Create a Discrete2DFunction f(x,y) based on a set of tabulated values.
      Parameters:
      xsize - the number of table elements along the x direction
      ysize - the number of table elements along the y direction
      values - the tabulated values of the function f(x,y), ordered so that values[i+xsize*j] = f(i,j). This must be of length xsize*ysize.
  • Method Details

    • destroy

      public void destroy()
      Destroy the discrete 2D function.
      Specified by:
      destroy in class TabulatedFunction
    • getFunctionParameters

      public void getFunctionParameters(com.sun.jna.ptr.IntByReference xsize, com.sun.jna.ptr.IntByReference ysize, com.sun.jna.ptr.PointerByReference values)
      Get the parameters for the tabulated function.
      Parameters:
      xsize - the number of table elements along the x direction
      ysize - the number of table elements along the y direction
      values - the tabulated values of the function f(x,y), ordered so that values[i+xsize*j] = f(i,j). This must be of length xsize*ysize.
    • getFunctionParameters

      public void getFunctionParameters(IntBuffer xsize, IntBuffer ysize, com.sun.jna.ptr.PointerByReference values)
      Get the parameters for the tabulated function.
      Parameters:
      xsize - the number of table elements along the x direction
      ysize - the number of table elements along the y direction
      values - the tabulated values of the function f(x,y), ordered so that values[i+xsize*j] = f(i,j). This must be of length xsize*ysize.
    • setFunctionParameters

      public void setFunctionParameters(int xsize, int ysize, com.sun.jna.ptr.PointerByReference values)
      Set the parameters for the tabulated function.
      Parameters:
      xsize - the number of table elements along the x direction
      ysize - the number of table elements along the y direction
      values - the tabulated values of the function f(x,y), ordered so that values[i+xsize*j] = f(i,j). This must be of length xsize*ysize.