Discrete1DFunction¶
-
class
OpenMM::Discrete1DFunction¶ This is a
TabulatedFunctionthat computes a discrete one dimensional function f(x). To evaluate it, x is rounded to the nearest integer and the table element with that index is returned. If the index is outside the range [0, size), the result is undefined.Methods
Discrete1DFunctionCreate a Discrete1DFunctionf(x) based on a set of tabulated values.getFunctionParametersGet the parameters for the tabulated function. setFunctionParametersSet the parameters for the tabulated function. CopyCreate a deep copy of the tabulated function -
Discrete1DFunction(const std::vector<double> &values)¶ Create a
Discrete1DFunction()f(x) based on a set of tabulated values.Parameters: - values – the tabulated values of the function f(x)
-
void
getFunctionParameters(std::vector<double> &values) const¶ Get the parameters for the tabulated function.
Parameters: - values – [out] the tabulated values of the function f(x)
-
void
setFunctionParameters(const std::vector<double> &values)¶ Set the parameters for the tabulated function.
Parameters: - values – the tabulated values of the function f(x)
-
Discrete1DFunction *
Copy() const¶ Create a deep copy of the tabulated function
Deprecated
This will be removed in a future release.
-