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 Type
Method
Description
default T
acos()
Arc cosine operation.
default T
add(double a)
'+' operator.
T
compose(double... f)
Compute composition of the instance by a univariate function.
default T
cosh()
Hyperbolic cosine operation.
default int
getExponent()
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
pow(T e)
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 interface FieldElement<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 MathIllegalArgumentException
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 instance
MathIllegalArgumentException - if sum of derivation orders is larger than the instance limits

'+' operator.
Specified by:
add in interface CalculusFieldElement<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:
subtract in interface CalculusFieldElement<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 to order + 1
• log10

default T log10()
Base 10 logarithm.
Specified by:
log10 in interface CalculusFieldElement<T extends CalculusFieldElement<T>>
Returns:
base 10 logarithm of the instance
• pow

default T pow(T e)
Power operation.
Specified by:
pow in interface CalculusFieldElement<T extends CalculusFieldElement<T>>
Parameters:
e - exponent
Returns:
thise
• cosh

default T cosh()
Hyperbolic cosine operation.
Specified by:
cosh in interface CalculusFieldElement<T extends CalculusFieldElement<T>>
Returns:
cosh(this)
• sinh

default T sinh()
Hyperbolic sine operation.
Specified by:
sinh in interface CalculusFieldElement<T extends CalculusFieldElement<T>>
Returns:
sinh(this)
• acos

default T acos()
Arc cosine operation.
Specified by:
acos in interface CalculusFieldElement<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 interface CalculusFieldElement<T extends CalculusFieldElement<T>>
Returns:
exponent for the instance, without bias
• remainder

default T remainder(double a)
IEEE remainder operator.
Specified by:
remainder in interface CalculusFieldElement<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