OpenMM
|
This is a TabulatedFunction that computes a discrete two dimensional function f(x,y). More...
#include <TabulatedFunction.h>
Public Member Functions | |
Discrete2DFunction (int xsize, int ysize, const std::vector< double > &values) | |
Create a Discrete2DFunction f(x,y) based on a set of tabulated values. More... | |
void | getFunctionParameters (int &xsize, int &ysize, std::vector< double > &values) const |
Get the parameters for the tabulated function. More... | |
void | setFunctionParameters (int xsize, int ysize, const std::vector< double > &values) |
Set the parameters for the tabulated function. More... | |
Discrete2DFunction * | Copy () const |
Create a deep copy of the tabulated function. More... | |
Public Member Functions inherited from TabulatedFunction | |
virtual | ~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.
Discrete2DFunction | ( | int | xsize, |
int | ysize, | ||
const std::vector< double > & | values | ||
) |
Create a Discrete2DFunction f(x,y) based on a set of tabulated values.
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. |
|
virtual |
Create a deep copy of the tabulated function.
Implements TabulatedFunction.
void getFunctionParameters | ( | int & | xsize, |
int & | ysize, | ||
std::vector< double > & | values | ||
) | const |
Get the parameters for the tabulated function.
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. |
void setFunctionParameters | ( | int | xsize, |
int | ysize, | ||
const std::vector< double > & | values | ||
) |
Set the parameters for the tabulated function.
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. |