Interface Derivative<T extends CalculusFieldElement<T>>
-
- Type Parameters:
T- the type of the field elements
- All Superinterfaces:
CalculusFieldElement<T>,DifferentialAlgebra,FieldElement<T>
- All Known Subinterfaces:
Derivative1<T>
- All Known Implementing Classes:
DerivativeStructure,Gradient,SparseGradient,UnivariateDerivative,UnivariateDerivative1,UnivariateDerivative2
public interface Derivative<T extends CalculusFieldElement<T>> extends CalculusFieldElement<T>, DifferentialAlgebra
Interface representing both the value and the differentials of a function.- Since:
- 1.7
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Tacos()Arc cosine operation.default Tadd(double a)'+' operator.Tcompose(double... f)Compute composition of the instance by a univariate function.default Tcosh()Hyperbolic cosine operation.default intgetExponent()Return the exponent of the instance, removing the bias.doublegetPartialDerivative(int... orders)Get a partial derivative.default doublegetReal()Get the real value of the number.doublegetValue()Get the value part of the function.default Tlog10()Base 10 logarithm.default Tpow(T e)Power operation.default Tremainder(double a)IEEE remainder operator.default Tsinh()Hyperbolic sine operation.default Tsubtract(double a)'-' operator.default TwithValue(double value)Create a new object with new value (zeroth-order derivative, as passed as input) and same derivatives of order one and above.-
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 org.hipparchus.analysis.differentiation.DifferentialAlgebra
getFreeParameters, getOrder
-
Methods inherited from interface org.hipparchus.FieldElement
add, getField, isZero, multiply, negate, reciprocal
-
-
-
-
Method Detail
-
getReal
default double getReal()
Get the real value of the number.- Specified by:
getRealin interfaceFieldElement<T extends CalculusFieldElement<T>>- Returns:
- real value
-
getValue
double getValue()
Get the value part of the function.- Returns:
- value part of the value of the function
-
withValue
default T withValue(double value)
Create a new object with new value (zeroth-order derivative, as passed as input) and same derivatives of order one and above.This default implementation is there so that no API gets broken by the next release, which is not a major one. Custom inheritors should probably overwrite it.
- Parameters:
value- zeroth-order derivative of new represented function- Returns:
- new object with changed value
- Since:
- 3.1
-
getPartialDerivative
double getPartialDerivative(int... orders) throws MathIllegalArgumentExceptionGet a partial derivative.- 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:
getValue()
-
add
default T add(double a)
'+' operator.- Specified by:
addin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Parameters:
a- right hand side parameter of the operator- Returns:
- this+a
-
subtract
default T subtract(double a)
'-' operator.- Specified by:
subtractin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Parameters:
a- right hand side parameter of the operator- Returns:
- this-a
-
compose
T compose(double... f) throws MathIllegalArgumentException
Compute composition of the instance by a univariate function.- Parameters:
f- array of value and derivatives of the function at the current point (i.e. [f(getValue()), f'(getValue()), f''(getValue())...]).- Returns:
- f(this)
- Throws:
MathIllegalArgumentException- if the number of derivatives in the array is not equal toorder+ 1
-
log10
default T log10()
Base 10 logarithm.- Specified by:
log10in interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- base 10 logarithm of the instance
-
pow
default T pow(T e)
Power operation.- Specified by:
powin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Parameters:
e- exponent- Returns:
- thise
-
cosh
default T cosh()
Hyperbolic cosine operation.- Specified by:
coshin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- cosh(this)
-
sinh
default T sinh()
Hyperbolic sine operation.- Specified by:
sinhin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- sinh(this)
-
acos
default T acos()
Arc cosine operation.- Specified by:
acosin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- acos(this)
-
getExponent
default int getExponent()
Return the exponent of the instance, removing the bias.For double numbers of the form 2x, the unbiased exponent is exactly x.
- Specified by:
getExponentin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- exponent for the instance, without bias
-
remainder
default T remainder(double a)
IEEE remainder operator.- Specified by:
remainderin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Parameters:
a- right hand side parameter of the operator- Returns:
- this - n × a where n is the closest integer to this/a
-
-