Package ffx.openmm
Class Discrete3DFunction
java.lang.Object
ffx.openmm.TabulatedFunction
ffx.openmm.Discrete3DFunction
This is a TabulatedFunction that computes a discrete three dimensional function f(x,y,z).
To evaluate it, x, y, and z are each rounded to the nearest integer and the table element with those
indices is returned. If any index is outside the range [0, size), the result is undefined.
-
Field Summary
Fields inherited from class ffx.openmm.TabulatedFunction
pointer
-
Constructor Summary
ConstructorsConstructorDescriptionDiscrete3DFunction
(int xsize, int ysize, int zsize, com.sun.jna.ptr.PointerByReference values) Create a Discrete3DFunction f(x,y,z) based on a set of tabulated values. -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Destroy the discrete 3D function.void
getFunctionParameters
(com.sun.jna.ptr.IntByReference xsize, com.sun.jna.ptr.IntByReference ysize, com.sun.jna.ptr.IntByReference zsize, com.sun.jna.ptr.PointerByReference values) Get the parameters for the tabulated function.void
getFunctionParameters
(IntBuffer xsize, IntBuffer ysize, IntBuffer zsize, com.sun.jna.ptr.PointerByReference values) Get the parameters for the tabulated function.void
setFunctionParameters
(int xsize, int ysize, int zsize, 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
-
Discrete3DFunction
public Discrete3DFunction(int xsize, int ysize, int zsize, com.sun.jna.ptr.PointerByReference values) Create a Discrete3DFunction f(x,y,z) 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 directionzsize
- the number of table elements along the z directionvalues
- the tabulated values of the function f(x,y,z), ordered so that values[i+xsize*j+xsize*ysize*k] = f(i,j,k). This must be of length xsize*ysize*zsize.
-
-
Method Details
-
destroy
public void destroy()Destroy the discrete 3D 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.IntByReference zsize, 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 directionzsize
- the number of table elements along the z directionvalues
- the tabulated values of the function f(x,y,z), ordered so that values[i+xsize*j+xsize*ysize*k] = f(i,j,k). This must be of length xsize*ysize*zsize.
-
getFunctionParameters
public void getFunctionParameters(IntBuffer xsize, IntBuffer ysize, IntBuffer zsize, 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 directionzsize
- the number of table elements along the z directionvalues
- the tabulated values of the function f(x,y,z), ordered so that values[i+xsize*j+xsize*ysize*k] = f(i,j,k). This must be of length xsize*ysize*zsize.
-
setFunctionParameters
public void setFunctionParameters(int xsize, int ysize, int zsize, 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 directionzsize
- the number of table elements along the z directionvalues
- the tabulated values of the function f(x,y,z), ordered so that values[i+xsize*j+xsize*ysize*k] = f(i,j,k). This must be of length xsize*ysize*zsize.
-