Package com.inductiveautomation.rm.base
Class RMMath.RMFunc
java.lang.Object
com.inductiveautomation.rm.base.RMMath.RMFunc
- Direct Known Subclasses:
 RMCurveFit.InverseFunc,RMCurveFit.NevilleFunc,RMCurveFit.ScaledFunc
- Enclosing class:
 - RMMath
 
A class used to specify an arbitrary mathematical function.
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionabstract doublef(double x) doublefprime(double x, int order) nth derivative of function at x.doubleintegrate(double start, double end, int npts) Numerical integration of a function in the interval [start, end].doublesolve(double a) Uses Newton's method to find numerical solution to f(x)=a. 
- 
Constructor Details
- 
RMFunc
public RMFunc() 
 - 
 - 
Method Details
- 
f
public abstract double f(double x)  - 
fprime
public double fprime(double x, int order) nth derivative of function at x. Base class calculates it numerically, but you could override this if you know the exact form. order=1 for first derivative, 2 for second derivative, etc. - 
integrate
public double integrate(double start, double end, int npts) Numerical integration of a function in the interval [start, end]. Uses composite Simpson's method. (override if you know the exact form) - 
solve
public double solve(double a) Uses Newton's method to find numerical solution to f(x)=a. (override if you know the exact solution) 
 -