Class FieldDerivativeStructure<T extends CalculusFieldElement<T>>
- Type Parameters:
T- the type of the field elements
- All Implemented Interfaces:
DifferentialAlgebra,FieldDerivative<T,,FieldDerivativeStructure<T>> CalculusFieldElement<FieldDerivativeStructure<T>>,FieldElement<FieldDerivativeStructure<T>>
This class is similar to DerivativeStructure except function
parameters and value can be any CalculusFieldElement.
Instances of this class are guaranteed to be immutable.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionabs()absolute value.acos()Arc cosine operation.acosh()Inverse hyperbolic cosine operation.add(double a) '+' operator.Compute this + a.asin()Arc sine operation.asinh()Inverse hyperbolic sine operation.atan()Arc tangent operation.Two arguments arc tangent operation.static <T extends CalculusFieldElement<T>>
FieldDerivativeStructure<T>atan2(FieldDerivativeStructure<T> y, FieldDerivativeStructure<T> x) Two arguments arc tangent operation.atanh()Inverse hyperbolic tangent operation.compose(double... f) Compute composition of the instance by a univariate function.final FieldDerivativeStructure<T>Compute composition of the instance by a univariate function.copySign(double sign) Returns the instance with the sign of the argument.copySign(FieldDerivativeStructure<T> sign) Returns the instance with the sign of the argument.Returns the instance with the sign of the argument.cos()Cosine operation.cosh()Hyperbolic cosine operation.differentiate(int varIndex, int differentiationOrder) Differentiate w.r.t.divide(double a) '÷' operator.Compute this ÷ a.'÷' operator.exp()Exponential.expm1()Exponential minus 1.T[]Get all partial derivatives.Get the factory that built the instance.getField()Get theFieldto which the instance belongs.intGet the number of free parameters.intgetOrder()Get the maximum derivation order.getPartialDerivative(int... orders) Get a partial derivative.getPi()Get the Archimedes constant π.getValue()Get the value part of the derivative structure.Returns the hypotenuse of a triangle with sidesthisandy- 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 sidesxandy- sqrt(x2 +y2) avoiding intermediate overflow or underflow.integrate(int varIndex, int integrationOrder) Integrate w.r.t.linearCombination(double[] a, FieldDerivativeStructure<T>[] b) Compute a linear combination.linearCombination(double a1, FieldDerivativeStructure<T> b1, double a2, FieldDerivativeStructure<T> b2) Compute a linear combination.linearCombination(double a1, FieldDerivativeStructure<T> b1, double a2, FieldDerivativeStructure<T> b2, double a3, FieldDerivativeStructure<T> b3) Compute a linear combination.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.Compute a linear combination.linearCombination(FieldDerivativeStructure<T> a1, FieldDerivativeStructure<T> b1, FieldDerivativeStructure<T> a2, FieldDerivativeStructure<T> b2) Compute a linear combination.linearCombination(FieldDerivativeStructure<T> a1, FieldDerivativeStructure<T> b1, FieldDerivativeStructure<T> a2, FieldDerivativeStructure<T> b2, FieldDerivativeStructure<T> a3, FieldDerivativeStructure<T> b3) Compute a linear combination.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.linearCombination(T[] a, FieldDerivativeStructure<T>[] b) Compute a linear combination.linearCombination(T a1, FieldDerivativeStructure<T> b1, T a2, FieldDerivativeStructure<T> b2) Compute a linear combination.linearCombination(T a1, FieldDerivativeStructure<T> b1, T a2, FieldDerivativeStructure<T> b2, T a3, FieldDerivativeStructure<T> b3) Compute a linear combination.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.log()Natural logarithm.log10()Base 10 logarithm.log1p()Shifted natural logarithm.multiply(double a) '×' operator.Compute this × a.'×' operator.negate()Returns the additive inverse ofthiselement.newInstance(double value) Create an instance corresponding to a constant real value.newInstance(T value) Create an instance corresponding to a constant Field value.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 aFieldDerivativeStructurepow(int n) Integer power operation.Power operation.rebase(FieldDerivativeStructure<T>... p) Rebase instance with respect to low level parameter functions.Returns the multiplicative inverse ofthiselement.remainder(double a) IEEE remainder operator.IEEE remainder operator.IEEE remainder operator.rootN(int n) Nth root.scalb(int n) Multiply the instance by a power of 2.sin()Sine operation.sinCos()Combined Sine and Cosine operation.sinh()Hyperbolic sine operation.sinhCosh()Combined hyperbolic sine and cosine operation.sqrt()Square root.square()Compute this × this.subtract(double a) '-' operator.Compute this - a.tan()Tangent operation.tanh()Hyperbolic tangent operation.taylor(double... delta) Evaluate Taylor expansion of a derivative structure.final TEvaluate Taylor expansion of a derivative structure.Convert radians to degrees, with error of less than 0.5 ULPConvert degrees to radians, with error of less than 0.5 ULPCreate a new object with new value (zeroth-order derivative, as passed as input) and same derivatives of order one and above.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hipparchus.CalculusFieldElement
cbrt, isFinite, isInfinite, isNaN, multiply, norm, roundMethods inherited from interface org.hipparchus.analysis.differentiation.FieldDerivative
add, ceil, floor, getExponent, getReal, rint, sign, subtract, ulpMethods inherited from interface org.hipparchus.FieldElement
isZero
-
Method Details
-
newInstance
Create an instance corresponding to a constant real value.- Specified by:
newInstancein interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Parameters:
value- constant real value- Returns:
- instance corresponding to a constant real value
-
newInstance
Create an instance corresponding to a constant Field value.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.
- Specified by:
newInstancein interfaceFieldDerivative<T extends CalculusFieldElement<T>,FieldDerivativeStructure<T extends CalculusFieldElement<T>>> - Parameters:
value- constant value- Returns:
- instance corresponding to a constant Field value
-
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.
- Specified by:
withValuein interfaceFieldDerivative<T extends CalculusFieldElement<T>,FieldDerivativeStructure<T extends CalculusFieldElement<T>>> - Parameters:
value- zeroth-order derivative of new represented function- Returns:
- new object with changed value
-
getFactory
Get the factory that built the instance.- Returns:
- factory that built the instance
-
getFreeParameters
public int getFreeParameters()Description copied from interface:DifferentialAlgebraGet the number of free parameters.- Specified by:
getFreeParametersin interfaceDifferentialAlgebra- Returns:
- number of free parameters
-
getOrder
public int getOrder()Description copied from interface:DifferentialAlgebraGet the maximum derivation order.- Specified by:
getOrderin interfaceDifferentialAlgebra- Returns:
- maximum derivation order
-
getValue
Get the value part of the derivative structure.- Specified by:
getValuein interfaceFieldDerivative<T extends CalculusFieldElement<T>,FieldDerivativeStructure<T extends CalculusFieldElement<T>>> - Returns:
- value part of the derivative structure
- See Also:
-
getPartialDerivative
Get a partial derivative.- Specified by:
getPartialDerivativein interfaceFieldDerivative<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:
-
getAllDerivatives
Get all partial derivatives.- Returns:
- a fresh copy of partial derivatives, in an array sorted according to
DSCompiler.getPartialDerivativeIndex(int...)
-
add
'+' operator.- Specified by:
addin interfaceCalculusFieldElement<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:
addin interfaceFieldElement<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
'-' operator.- Specified by:
subtractin interfaceCalculusFieldElement<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:
subtractin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Specified by:
subtractin interfaceFieldElement<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
'×' operator.- Parameters:
a- right hand side parameter of the operator- Returns:
- this×a
-
multiply
'×' operator.- Specified by:
multiplyin interfaceCalculusFieldElement<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:
multiplyin interfaceFieldElement<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
-
square
Compute this × this.- Specified by:
squarein interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- a new element representing this × this
-
divide
'÷' operator.- Parameters:
a- right hand side parameter of the operator- Returns:
- this÷a
-
divide
'÷' operator.- Specified by:
dividein interfaceCalculusFieldElement<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:
dividein interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Specified by:
dividein interfaceFieldElement<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
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
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
-
remainder
public FieldDerivativeStructure<T> remainder(FieldDerivativeStructure<T> a) throws MathIllegalArgumentException 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
- Throws:
MathIllegalArgumentException- if number of free parameters or orders do not match
-
negate
Returns the additive inverse ofthiselement.- Specified by:
negatein interfaceFieldElement<T extends CalculusFieldElement<T>>- Returns:
- the opposite of
this.
-
abs
absolute value.- Specified by:
absin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- abs(this)
-
copySign
Returns the instance with the sign of the argument. A NaNsignargument is treated as positive.- Parameters:
sign- the sign for the returned value- Returns:
- the instance with the same sign as the
signargument
-
copySign
Returns the instance with the sign of the argument. A NaNsignargument is treated as positive.- Specified by:
copySignin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Parameters:
sign- the sign for the returned value- Returns:
- the instance with the same sign as the
signargument
-
copySign
Returns the instance with the sign of the argument. A NaNsignargument is treated as positive.- Specified by:
copySignin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Parameters:
sign- the sign for the returned value- Returns:
- the instance with the same sign as the
signargument
-
scalb
Multiply the instance by a power of 2.- Specified by:
scalbin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Parameters:
n- power of 2- Returns:
- this × 2n
-
hypot
public FieldDerivativeStructure<T> hypot(FieldDerivativeStructure<T> y) throws MathIllegalArgumentException Returns the hypotenuse of a triangle with sidesthisandy- 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:
hypotin interfaceCalculusFieldElement<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 sidesxandy- 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 valuey- 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 toorder+ 1
-
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
-
reciprocal
Returns the multiplicative inverse ofthiselement.- Specified by:
reciprocalin interfaceFieldElement<T extends CalculusFieldElement<T>>- Returns:
- the inverse of
this.
-
sqrt
Square root.- Specified by:
sqrtin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- square root of the instance
-
rootN
Nth root.- Specified by:
rootNin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Parameters:
n- order of the root- Returns:
- nth root of the instance
-
getField
Get theFieldto which the instance belongs.- Specified by:
getFieldin interfaceFieldElement<T extends CalculusFieldElement<T>>- Returns:
Fieldto 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 aFieldDerivativeStructure- Type Parameters:
T- the type of the field elements- Parameters:
a- number to exponentiatex- power to apply- Returns:
- ax
-
pow
Power operation.- Specified by:
powin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Parameters:
p- power to apply- Returns:
- thisp
-
pow
Integer power operation.- Specified by:
powin interfaceCalculusFieldElement<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:
powin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Specified by:
powin interfaceFieldDerivative<T extends CalculusFieldElement<T>,FieldDerivativeStructure<T extends CalculusFieldElement<T>>> - Parameters:
e- exponent- Returns:
- thise
- Throws:
MathIllegalArgumentException- if number of free parameters or orders do not match
-
exp
Exponential.- Specified by:
expin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- exponential of the instance
-
expm1
Exponential minus 1.- Specified by:
expm1in interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- exponential minus one of the instance
-
log
Natural logarithm.- Specified by:
login interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- logarithm of the instance
-
log1p
Shifted natural logarithm.- Specified by:
log1pin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- logarithm of one plus the instance
-
log10
Base 10 logarithm.- Specified by:
log10in interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Specified by:
log10in interfaceFieldDerivative<T extends CalculusFieldElement<T>,FieldDerivativeStructure<T extends CalculusFieldElement<T>>> - Returns:
- base 10 logarithm of the instance
-
cos
Cosine operation.- Specified by:
cosin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- cos(this)
-
sin
Sine operation.- Specified by:
sinin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- sin(this)
-
sinCos
Combined Sine and Cosine operation.- Specified by:
sinCosin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- [sin(this), cos(this)]
-
tan
Tangent operation.- Specified by:
tanin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- tan(this)
-
acos
Arc cosine operation.- Specified by:
acosin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Specified by:
acosin interfaceFieldDerivative<T extends CalculusFieldElement<T>,FieldDerivativeStructure<T extends CalculusFieldElement<T>>> - Returns:
- acos(this)
-
asin
Arc sine operation.- Specified by:
asinin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- asin(this)
-
atan
Arc tangent operation.- Specified by:
atanin interfaceCalculusFieldElement<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 computesatan2(this, x), i.e. the instance represents theyargument and thexargument 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 languagesatan2two-arguments arc tangent and putsxas its first argument.- Specified by:
atan2in interfaceCalculusFieldElement<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 tangentx- second argument of the arc tangent- Returns:
- atan2(y, x)
- Throws:
MathIllegalArgumentException- if number of free parameters or orders do not match
-
cosh
Hyperbolic cosine operation.- Specified by:
coshin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Specified by:
coshin interfaceFieldDerivative<T extends CalculusFieldElement<T>,FieldDerivativeStructure<T extends CalculusFieldElement<T>>> - Returns:
- cosh(this)
-
sinh
Hyperbolic sine operation.- Specified by:
sinhin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Specified by:
sinhin interfaceFieldDerivative<T extends CalculusFieldElement<T>,FieldDerivativeStructure<T extends CalculusFieldElement<T>>> - Returns:
- sinh(this)
-
sinhCosh
Combined hyperbolic sine and cosine operation.- Specified by:
sinhCoshin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- [sinh(this), cosh(this)]
-
tanh
Hyperbolic tangent operation.- Specified by:
tanhin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- tanh(this)
-
acosh
Inverse hyperbolic cosine operation.- Specified by:
acoshin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- acosh(this)
-
asinh
Inverse hyperbolic sine operation.- Specified by:
asinhin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- asin(this)
-
atanh
Inverse hyperbolic tangent operation.- Specified by:
atanhin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- atanh(this)
-
toDegrees
Convert radians to degrees, with error of less than 0.5 ULP- Specified by:
toDegreesin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- instance converted into degrees
-
toRadians
Convert degrees to radians, with error of less than 0.5 ULP- Specified by:
toRadiansin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- instance converted into radians
-
integrate
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
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
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
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
Rebase instance with respect to low level parameter functions.The instance is considered to be a function of
\( \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}\)n free parametersup to ordero\(f(p_0, p_1, \ldots p_{n-1})\). Itspartial derivativesare 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}\).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 derivativesof 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:
linearCombinationin interfaceCalculusFieldElement<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:
linearCombinationin interfaceCalculusFieldElement<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) throws MathIllegalArgumentException Compute a linear combination.- Specified by:
linearCombinationin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Parameters:
a1- first factor of the first termb1- second factor of the first terma2- first factor of the second termb2- second factor of the second term- Returns:
- a1×b1 + a2×b2
- Throws:
MathIllegalArgumentException- if number of free parameters or orders do not match- See Also:
-
linearCombination
public FieldDerivativeStructure<T> linearCombination(T a1, FieldDerivativeStructure<T> b1, T a2, FieldDerivativeStructure<T> b2) throws MathIllegalArgumentException Compute a linear combination.- Parameters:
a1- first factor of the first termb1- second factor of the first terma2- first factor of the second termb2- second factor of the second term- Returns:
- a1×b1 + a2×b2
- Throws:
MathIllegalArgumentException- if number of free parameters or orders are inconsistent- See Also:
-
linearCombination
public FieldDerivativeStructure<T> linearCombination(double a1, FieldDerivativeStructure<T> b1, double a2, FieldDerivativeStructure<T> b2) throws MathIllegalArgumentException Compute a linear combination.- Specified by:
linearCombinationin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Parameters:
a1- first factor of the first termb1- second factor of the first terma2- first factor of the second termb2- second factor of the second term- Returns:
- a1×b1 + a2×b2
- Throws:
MathIllegalArgumentException- if number of free parameters or orders do not match- See Also:
-
linearCombination
public FieldDerivativeStructure<T> linearCombination(FieldDerivativeStructure<T> a1, FieldDerivativeStructure<T> b1, FieldDerivativeStructure<T> a2, FieldDerivativeStructure<T> b2, FieldDerivativeStructure<T> a3, FieldDerivativeStructure<T> b3) throws MathIllegalArgumentException Compute a linear combination.- Specified by:
linearCombinationin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Parameters:
a1- first factor of the first termb1- second factor of the first terma2- first factor of the second termb2- second factor of the second terma3- first factor of the third termb3- second factor of the third term- Returns:
- a1×b1 + a2×b2 + a3×b3
- Throws:
MathIllegalArgumentException- if number of free parameters or orders do not match- See Also:
-
linearCombination
public FieldDerivativeStructure<T> linearCombination(T a1, FieldDerivativeStructure<T> b1, T a2, FieldDerivativeStructure<T> b2, T a3, FieldDerivativeStructure<T> b3) throws MathIllegalArgumentException Compute a linear combination.- Parameters:
a1- first factor of the first termb1- second factor of the first terma2- first factor of the second termb2- second factor of the second terma3- first factor of the third termb3- second factor of the third term- Returns:
- a1×b1 + a2×b2 + a3×b3
- Throws:
MathIllegalArgumentException- if number of free parameters or orders are inconsistent- See Also:
-
linearCombination
public FieldDerivativeStructure<T> linearCombination(double a1, FieldDerivativeStructure<T> b1, double a2, FieldDerivativeStructure<T> b2, double a3, FieldDerivativeStructure<T> b3) throws MathIllegalArgumentException Compute a linear combination.- Specified by:
linearCombinationin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Parameters:
a1- first factor of the first termb1- second factor of the first terma2- first factor of the second termb2- second factor of the second terma3- first factor of the third termb3- second factor of the third term- Returns:
- a1×b1 + a2×b2 + a3×b3
- Throws:
MathIllegalArgumentException- if number of free parameters or orders do not match- See Also:
-
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:
linearCombinationin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Parameters:
a1- first factor of the first termb1- second factor of the first terma2- first factor of the second termb2- second factor of the second terma3- first factor of the third termb3- second factor of the third terma4- first factor of the fourth termb4- 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:
-
linearCombination
public FieldDerivativeStructure<T> linearCombination(T a1, FieldDerivativeStructure<T> b1, T a2, FieldDerivativeStructure<T> b2, T a3, FieldDerivativeStructure<T> b3, T a4, FieldDerivativeStructure<T> b4) throws MathIllegalArgumentException Compute a linear combination.- Parameters:
a1- first factor of the first termb1- second factor of the first terma2- first factor of the second termb2- second factor of the second terma3- first factor of the third termb3- second factor of the third terma4- first factor of the third termb4- second factor of the third term- Returns:
- a1×b1 + a2×b2 + a3×b3 + a4×b4
- Throws:
MathIllegalArgumentException- if number of free parameters or orders are inconsistent- See Also:
-
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:
linearCombinationin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Parameters:
a1- first factor of the first termb1- second factor of the first terma2- first factor of the second termb2- second factor of the second terma3- first factor of the third termb3- second factor of the third terma4- first factor of the fourth termb4- 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:
-
getPi
Get the Archimedes constant π.Archimedes constant is the ratio of a circle's circumference to its diameter.
- Specified by:
getPiin interfaceCalculusFieldElement<T extends CalculusFieldElement<T>>- Returns:
- Archimedes constant π
-