Class Dfdx
- java.lang.Object
-
- dev.nm.analysis.function.rn2r1.AbstractRealScalarFunction
-
- dev.nm.analysis.function.rn2r1.univariate.AbstractUnivariateRealFunction
-
- dev.nm.analysis.differentiation.univariate.Dfdx
-
- All Implemented Interfaces:
Function<Vector,Double>
,RealScalarFunction
,UnivariateRealFunction
public class Dfdx extends AbstractUnivariateRealFunction
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. This implementation is a simple wrapper class around the built-in derivative functions, e.g.,DBeta
,DErf
, and the numerical derivative computation classes, e.g.,FiniteDifference
andRidders
.- See Also:
- Wikipedia: Derivative,
FiniteDifference
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Dfdx.Method
the available methods to compute the numerical derivative-
Nested classes/interfaces inherited from interface dev.nm.analysis.function.Function
Function.EvaluationException
-
-
Constructor Summary
Constructors Constructor Description Dfdx(UnivariateRealFunction f)
Construct, using the central 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
evaluate(double x)
Evaluate y = f(x).-
Methods inherited from class dev.nm.analysis.function.rn2r1.univariate.AbstractUnivariateRealFunction
evaluate
-
Methods inherited from class dev.nm.analysis.function.rn2r1.AbstractRealScalarFunction
dimensionOfDomain, dimensionOfRange
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface dev.nm.analysis.function.Function
dimensionOfDomain, dimensionOfRange
-
-
-
-
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 functionmethod
- the numerical method to use, c.f.,Dfdx.Method
-
Dfdx
public Dfdx(UnivariateRealFunction f)
Construct, using the central 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)
Description copied from interface:UnivariateRealFunction
Evaluate y = f(x).- Parameters:
x
- x- Returns:
- f(x)
-
-