rvl.util
Class FunctionPointer

java.lang.Object
  |
  +--rvl.util.UniFunction
        |
        +--rvl.util.FunctionPointer

public class FunctionPointer
extends UniFunction

This class allows you to set up a UniFunction object for use in Solve, etc. You give the constructor the object or the class and the name of the function, which must have one double argument and return a double value. Accessors are provided to set up parameters


Fields inherited from class rvl.util.UniFunction
closedMax, closedMin, feps, maxIter, maxSearch, verbose, xeps, xMax, xMin
 
Constructor Summary
FunctionPointer(java.lang.Class cls, java.lang.String fcn)
          Constructor to set up a static method: public double fcn(double) as a UniFunction
FunctionPointer(java.lang.Object obj, java.lang.String fcn)
          Constructor to set up obj's method: public double fcn(double) as a UniFunction
 
Method Summary
static void main(java.lang.String[] argv)
           
 double of(double x)
          Required method of UniFunction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FunctionPointer

public FunctionPointer(java.lang.Object obj,
                       java.lang.String fcn)
Constructor to set up obj's method: public double fcn(double) as a UniFunction

FunctionPointer

public FunctionPointer(java.lang.Class cls,
                       java.lang.String fcn)
Constructor to set up a static method: public double fcn(double) as a UniFunction
Method Detail

of

public double of(double x)
Required method of UniFunction. Uses reflection to evaluate the function and return
Overrides:
of in class UniFunction

main

public static void main(java.lang.String[] argv)