Package ffx.openmm
Class Discrete2DFunction
java.lang.Object
ffx.openmm.TabulatedFunction
ffx.openmm.Discrete2DFunction
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.
-
Field Summary
Fields inherited from class ffx.openmm.TabulatedFunction
pointer
-
Constructor Summary
ConstructorsConstructorDescriptionDiscrete2DFunction
(int xsize, int ysize, com.sun.jna.ptr.PointerByReference values) Create a Discrete2DFunction f(x,y) based on a set of tabulated values. -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Destroy the discrete 2D function.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.void
getFunctionParameters
(IntBuffer xsize, IntBuffer ysize, com.sun.jna.ptr.PointerByReference values) Get the parameters for the tabulated function.void
setFunctionParameters
(int xsize, int ysize, com.sun.jna.ptr.PointerByReference values) Set the parameters for the tabulated function.Methods inherited from class ffx.openmm.TabulatedFunction
getPeriodic, getPointer, getUpdateCount
-
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 directionysize
- the number of table elements along the y directionvalues
- 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 classTabulatedFunction
-
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 directionysize
- the number of table elements along the y directionvalues
- 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 directionysize
- the number of table elements along the y directionvalues
- 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 directionysize
- the number of table elements along the y directionvalues
- 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.
-