SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.analysis.differentiation.univariate
Class Dfdx

java.lang.Object
  extended by com.numericalmethod.suanshu.analysis.function.rn2r1.UnivariateRealFunction
      extended by com.numericalmethod.suanshu.analysis.differentiation.univariate.Dfdx
All Implemented Interfaces:
Function, RealScalarFunction

public class Dfdx
extends UnivariateRealFunction

This class computes the first order derivative function of a univariate function.

The first derivative is a measure of how a function changes as its input changes. In other words, a derivative is how much a quantity changes if the input changes (by a very small amount). The derivative of a function at a particular point is the best linear approximation of the function at that point. For a univariate real function, the derivative at a point is the slope of the tangent line to the function at that point.

See Also:
Wikipedia: Derivative

Nested Class Summary
static class Dfdx.Method
          the methods available to compute numerical derivatives
 
Nested classes/interfaces inherited from interface com.numericalmethod.suanshu.analysis.function.Function
Function.EvaluationException
 
Constructor Summary
Dfdx(UnivariateRealFunction f)
          Construct, using finite difference, the first order derivative function of a univariate function f.
Dfdx(UnivariateRealFunction f, Dfdx.Method method)
          Construct the first order derivative function of a univariate function f.
 
Method Summary
 double evaluate(double x)
          Evaluate f'(x).
 
Methods inherited from class com.numericalmethod.suanshu.analysis.function.rn2r1.UnivariateRealFunction
dimension4Domain, dimension4Range, evaluate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dfdx

public Dfdx(UnivariateRealFunction f,
            Dfdx.Method method)
Construct the first order derivative function of a univariate function f.

Parameters:
f - a univariate function
method - the numerical method to use, c.f., Dfdx.Method

Dfdx

public Dfdx(UnivariateRealFunction f)
Construct, using finite difference, the first order derivative function of a univariate function f.

Parameters:
f - a univariate function
Method Detail

evaluate

public double evaluate(double x)
Evaluate f'(x).

Specified by:
evaluate in class UnivariateRealFunction
Parameters:
x - x
Returns:
f'(x)

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.