Class UnivariateDerivative<T extends UnivariateDerivative<T>>
java.lang.Object
org.hipparchus.analysis.differentiation.UnivariateDerivative<T>
- Type Parameters:
T
- the type of the function derivative
- All Implemented Interfaces:
Serializable
,Comparable<T>
,Derivative<T>
,DifferentialAlgebra
,CalculusFieldElement<T>
,FieldElement<T>
- Direct Known Subclasses:
UnivariateDerivative1
,UnivariateDerivative2
public abstract class UnivariateDerivative<T extends UnivariateDerivative<T>>
extends Object
implements Derivative<T>, Serializable, Comparable<T>
Abstract class representing both the value and the differentials of a function.
- Since:
- 1.7
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract double
getDerivative
(int n) Get a derivative from the univariate derivative.int
Get the number of free parameters.double
getPartialDerivative
(int... orders) Get a partial derivative.abstract DerivativeStructure
Convert the instance to aDerivativeStructure
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hipparchus.CalculusFieldElement
abs, acosh, asin, asinh, atan, atan2, atanh, cbrt, ceil, copySign, copySign, cos, divide, divide, exp, expm1, floor, getPi, hypot, isFinite, isInfinite, isNaN, linearCombination, linearCombination, linearCombination, linearCombination, linearCombination, linearCombination, linearCombination, linearCombination, log, log1p, multiply, multiply, newInstance, norm, pow, pow, remainder, rint, rootN, round, scalb, sign, sin, sinCos, sinhCosh, sqrt, square, subtract, tan, tanh, toDegrees, toRadians, ulp
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface org.hipparchus.analysis.differentiation.Derivative
acos, add, compose, cosh, getExponent, getReal, getValue, log10, pow, remainder, sinh, subtract, withValue
Methods inherited from interface org.hipparchus.analysis.differentiation.DifferentialAlgebra
getOrder
Methods inherited from interface org.hipparchus.FieldElement
add, getField, isZero, multiply, negate, reciprocal
-
Constructor Details
-
UnivariateDerivative
public UnivariateDerivative()Empty constructor.This constructor is not strictly necessary, but it prevents spurious javadoc warnings with JDK 18 and later.
- Since:
- 3.0
-
-
Method Details
-
getFreeParameters
public int getFreeParameters()Get the number of free parameters.- Specified by:
getFreeParameters
in interfaceDifferentialAlgebra
- Returns:
- number of free parameters
-
getPartialDerivative
Get a partial derivative.- Specified by:
getPartialDerivative
in interfaceDerivative<T extends UnivariateDerivative<T>>
- Parameters:
orders
- derivation orders with respect to each variable (if all orders are 0, the value is returned)- Returns:
- partial derivative
- Throws:
MathIllegalArgumentException
- if the numbers of variables does not match the instance- See Also:
-
getDerivative
Get a derivative from the univariate derivative.- Parameters:
n
- derivation order (must be between 0 andDifferentialAlgebra.getOrder()
, both inclusive)- Returns:
- nth derivative
- Throws:
MathIllegalArgumentException
- if n is either negative or strictly larger thanDifferentialAlgebra.getOrder()
-
toDerivativeStructure
Convert the instance to aDerivativeStructure
.- Returns:
- derivative structure with same value and derivative as the instance
-