Package ffx.openmm
Class Continuous2DFunction
java.lang.Object
ffx.openmm.TabulatedFunction
ffx.openmm.Continuous2DFunction
This is a TabulatedFunction that computes a continuous two dimensional function.
-
Field Summary
Fields inherited from class ffx.openmm.TabulatedFunction
pointer
-
Constructor Summary
ConstructorsConstructorDescriptionContinuous2DFunction
(com.sun.jna.ptr.PointerByReference values, int xsize, int ysize, double xmin, double xmax, double ymin, double ymax, boolean periodic) Create a Continuous2DFunction f(x,y) based on a set of tabulated values. -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Destroy the continuous 2D function.void
getFunctionParameters
(com.sun.jna.ptr.PointerByReference values, com.sun.jna.ptr.IntByReference xsize, com.sun.jna.ptr.IntByReference ysize, com.sun.jna.ptr.DoubleByReference xmin, com.sun.jna.ptr.DoubleByReference xmax, com.sun.jna.ptr.DoubleByReference ymin, com.sun.jna.ptr.DoubleByReference ymax) Get the parameters for the tabulated function.void
setFunctionParameters
(com.sun.jna.ptr.PointerByReference values, int xsize, int ysize, double xmin, double xmax, double ymin, double ymax) Set the parameters for the tabulated function.Methods inherited from class ffx.openmm.TabulatedFunction
getPeriodic, getPointer, getUpdateCount
-
Constructor Details
-
Continuous2DFunction
public Continuous2DFunction(com.sun.jna.ptr.PointerByReference values, int xsize, int ysize, double xmin, double xmax, double ymin, double ymax, boolean periodic) Create a Continuous2DFunction f(x,y) based on a set of tabulated values.- Parameters:
values
- the tabulated values of the function f(x,y) at xsize uniformly spaced values of x between xmin and xmax, and ysize values of y between ymin and ymax. A natural cubic spline is used to interpolate between the tabulated values. The function is assumed to be zero when x or y is outside its specified range. The values should be ordered so that values[i+xsize*j] = f(x_i,y_j), where x_i is the i'th uniformly spaced value of x. This must be of length xsize*ysize.xsize
- the number of table elements along the x directionysize
- the number of table elements along the y directionxmin
- the value of x corresponding to the first element of valuesxmax
- the value of x corresponding to the last element of valuesymin
- the value of y corresponding to the first element of valuesymax
- the value of y corresponding to the last element of valuesperiodic
- whether the interpolated function is periodic
-
-
Method Details
-
destroy
public void destroy()Destroy the continuous 2D function.- Specified by:
destroy
in classTabulatedFunction
-
getFunctionParameters
public void getFunctionParameters(com.sun.jna.ptr.PointerByReference values, com.sun.jna.ptr.IntByReference xsize, com.sun.jna.ptr.IntByReference ysize, com.sun.jna.ptr.DoubleByReference xmin, com.sun.jna.ptr.DoubleByReference xmax, com.sun.jna.ptr.DoubleByReference ymin, com.sun.jna.ptr.DoubleByReference ymax) Get the parameters for the tabulated function.- Parameters:
values
- the tabulated values of the function f(x,y) at xsize uniformly spaced values of x between xmin and xmax, and ysize values of y between ymin and ymax. A natural cubic spline is used to interpolate between the tabulated values. The function is assumed to be zero when x or y is outside its specified range. The values should be ordered so that values[i+xsize*j] = f(x_i,y_j), where x_i is the i'th uniformly spaced value of x. This must be of length xsize*ysize.xsize
- the number of table elements along the x directionysize
- the number of table elements along the y directionxmin
- the value of x corresponding to the first element of valuesxmax
- the value of x corresponding to the last element of valuesymin
- the value of y corresponding to the first element of valuesymax
- the value of y corresponding to the last element of values
-
setFunctionParameters
public void setFunctionParameters(com.sun.jna.ptr.PointerByReference values, int xsize, int ysize, double xmin, double xmax, double ymin, double ymax) Set the parameters for the tabulated function.- Parameters:
values
- the tabulated values of the function f(x,y) at xsize uniformly spaced values of x between xmin and xmax, and ysize values of y between ymin and ymax. A natural cubic spline is used to interpolate between the tabulated values. The function is assumed to be zero when x or y is outside its specified range. The values should be ordered so that values[i+xsize*j] = f(x_i,y_j), where x_i is the i'th uniformly spaced value of x. This must be of length xsize*ysize.xsize
- the number of table elements along the x directionysize
- the number of table elements along the y directionxmin
- the value of x corresponding to the first element of valuesxmax
- the value of x corresponding to the last element of valuesymin
- the value of y corresponding to the first element of valuesymax
- the value of y corresponding to the last element of values
-