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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract doublegetDerivative(int n) Get a derivative from the univariate derivative.intGet the number of free parameters.doublegetPartialDerivative(int... orders) Get a partial derivative.abstract DerivativeStructureConvert the instance to aDerivativeStructure.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hipparchus.CalculusFieldElement
abs, acosh, asin, asinh, atan, atan2, atanh, cbrt, ceil, copySign, copySign, cos, divide, divide, exp, expm1, floor, getAddendum, 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, ulpMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.hipparchus.analysis.differentiation.Derivative
acos, add, compose, cosh, getExponent, getReal, getValue, log10, pow, remainder, sinh, subtract, withValueMethods inherited from interface org.hipparchus.analysis.differentiation.DifferentialAlgebra
getOrderMethods inherited from interface org.hipparchus.FieldElement
add, getField, isZero, multiply, negate, reciprocal
-
Constructor Details
-
UnivariateDerivative
protected 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:
getFreeParametersin interfaceDifferentialAlgebra- Returns:
- number of free parameters
-
getPartialDerivative
Get a partial derivative.- Specified by:
getPartialDerivativein 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 instanceMathIllegalArgumentException- if sum of derivation orders is larger than the instance limits- 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
-