Skip navigation links
org.hipparchus.analysis.differentiation

Class FieldDerivativeStructure<T extends CalculusFieldElement<T>>

• java.lang.Object
• org.hipparchus.analysis.differentiation.FieldDerivativeStructure<T>
• Method Summary

All Methods
Modifier and Type Method and Description
FieldDerivativeStructure<T> abs()
absolute value.
FieldDerivativeStructure<T> acos()
Arc cosine operation.
FieldDerivativeStructure<T> acosh()
Inverse hyperbolic cosine operation.
FieldDerivativeStructure<T> add(double a)
'+' operator.
FieldDerivativeStructure<T> add(FieldDerivativeStructure<T> a)
Compute this + a.
FieldDerivativeStructure<T> add(T a)
'+' operator.
FieldDerivativeStructure<T> asin()
Arc sine operation.
FieldDerivativeStructure<T> asinh()
Inverse hyperbolic sine operation.
FieldDerivativeStructure<T> atan()
Arc tangent operation.
FieldDerivativeStructure<T> atan2(FieldDerivativeStructure<T> x)
Two arguments arc tangent operation.
static <T extends CalculusFieldElement<T>>FieldDerivativeStructure<T> atan2(FieldDerivativeStructure<T> y, FieldDerivativeStructure<T> x)
Two arguments arc tangent operation.
FieldDerivativeStructure<T> atanh()
Inverse hyperbolic tangent operation.
FieldDerivativeStructure<T> cbrt()
Cubic root.
FieldDerivativeStructure<T> ceil()
Get the smallest whole number larger than instance.
FieldDerivativeStructure<T> compose(double... f)
Compute composition of the instance by a univariate function.
FieldDerivativeStructure<T> compose(T... f)
Compute composition of the instance by a univariate function.
FieldDerivativeStructure<T> copySign(double sign)
Returns the instance with the sign of the argument.
FieldDerivativeStructure<T> copySign(FieldDerivativeStructure<T> sign)
Returns the instance with the sign of the argument.
FieldDerivativeStructure<T> copySign(T sign)
Returns the instance with the sign of the argument.
FieldDerivativeStructure<T> cos()
Cosine operation.
FieldDerivativeStructure<T> cosh()
Hyperbolic cosine operation.
FieldDerivativeStructure<T> differentiate(int varIndex, int differentiationOrder)
Differentiate w.r.t.
FieldDerivativeStructure<T> divide(double a)
'÷' operator.
FieldDerivativeStructure<T> divide(FieldDerivativeStructure<T> a)
Compute this ÷ a.
FieldDerivativeStructure<T> divide(T a)
'÷' operator.
FieldDerivativeStructure<T> exp()
Exponential.
FieldDerivativeStructure<T> expm1()
Exponential minus 1.
FieldDerivativeStructure<T> floor()
Get the largest whole number smaller than instance.
T[] getAllDerivatives()
Get all partial derivatives.
int getExponent()
Return the exponent of the instance value, removing the bias.
FDSFactory<T> getFactory()
Get the factory that built the instance.
Field<FieldDerivativeStructure<T>> getField()
Get the Field to which the instance belongs.
int getFreeParameters()
Get the number of free parameters.
int getOrder()
Get the derivation order.
T getPartialDerivative(int... orders)
Get a partial derivative.
FieldDerivativeStructure<T> getPi()
Get the Archimedes constant π.
double getReal()
Get the real value of the number.
T getValue()
Get the value part of the derivative structure.
FieldDerivativeStructure<T> hypot(FieldDerivativeStructure<T> y)
Returns the hypotenuse of a triangle with sides this and y - sqrt(this2 +y2) avoiding intermediate overflow or underflow.
static <T extends CalculusFieldElement<T>>FieldDerivativeStructure<T> hypot(FieldDerivativeStructure<T> x, FieldDerivativeStructure<T> y)
Returns the hypotenuse of a triangle with sides x and y - sqrt(x2 +y2) avoiding intermediate overflow or underflow.
FieldDerivativeStructure<T> integrate(int varIndex, int integrationOrder)
Integrate w.r.t.
FieldDerivativeStructure<T> linearCombination(double[] a, FieldDerivativeStructure<T>[] b)
Compute a linear combination.
FieldDerivativeStructure<T> linearCombination(double a1, FieldDerivativeStructure<T> b1, double a2, FieldDerivativeStructure<T> b2)
Compute a linear combination.
FieldDerivativeStructure<T> linearCombination(double a1, FieldDerivativeStructure<T> b1, double a2, FieldDerivativeStructure<T> b2, double a3, FieldDerivativeStructure<T> b3)
Compute a linear combination.
FieldDerivativeStructure<T> linearCombination(double a1, FieldDerivativeStructure<T> b1, double a2, FieldDerivativeStructure<T> b2, double a3, FieldDerivativeStructure<T> b3, double a4, FieldDerivativeStructure<T> b4)
Compute a linear combination.
FieldDerivativeStructure<T> linearCombination(FieldDerivativeStructure<T>[] a, FieldDerivativeStructure<T>[] b)
Compute a linear combination.
FieldDerivativeStructure<T> linearCombination(FieldDerivativeStructure<T> a1, FieldDerivativeStructure<T> b1, FieldDerivativeStructure<T> a2, FieldDerivativeStructure<T> b2)
Compute a linear combination.
FieldDerivativeStructure<T> linearCombination(FieldDerivativeStructure<T> a1, FieldDerivativeStructure<T> b1, FieldDerivativeStructure<T> a2, FieldDerivativeStructure<T> b2, FieldDerivativeStructure<T> a3, FieldDerivativeStructure<T> b3)
Compute a linear combination.
FieldDerivativeStructure<T> linearCombination(FieldDerivativeStructure<T> a1, FieldDerivativeStructure<T> b1, FieldDerivativeStructure<T> a2, FieldDerivativeStructure<T> b2, FieldDerivativeStructure<T> a3, FieldDerivativeStructure<T> b3, FieldDerivativeStructure<T> a4, FieldDerivativeStructure<T> b4)
Compute a linear combination.
FieldDerivativeStructure<T> linearCombination(T[] a, FieldDerivativeStructure<T>[] b)
Compute a linear combination.
FieldDerivativeStructure<T> linearCombination(T a1, FieldDerivativeStructure<T> b1, T a2, FieldDerivativeStructure<T> b2)
Compute a linear combination.
FieldDerivativeStructure<T> linearCombination(T a1, FieldDerivativeStructure<T> b1, T a2, FieldDerivativeStructure<T> b2, T a3, FieldDerivativeStructure<T> b3)
Compute a linear combination.
FieldDerivativeStructure<T> linearCombination(T a1, FieldDerivativeStructure<T> b1, T a2, FieldDerivativeStructure<T> b2, T a3, FieldDerivativeStructure<T> b3, T a4, FieldDerivativeStructure<T> b4)
Compute a linear combination.
FieldDerivativeStructure<T> log()
Natural logarithm.
FieldDerivativeStructure<T> log10()
Base 10 logarithm.
FieldDerivativeStructure<T> log1p()
Shifted natural logarithm.
FieldDerivativeStructure<T> multiply(double a)
'×' operator.
FieldDerivativeStructure<T> multiply(FieldDerivativeStructure<T> a)
Compute this × a.
FieldDerivativeStructure<T> multiply(int n)
Compute n × this.
FieldDerivativeStructure<T> multiply(T a)
'×' operator.
FieldDerivativeStructure<T> negate()
Returns the additive inverse of this element.
FieldDerivativeStructure<T> newInstance(double value)
Create an instance corresponding to a constant real value.
FieldDerivativeStructure<T> pow(double p)
Power operation.
static <T extends CalculusFieldElement<T>>FieldDerivativeStructure<T> pow(double a, FieldDerivativeStructure<T> x)
Compute ax where a is a double and x a FieldDerivativeStructure
FieldDerivativeStructure<T> pow(FieldDerivativeStructure<T> e)
Power operation.
FieldDerivativeStructure<T> pow(int n)
Integer power operation.
FieldDerivativeStructure<T> rebase(FieldDerivativeStructure<T>... p)
Rebase instance with respect to low level parameter functions.
FieldDerivativeStructure<T> reciprocal()
Returns the multiplicative inverse of this element.
FieldDerivativeStructure<T> remainder(double a)
IEEE remainder operator.
FieldDerivativeStructure<T> remainder(FieldDerivativeStructure<T> a)
IEEE remainder operator.
FieldDerivativeStructure<T> remainder(T a)
IEEE remainder operator.
FieldDerivativeStructure<T> rint()
Get the whole number that is the nearest to the instance, or the even one if x is exactly half way between two integers.
FieldDerivativeStructure<T> rootN(int n)
Nth root.
FieldDerivativeStructure<T> scalb(int n)
Multiply the instance by a power of 2.
FieldDerivativeStructure<T> sign()
Compute the sign of the instance.
FieldDerivativeStructure<T> sin()
Sine operation.
FieldSinCos<FieldDerivativeStructure<T>> sinCos()
Combined Sine and Cosine operation.
FieldDerivativeStructure<T> sinh()
Hyperbolic sine operation.
FieldSinhCosh<FieldDerivativeStructure<T>> sinhCosh()
Combined hyperbolic sine and sosine operation.
FieldDerivativeStructure<T> sqrt()
Square root.
FieldDerivativeStructure<T> subtract(double a)
'-' operator.
FieldDerivativeStructure<T> subtract(FieldDerivativeStructure<T> a)
Compute this - a.
FieldDerivativeStructure<T> subtract(T a)
'-' operator.
FieldDerivativeStructure<T> tan()
Tangent operation.
FieldDerivativeStructure<T> tanh()
Hyperbolic tangent operation.
T taylor(double... delta)
Evaluate Taylor expansion of a derivative structure.
T taylor(T... delta)
Evaluate Taylor expansion of a derivative structure.
FieldDerivativeStructure<T> toDegrees()
Convert radians to degrees, with error of less than 0.5 ULP
FieldDerivativeStructure<T> toRadians()
Convert degrees to radians, with error of less than 0.5 ULP
FieldDerivativeStructure<T> ulp()
Compute least significant bit (Unit in Last Position) for a number.
• 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

isFinite, isInfinite, isNaN, norm, round
• Methods inherited from interface org.hipparchus.FieldElement

isZero
• Method Detail

• newInstance

public FieldDerivativeStructure<T> newInstance(double value)
Create an instance corresponding to a constant real value.
Specified by:
newInstance in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Parameters:
value - constant real value
Returns:
instance corresponding to a constant real value
• getFactory

public FDSFactory<T> getFactory()
Get the factory that built the instance.
Returns:
factory that built the instance
• getFreeParameters

public int getFreeParameters()
Description copied from interface: FieldDerivative
Get the number of free parameters.
Specified by:
getFreeParameters in interface FieldDerivative<T extends CalculusFieldElement<T>,FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
number of free parameters
• getOrder

public int getOrder()
Description copied from interface: FieldDerivative
Get the derivation order.
Specified by:
getOrder in interface FieldDerivative<T extends CalculusFieldElement<T>,FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
derivation order
• getReal

public double getReal()
Get the real value of the number.
Specified by:
getReal in interface FieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
real value
• getValue

public T getValue()
Get the value part of the derivative structure.
Specified by:
getValue in interface FieldDerivative<T extends CalculusFieldElement<T>,FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
value part of the derivative structure
See Also:
getPartialDerivative(int...)
• getPartialDerivative

public T getPartialDerivative(int... orders)
throws MathIllegalArgumentException
Get a partial derivative.
Specified by:
getPartialDerivative in interface FieldDerivative<T extends CalculusFieldElement<T>,FieldDerivativeStructure<T extends CalculusFieldElement<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:
FieldDerivative.getValue()
• add

public FieldDerivativeStructure<T> add(T a)
'+' operator.
Parameters:
a - right hand side parameter of the operator
Returns:
this+a
• add

public FieldDerivativeStructure<T> add(double a)
'+' operator.
Specified by:
add in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Parameters:
a - right hand side parameter of the operator
Returns:
this+a
• add

public FieldDerivativeStructure<T> add(FieldDerivativeStructure<T> a)
throws MathIllegalArgumentException
Compute this + a.
Specified by:
add in interface FieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Parameters:
a - element to add
Returns:
a new element representing this + a
Throws:
MathIllegalArgumentException - if number of free parameters or orders do not match
• subtract

public FieldDerivativeStructure<T> subtract(T a)
'-' operator.
Parameters:
a - right hand side parameter of the operator
Returns:
this-a
• subtract

public FieldDerivativeStructure<T> subtract(double a)
'-' operator.
Specified by:
subtract in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Parameters:
a - right hand side parameter of the operator
Returns:
this-a
• subtract

public FieldDerivativeStructure<T> subtract(FieldDerivativeStructure<T> a)
throws MathIllegalArgumentException
Compute this - a.
Specified by:
subtract in interface FieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Parameters:
a - element to subtract
Returns:
a new element representing this - a
Throws:
MathIllegalArgumentException - if number of free parameters or orders do not match
• multiply

public FieldDerivativeStructure<T> multiply(T a)
'×' operator.
Parameters:
a - right hand side parameter of the operator
Returns:
this×a
• multiply

public FieldDerivativeStructure<T> multiply(int n)
Compute n × this. Multiplication by an integer number is defined as the following sum
n × this = ∑i=1n this.
Specified by:
multiply in interface FieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Parameters:
n - Number of times this must be added to itself.
Returns:
A new element representing n × this.
• multiply

public FieldDerivativeStructure<T> multiply(double a)
'×' operator.
Specified by:
multiply in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Parameters:
a - right hand side parameter of the operator
Returns:
this×a
• multiply

public FieldDerivativeStructure<T> multiply(FieldDerivativeStructure<T> a)
throws MathIllegalArgumentException
Compute this × a.
Specified by:
multiply in interface FieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Parameters:
a - element to multiply
Returns:
a new element representing this × a
Throws:
MathIllegalArgumentException - if number of free parameters or orders do not match
• divide

public FieldDerivativeStructure<T> divide(T a)
'÷' operator.
Parameters:
a - right hand side parameter of the operator
Returns:
this÷a
• divide

public FieldDerivativeStructure<T> divide(double a)
'÷' operator.
Specified by:
divide in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Parameters:
a - right hand side parameter of the operator
Returns:
this÷a
• divide

public FieldDerivativeStructure<T> divide(FieldDerivativeStructure<T> a)
throws MathIllegalArgumentException
Compute this ÷ a.
Specified by:
divide in interface FieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Parameters:
a - element to divide by
Returns:
a new element representing this ÷ a
Throws:
MathIllegalArgumentException - if number of free parameters or orders do not match
• remainder

public FieldDerivativeStructure<T> remainder(T a)
IEEE remainder operator.
Parameters:
a - right hand side parameter of the operator
Returns:
this - n × a where n is the closest integer to this/a (the even integer is chosen for n if this/a is halfway between two integers)
• remainder

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

public FieldDerivativeStructure<T> remainder(FieldDerivativeStructure<T> a)
throws MathIllegalArgumentException
IEEE remainder operator.
Specified by:
remainder in interface CalculusFieldElement<FieldDerivativeStructure<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
Throws:
MathIllegalArgumentException - if number of free parameters or orders do not match
• negate

public FieldDerivativeStructure<T> negate()
Returns the additive inverse of this element.
Specified by:
negate in interface FieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
the opposite of this.
• abs

public FieldDerivativeStructure<T> abs()
absolute value.

Just another name for CalculusFieldElement.norm()

Specified by:
abs in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
abs(this)
• ceil

public FieldDerivativeStructure<T> ceil()
Get the smallest whole number larger than instance.
Specified by:
ceil in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
ceil(this)
• floor

public FieldDerivativeStructure<T> floor()
Get the largest whole number smaller than instance.
Specified by:
floor in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
floor(this)
• rint

public FieldDerivativeStructure<T> rint()
Get the whole number that is the nearest to the instance, or the even one if x is exactly half way between two integers.
Specified by:
rint in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
a double number r such that r is an integer r - 0.5 ≤ this ≤ r + 0.5
• sign

public FieldDerivativeStructure<T> sign()
Compute the sign of the instance. The sign is -1 for negative numbers, +1 for positive numbers and 0 otherwise, for Complex number, it is extended on the unit circle (equivalent to z/|z|, with special handling for 0 and NaN)
Specified by:
sign in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
-1.0, -0.0, +0.0, +1.0 or NaN depending on sign of a
• copySign

public FieldDerivativeStructure<T> copySign(T sign)
Returns the instance with the sign of the argument. A NaN sign argument is treated as positive.
Parameters:
sign - the sign for the returned value
Returns:
the instance with the same sign as the sign argument
• copySign

public FieldDerivativeStructure<T> copySign(double sign)
Returns the instance with the sign of the argument. A NaN sign argument is treated as positive.
Specified by:
copySign in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Parameters:
sign - the sign for the returned value
Returns:
the instance with the same sign as the sign argument
• copySign

public FieldDerivativeStructure<T> copySign(FieldDerivativeStructure<T> sign)
Returns the instance with the sign of the argument. A NaN sign argument is treated as positive.
Specified by:
copySign in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Parameters:
sign - the sign for the returned value
Returns:
the instance with the same sign as the sign argument
• getExponent

public int getExponent()
Return the exponent of the instance value, removing the bias.

For double numbers of the form 2x, the unbiased exponent is exactly x.

Specified by:
getExponent in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
exponent for instance in IEEE754 representation, without bias
• scalb

public FieldDerivativeStructure<T> scalb(int n)
Multiply the instance by a power of 2.
Specified by:
scalb in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Parameters:
n - power of 2
Returns:
this × 2n
• ulp

public FieldDerivativeStructure<T> ulp()
Compute least significant bit (Unit in Last Position) for a number.

The ulp function is a step function, hence all its derivatives are 0.

Specified by:
ulp in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
ulp(this)
Since:
2.0
• hypot

public FieldDerivativeStructure<T> hypot(FieldDerivativeStructure<T> y)
throws MathIllegalArgumentException
Returns the hypotenuse of a triangle with sides this and y - sqrt(this2 +y2) avoiding intermediate overflow or underflow.
• If either argument is infinite, then the result is positive infinity.
• else, if either argument is NaN then the result is NaN.
Specified by:
hypot in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Parameters:
y - a value
Returns:
sqrt(this2 +y2)
Throws:
MathIllegalArgumentException - if number of free parameters or orders do not match
• hypot

public static <T extends CalculusFieldElement<T>> FieldDerivativeStructure<T> hypot(FieldDerivativeStructure<T> x,
FieldDerivativeStructure<T> y)
throws MathIllegalArgumentException
Returns the hypotenuse of a triangle with sides x and y - sqrt(x2 +y2) avoiding intermediate overflow or underflow.
• If either argument is infinite, then the result is positive infinity.
• else, if either argument is NaN then the result is NaN.
Type Parameters:
T - the type of the field elements
Parameters:
x - a value
y - a value
Returns:
sqrt(x2 +y2)
Throws:
MathIllegalArgumentException - if number of free parameters or orders do not match
• compose

@SafeVarargs
public final FieldDerivativeStructure<T> compose(T... 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
• compose

public FieldDerivativeStructure<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
• reciprocal

public FieldDerivativeStructure<T> reciprocal()
Returns the multiplicative inverse of this element.
Specified by:
reciprocal in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Specified by:
reciprocal in interface FieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
the inverse of this.
• sqrt

public FieldDerivativeStructure<T> sqrt()
Square root.
Specified by:
sqrt in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
square root of the instance
• cbrt

public FieldDerivativeStructure<T> cbrt()
Cubic root.
Specified by:
cbrt in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
cubic root of the instance
• rootN

public FieldDerivativeStructure<T> rootN(int n)
Nth root.
Specified by:
rootN in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Parameters:
n - order of the root
Returns:
nth root of the instance
• getField

public Field<FieldDerivativeStructure<T>> getField()
Get the Field to which the instance belongs.
Specified by:
getField in interface FieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
Field to which the instance belongs
• pow

public static <T extends CalculusFieldElement<T>> FieldDerivativeStructure<T> pow(double a,
FieldDerivativeStructure<T> x)
Compute ax where a is a double and x a FieldDerivativeStructure
Type Parameters:
T - the type of the field elements
Parameters:
a - number to exponentiate
x - power to apply
Returns:
ax
• pow

public FieldDerivativeStructure<T> pow(double p)
Power operation.
Specified by:
pow in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Parameters:
p - power to apply
Returns:
thisp
• pow

public FieldDerivativeStructure<T> pow(int n)
Integer power operation.
Specified by:
pow in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Parameters:
n - power to apply
Returns:
thisn
• pow

public FieldDerivativeStructure<T> pow(FieldDerivativeStructure<T> e)
throws MathIllegalArgumentException
Power operation.
Specified by:
pow in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Parameters:
e - exponent
Returns:
thise
Throws:
MathIllegalArgumentException - if number of free parameters or orders do not match
• exp

public FieldDerivativeStructure<T> exp()
Exponential.
Specified by:
exp in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
exponential of the instance
• expm1

public FieldDerivativeStructure<T> expm1()
Exponential minus 1.
Specified by:
expm1 in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
exponential minus one of the instance
• log

public FieldDerivativeStructure<T> log()
Natural logarithm.
Specified by:
log in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
logarithm of the instance
• log1p

public FieldDerivativeStructure<T> log1p()
Shifted natural logarithm.
Specified by:
log1p in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
logarithm of one plus the instance
• log10

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

public FieldDerivativeStructure<T> cos()
Cosine operation.
Specified by:
cos in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
cos(this)
• sin

public FieldDerivativeStructure<T> sin()
Sine operation.
Specified by:
sin in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
sin(this)
• sinCos

public FieldSinCos<FieldDerivativeStructure<T>> sinCos()
Combined Sine and Cosine operation.
Specified by:
sinCos in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
[sin(this), cos(this)]
• tan

public FieldDerivativeStructure<T> tan()
Tangent operation.
Specified by:
tan in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
tan(this)
• acos

public FieldDerivativeStructure<T> acos()
Arc cosine operation.
Specified by:
acos in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
acos(this)
• asin

public FieldDerivativeStructure<T> asin()
Arc sine operation.
Specified by:
asin in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
asin(this)
• atan

public FieldDerivativeStructure<T> atan()
Arc tangent operation.
Specified by:
atan in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
atan(this)
• atan2

public FieldDerivativeStructure<T> atan2(FieldDerivativeStructure<T> x)
throws MathIllegalArgumentException
Two arguments arc tangent operation.

Beware of the order or arguments! As this is based on a two-arguments functions, in order to be consistent with arguments order, the instance is the first argument and the single provided argument is the second argument. In order to be consistent with programming languages atan2, this method computes atan2(this, x), i.e. the instance represents the y argument and the x argument is the one passed as a single argument. This may seem confusing especially for users of Wolfram alpha, as this site is not consistent with programming languages atan2 two-arguments arc tangent and puts x as its first argument.

Specified by:
atan2 in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Parameters:
x - second argument of the arc tangent
Returns:
atan2(this, x)
Throws:
MathIllegalArgumentException - if number of free parameters or orders are inconsistent
• atan2

public static <T extends CalculusFieldElement<T>> FieldDerivativeStructure<T> atan2(FieldDerivativeStructure<T> y,
FieldDerivativeStructure<T> x)
throws MathIllegalArgumentException
Two arguments arc tangent operation.
Type Parameters:
T - the type of the field elements
Parameters:
y - first argument of the arc tangent
x - second argument of the arc tangent
Returns:
atan2(y, x)
Throws:
MathIllegalArgumentException - if number of free parameters or orders do not match
• cosh

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

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

public FieldSinhCosh<FieldDerivativeStructure<T>> sinhCosh()
Combined hyperbolic sine and sosine operation.
Specified by:
sinhCosh in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
[sinh(this), cosh(this)]
• tanh

public FieldDerivativeStructure<T> tanh()
Hyperbolic tangent operation.
Specified by:
tanh in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
tanh(this)
• acosh

public FieldDerivativeStructure<T> acosh()
Inverse hyperbolic cosine operation.
Specified by:
acosh in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
acosh(this)
• asinh

public FieldDerivativeStructure<T> asinh()
Inverse hyperbolic sine operation.
Specified by:
asinh in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
asin(this)
• atanh

public FieldDerivativeStructure<T> atanh()
Inverse hyperbolic tangent operation.
Specified by:
atanh in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
atanh(this)
• toDegrees

public FieldDerivativeStructure<T> toDegrees()
Convert radians to degrees, with error of less than 0.5 ULP
Specified by:
toDegrees in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
instance converted into degrees
• toRadians

public FieldDerivativeStructure<T> toRadians()
Convert degrees to radians, with error of less than 0.5 ULP
Specified by:
toRadians in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
instance converted into radians
• integrate

public FieldDerivativeStructure<T> integrate(int varIndex,
int integrationOrder)
Integrate w.r.t. one independent variable.

Rigorously, if the derivatives of a function are known up to order N, the ones of its M-th integral w.r.t. a given variable (seen as a function itself) are actually known up to order N+M. However, this method still casts the output as a DerivativeStructure of order N. The integration constants are systematically set to zero.

Parameters:
varIndex - Index of independent variable w.r.t. which integration is done.
integrationOrder - Number of times the integration operator must be applied. If non-positive, call the differentiation operator.
Returns:
DerivativeStructure on which integration operator has been applied a certain number of times.
Since:
2.2
• differentiate

public FieldDerivativeStructure<T> differentiate(int varIndex,
int differentiationOrder)
Differentiate w.r.t. one independent variable.

Rigorously, if the derivatives of a function are known up to order N, the ones of its M-th derivative w.r.t. a given variable (seen as a function itself) are only known up to order N-M. However, this method still casts the output as a DerivativeStructure of order N with zeroes for the higher order terms.

Parameters:
varIndex - Index of independent variable w.r.t. which differentiation is done.
differentiationOrder - Number of times the differentiation operator must be applied. If non-positive, call the integration operator instead.
Returns:
DerivativeStructure on which differentiation operator has been applied a certain number of times
Since:
2.2
• taylor

@SafeVarargs
public final T taylor(T... delta)
throws MathRuntimeException
Evaluate Taylor expansion of a derivative structure.
Parameters:
delta - parameters offsets (Δx, Δy, ...)
Returns:
value of the Taylor expansion at x + Δx, y + Δy, ...
Throws:
MathRuntimeException - if factorials becomes too large
• taylor

public T taylor(double... delta)
throws MathRuntimeException
Evaluate Taylor expansion of a derivative structure.
Parameters:
delta - parameters offsets (Δx, Δy, ...)
Returns:
value of the Taylor expansion at x + Δx, y + Δy, ...
Throws:
MathRuntimeException - if factorials becomes too large
• rebase

public FieldDerivativeStructure<T> rebase(FieldDerivativeStructure<T>... p)
Rebase instance with respect to low level parameter functions.

The instance is considered to be a function of n free parameters up to order o $$f(p_0, p_1, \ldots p_{n-1})$$. Its partial derivatives are therefore $$f, \frac{\partial f}{\partial p_0}, \frac{\partial f}{\partial p_1}, \ldots \frac{\partial^2 f}{\partial p_0^2}, \frac{\partial^2 f}{\partial p_0 p_1}, \ldots \frac{\partial^o f}{\partial p_{n-1}^o}$$. The free parameters $$p_0, p_1, \ldots p_{n-1}$$ are considered to be functions of $$m$$ lower level other parameters $$q_0, q_1, \ldots q_{m-1}$$.

\begin{align} p_0 & = p_0(q_0, q_1, \ldots q_{m-1})\\ p_1 & = p_1(q_0, q_1, \ldots q_{m-1})\\ p_{n-1} & = p_{n-1}(q_0, q_1, \ldots q_{m-1}) \end{align}

This method compute the composition of the partial derivatives of $$f$$ and the partial derivatives of $$p_0, p_1, \ldots p_{n-1}$$, i.e. the partial derivatives of the value returned will be $$f, \frac{\partial f}{\partial q_0}, \frac{\partial f}{\partial q_1}, \ldots \frac{\partial^2 f}{\partial q_0^2}, \frac{\partial^2 f}{\partial q_0 q_1}, \ldots \frac{\partial^o f}{\partial q_{m-1}^o}$$.

The number of parameters must match getFreeParameters() and the derivation orders of the instance and parameters must also match.

Parameters:
p - base parameters with respect to which partial derivatives were computed in the instance
Returns:
derivative structure with partial derivatives computed with respect to the lower level parameters used in the $$p_i$$
Since:
2.2
• linearCombination

public FieldDerivativeStructure<T> linearCombination(FieldDerivativeStructure<T>[] a,
FieldDerivativeStructure<T>[] b)
throws MathIllegalArgumentException
Compute a linear combination.
Specified by:
linearCombination in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Parameters:
a - Factors.
b - Factors.
Returns:
Σi ai bi.
Throws:
MathIllegalArgumentException - if number of free parameters or orders do not match
• linearCombination

public FieldDerivativeStructure<T> linearCombination(T[] a,
FieldDerivativeStructure<T>[] b)
throws MathIllegalArgumentException
Compute a linear combination.
Parameters:
a - Factors.
b - Factors.
Returns:
Σi ai bi.
Throws:
MathIllegalArgumentException - if arrays dimensions don't match
• linearCombination

public FieldDerivativeStructure<T> linearCombination(double[] a,
FieldDerivativeStructure<T>[] b)
throws MathIllegalArgumentException
Compute a linear combination.
Specified by:
linearCombination in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Parameters:
a - Factors.
b - Factors.
Returns:
Σi ai bi.
Throws:
MathIllegalArgumentException - if number of free parameters or orders do not match
• linearCombination

public FieldDerivativeStructure<T> linearCombination(FieldDerivativeStructure<T> a1,
FieldDerivativeStructure<T> b1,
FieldDerivativeStructure<T> a2,
FieldDerivativeStructure<T> b2,
FieldDerivativeStructure<T> a3,
FieldDerivativeStructure<T> b3,
FieldDerivativeStructure<T> a4,
FieldDerivativeStructure<T> b4)
throws MathIllegalArgumentException
Compute a linear combination.
Specified by:
linearCombination in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Parameters:
a1 - first factor of the first term
b1 - second factor of the first term
a2 - first factor of the second term
b2 - second factor of the second term
a3 - first factor of the third term
b3 - second factor of the third term
a4 - first factor of the fourth term
b4 - second factor of the fourth term
Returns:
a1×b1 + a2×b2 + a3×b3 + a4×b4
Throws:
MathIllegalArgumentException - if number of free parameters or orders do not match
See Also:
CalculusFieldElement.linearCombination(FieldElement, FieldElement, FieldElement, FieldElement), CalculusFieldElement.linearCombination(FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement)
• linearCombination

public FieldDerivativeStructure<T> linearCombination(double a1,
FieldDerivativeStructure<T> b1,
double a2,
FieldDerivativeStructure<T> b2,
double a3,
FieldDerivativeStructure<T> b3,
double a4,
FieldDerivativeStructure<T> b4)
throws MathIllegalArgumentException
Compute a linear combination.
Specified by:
linearCombination in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Parameters:
a1 - first factor of the first term
b1 - second factor of the first term
a2 - first factor of the second term
b2 - second factor of the second term
a3 - first factor of the third term
b3 - second factor of the third term
a4 - first factor of the fourth term
b4 - second factor of the fourth term
Returns:
a1×b1 + a2×b2 + a3×b3 + a4×b4
Throws:
MathIllegalArgumentException - if number of free parameters or orders do not match
See Also:
CalculusFieldElement.linearCombination(double, FieldElement, double, FieldElement), CalculusFieldElement.linearCombination(double, FieldElement, double, FieldElement, double, FieldElement)
• getPi

public FieldDerivativeStructure<T> getPi()
Get the Archimedes constant π.

Archimedes constant is the ratio of a circle's circumference to its diameter.

Specified by:
getPi in interface CalculusFieldElement<FieldDerivativeStructure<T extends CalculusFieldElement<T>>>
Returns:
Archimedes constant π
Skip navigation links

Copyright © 2016-2022 CS GROUP. All rights reserved.