package umontreal.iro.lecuyer.functions;



/**
 * Represents a mathematical function whose
 * nth derivative can be computed using
 * {@link #derivative(double, int) derivative}.
 * 
 */
public interface MathFunctionWithDerivative extends MathFunction {


   /**
    * Computes (or estimates) the nth derivative 
    *    of the function at point x.
    *    For n = 0, this returns the result of 
    *    {@link umontreal.iro.lecuyer.functions.MathFunction#evaluate(double) evaluate}.
    * 
    * @param x the point to evaluate the derivate to.
    * 
    *    @param n the order of the derivative.
    * 
    *    @return the resulting derivative.
    *    @exception IllegalArgumentException if n is negative or 0.
    * 
    */
   public double derivative (double x, int n);
}

 

Ads help maintain this website.