Discrete1DFunction
¶
-
class Discrete1DFunction : public OpenMM::TabulatedFunction¶
This is a TabulatedFunction that 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.
Public Functions
-
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)
-
virtual Discrete1DFunction *Copy() const¶
Create a deep copy of the tabulated function
- Deprecated:
This will be removed in a future release.
-
Discrete1DFunction(const std::vector<double> &values)¶