OpenMM
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Continuous3DFunction Class Reference

This is a TabulatedFunction that computes a continuous three dimensional function. More...

#include <TabulatedFunction.h>

+ Inheritance diagram for Continuous3DFunction:

Public Member Functions

 Continuous3DFunction (int xsize, int ysize, int zsize, const std::vector< double > &values, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
 Create a Continuous3DFunction f(x,y,z) based on a set of tabulated values. More...
 
void getFunctionParameters (int &xsize, int &ysize, int &zsize, std::vector< double > &values, double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax) const
 Get the parameters for the tabulated function. More...
 
void setFunctionParameters (int xsize, int ysize, int zsize, const std::vector< double > &values, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
 Set the parameters for the tabulated function. More...
 
Continuous3DFunctionCopy () const
 Create a deep copy of the tabulated function. More...
 
- Public Member Functions inherited from TabulatedFunction
virtual ~TabulatedFunction ()
 

Detailed Description

This is a TabulatedFunction that computes a continuous three dimensional function.

Constructor & Destructor Documentation

Continuous3DFunction ( int  xsize,
int  ysize,
int  zsize,
const std::vector< double > &  values,
double  xmin,
double  xmax,
double  ymin,
double  ymax,
double  zmin,
double  zmax 
)

Create a Continuous3DFunction f(x,y,z) based on a set of tabulated values.

Parameters
valuesthe tabulated values of the function f(x,y,z) at xsize uniformly spaced values of x between xmin and xmax, ysize values of y between ymin and ymax, and zsize values of z between zmin and zmax. A natural cubic spline is used to interpolate between the tabulated values. The function is assumed to be zero when x, y, or z is outside its specified range. The values should be ordered so that values[i+xsize*j+xsize*ysize*k] = f(x_i,y_j,z_k), where x_i is the i'th uniformly spaced value of x. This must be of length xsize*ysize*zsize.
xsizethe number of table elements along the x direction
ysizethe number of table elements along the y direction
ysizethe number of table elements along the z direction
xminthe value of x corresponding to the first element of values
xmaxthe value of x corresponding to the last element of values
yminthe value of y corresponding to the first element of values
ymaxthe value of y corresponding to the last element of values
zminthe value of z corresponding to the first element of values
zmaxthe value of z corresponding to the last element of values

Member Function Documentation

Continuous3DFunction* Copy ( ) const
virtual

Create a deep copy of the tabulated function.

Implements TabulatedFunction.

void getFunctionParameters ( int &  xsize,
int &  ysize,
int &  zsize,
std::vector< double > &  values,
double &  xmin,
double &  xmax,
double &  ymin,
double &  ymax,
double &  zmin,
double &  zmax 
) const

Get the parameters for the tabulated function.

Parameters
valuesthe tabulated values of the function f(x,y,z) at xsize uniformly spaced values of x between xmin and xmax, ysize values of y between ymin and ymax, and zsize values of z between zmin and zmax. A natural cubic spline is used to interpolate between the tabulated values. The function is assumed to be zero when x, y, or z is outside its specified range. The values should be ordered so that values[i+xsize*j+xsize*ysize*k] = f(x_i,y_j,z_k), where x_i is the i'th uniformly spaced value of x. This must be of length xsize*ysize*zsize.
xsizethe number of table elements along the x direction
ysizethe number of table elements along the y direction
ysizethe number of table elements along the z direction
xminthe value of x corresponding to the first element of values
xmaxthe value of x corresponding to the last element of values
yminthe value of y corresponding to the first element of values
ymaxthe value of y corresponding to the last element of values
zminthe value of z corresponding to the first element of values
zmaxthe value of z corresponding to the last element of values
void setFunctionParameters ( int  xsize,
int  ysize,
int  zsize,
const std::vector< double > &  values,
double  xmin,
double  xmax,
double  ymin,
double  ymax,
double  zmin,
double  zmax 
)

Set the parameters for the tabulated function.

Parameters
valuesthe tabulated values of the function f(x,y,z) at xsize uniformly spaced values of x between xmin and xmax, ysize values of y between ymin and ymax, and zsize values of z between zmin and zmax. A natural cubic spline is used to interpolate between the tabulated values. The function is assumed to be zero when x, y, or z is outside its specified range. The values should be ordered so that values[i+xsize*j+xsize*ysize*k] = f(x_i,y_j,z_k), where x_i is the i'th uniformly spaced value of x. This must be of length xsize*ysize*zsize.
xsizethe number of table elements along the x direction
ysizethe number of table elements along the y direction
ysizethe number of table elements along the z direction
xminthe value of x corresponding to the first element of values
xmaxthe value of x corresponding to the last element of values
yminthe value of y corresponding to the first element of values
ymaxthe value of y corresponding to the last element of values
zminthe value of z corresponding to the first element of values
zmaxthe value of z corresponding to the last element of values

The documentation for this class was generated from the following file: