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>
,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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UnivariateDerivative()
Empty constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract double
getDerivative(int n)
Get a derivative from the univariate derivative.int
getFreeParameters()
Get the number of free parameters.double
getPartialDerivative(int... orders)
Get a partial derivative.abstract DerivativeStructure
toDerivativeStructure()
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, acos, acosh, add, asin, asinh, atan, atan2, atanh, cbrt, ceil, copySign, copySign, cos, cosh, divide, exp, expm1, floor, getExponent, getPi, hypot, isFinite, isInfinite, isNaN, linearCombination, linearCombination, linearCombination, linearCombination, linearCombination, linearCombination, linearCombination, linearCombination, log, log10, log1p, multiply, newInstance, norm, pow, pow, pow, reciprocal, remainder, remainder, rint, rootN, round, scalb, sign, sin, sinCos, sinh, sinhCosh, sqrt, subtract, tan, tanh, toDegrees, toRadians, ulp
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface org.hipparchus.analysis.differentiation.Derivative
compose, getOrder, getValue
-
-
-
-
Method Detail
-
getFreeParameters
public int getFreeParameters()
Get the number of free parameters.- Specified by:
getFreeParameters
in interfaceDerivative<T extends UnivariateDerivative<T>>
- Returns:
- number of free parameters
-
getPartialDerivative
public double getPartialDerivative(int... orders) throws MathIllegalArgumentException
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:
Derivative.getValue()
-
getDerivative
public abstract double getDerivative(int n) throws MathIllegalArgumentException
Get a derivative from the univariate derivative.- Parameters:
n
- derivation order (must be between 0 andDerivative.getOrder()
, both inclusive)- Returns:
- nth derivative
- Throws:
MathIllegalArgumentException
- if n is either negative or strictly larger thanDerivative.getOrder()
-
toDerivativeStructure
public abstract DerivativeStructure toDerivativeStructure()
Convert the instance to aDerivativeStructure
.- Returns:
- derivative structure with same value and derivative as the instance
-
-