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 SummaryConstructors
- 
Method SummaryModifier 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- 
RMFuncpublic RMFunc()
 
- 
- 
Method Details- 
fpublic abstract double f(double x) 
- 
fprimepublic 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.
- 
integratepublic 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)
- 
solvepublic double solve(double a) Uses Newton's method to find numerical solution to f(x)=a. (override if you know the exact solution)
 
-