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:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedUnivariateDerivative()Empty constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract doublegetDerivative(int n)Get a derivative from the univariate derivative.intgetFreeParameters()Get the number of free parameters.doublegetPartialDerivative(int... orders)Get a partial derivative.abstract DerivativeStructuretoDerivativeStructure()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, 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, 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
-
-
-
-
Method Detail
-
getFreeParameters
public int getFreeParameters()
Get the number of free parameters.- Specified by:
getFreeParametersin interfaceDifferentialAlgebra- Returns:
- number of free parameters
-
getPartialDerivative
public double getPartialDerivative(int... orders) throws MathIllegalArgumentExceptionGet 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 instance- See Also:
Derivative.getValue()
-
getDerivative
public abstract double getDerivative(int n) throws MathIllegalArgumentExceptionGet 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
public abstract DerivativeStructure toDerivativeStructure()
Convert the instance to aDerivativeStructure.- Returns:
- derivative structure with same value and derivative as the instance
-
-