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
Modifier and TypeMethodDescriptiondefault T
acos()
Arc cosine operation.default T
add
(double a) '+' operator.compose
(double... f) Compute composition of the instance by a univariate function.default T
cosh()
Hyperbolic cosine operation.default int
Return the exponent of the instance, removing the bias.double
getPartialDerivative
(int... orders) Get a partial derivative.default double
getReal()
Get the real value of the number.double
getValue()
Get the value part of the function.default T
log10()
Base 10 logarithm.default T
Power operation.default T
remainder
(double a) IEEE remainder operator.default T
sinh()
Hyperbolic sine operation.default T
subtract
(double a) '-' operator.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.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 org.hipparchus.analysis.differentiation.DifferentialAlgebra
getFreeParameters, getOrder
Methods inherited from interface org.hipparchus.FieldElement
add, getField, isZero, multiply, negate, reciprocal
-
Method Details
-
getReal
default double getReal()Get the real value of the number.- Specified by:
getReal
in 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
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
Get 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:
-
add
'+' operator.- Specified by:
add
in interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>
- Parameters:
a
- right hand side parameter of the operator- Returns:
- this+a
-
subtract
'-' operator.- Specified by:
subtract
in interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>
- Parameters:
a
- right hand side parameter of the operator- Returns:
- this-a
-
compose
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
Base 10 logarithm.- Specified by:
log10
in interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>
- Returns:
- base 10 logarithm of the instance
-
pow
Power operation.- Specified by:
pow
in interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>
- Parameters:
e
- exponent- Returns:
- thise
-
cosh
Hyperbolic cosine operation.- Specified by:
cosh
in interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>
- Returns:
- cosh(this)
-
sinh
Hyperbolic sine operation.- Specified by:
sinh
in interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>
- Returns:
- sinh(this)
-
acos
Arc cosine operation.- Specified by:
acos
in 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:
getExponent
in interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>
- Returns:
- exponent for the instance, without bias
-
remainder
IEEE remainder operator.- Specified by:
remainder
in 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
-