Class UnivariateDerivative2
- java.lang.Object
-
- org.hipparchus.analysis.differentiation.UnivariateDerivative<UnivariateDerivative2>
-
- org.hipparchus.analysis.differentiation.UnivariateDerivative2
-
- All Implemented Interfaces:
Serializable
,Comparable<UnivariateDerivative2>
,Derivative<UnivariateDerivative2>
,CalculusFieldElement<UnivariateDerivative2>
,FieldElement<UnivariateDerivative2>
public class UnivariateDerivative2 extends UnivariateDerivative<UnivariateDerivative2>
Class representing both the value and the differentials of a function.This class is a stripped-down version of
DerivativeStructure
with only onefree parameter
andderivation order
also limited to two. It should have less overhead thanDerivativeStructure
in its domain.This class is an implementation of Rall's numbers. Rall's numbers are an extension to the real numbers used throughout mathematical expressions; they hold the derivative together with the value of a function.
UnivariateDerivative2
instances can be used directly thanks to the arithmetic operators to the mathematical functions provided as methods by this class (+, -, *, /, %, sin, cos ...).Implementing complex expressions by hand using these classes is a tedious and error-prone task but has the advantage of having no limitation on the derivation order despite not requiring users to compute the derivatives by themselves.
Instances of this class are guaranteed to be immutable.
-
-
Field Summary
Fields Modifier and Type Field Description static UnivariateDerivative2
PI
The constant value of π as aUnivariateDerivative2
.
-
Constructor Summary
Constructors Constructor Description UnivariateDerivative2(double f0, double f1, double f2)
Build an instance with values and derivative.UnivariateDerivative2(DerivativeStructure ds)
Build an instance from aDerivativeStructure
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UnivariateDerivative2
abs()
absolute value.UnivariateDerivative2
acos()
Arc cosine operation.UnivariateDerivative2
acosh()
Inverse hyperbolic cosine operation.UnivariateDerivative2
add(double a)
'+' operator.UnivariateDerivative2
add(UnivariateDerivative2 a)
Compute this + a.UnivariateDerivative2
asin()
Arc sine operation.UnivariateDerivative2
asinh()
Inverse hyperbolic sine operation.UnivariateDerivative2
atan()
Arc tangent operation.UnivariateDerivative2
atan2(UnivariateDerivative2 x)
Two arguments arc tangent operation.UnivariateDerivative2
atanh()
Inverse hyperbolic tangent operation.UnivariateDerivative2
cbrt()
Cubic root.UnivariateDerivative2
ceil()
Get the smallest whole number larger than instance.int
compareTo(UnivariateDerivative2 o)
UnivariateDerivative2
compose(double... f)
Compute composition of the instance by a univariate function.UnivariateDerivative2
copySign(double sign)
Returns the instance with the sign of the argument.UnivariateDerivative2
copySign(UnivariateDerivative2 sign)
Returns the instance with the sign of the argument.UnivariateDerivative2
cos()
Cosine operation.UnivariateDerivative2
cosh()
Hyperbolic cosine operation.UnivariateDerivative2
divide(double a)
'÷' operator.UnivariateDerivative2
divide(UnivariateDerivative2 a)
Compute this ÷ a.boolean
equals(Object other)
Test for the equality of two univariate derivatives.UnivariateDerivative2
exp()
Exponential.UnivariateDerivative2
expm1()
Exponential minus 1.UnivariateDerivative2
floor()
Get the largest whole number smaller than instance.double
getDerivative(int n)
Get a derivative from the univariate derivative.int
getExponent()
Return the exponent of the instance, removing the bias.UnivariateDerivative2Field
getField()
Get theField
to which the instance belongs.double
getFirstDerivative()
Get the first derivative.int
getOrder()
Get the derivation order.UnivariateDerivative2
getPi()
Get the Archimedes constant π.double
getReal()
Get the real value of the number.double
getSecondDerivative()
Get the second derivative.double
getValue()
Get the value part of the function.int
hashCode()
Get a hashCode for the univariate derivative.UnivariateDerivative2
hypot(UnivariateDerivative2 y)
Returns the hypotenuse of a triangle with sidesthis
andy
- sqrt(this2 +y2) avoiding intermediate overflow or underflow.UnivariateDerivative2
linearCombination(double[] a, UnivariateDerivative2[] b)
Compute a linear combination.UnivariateDerivative2
linearCombination(double a1, UnivariateDerivative2 b1, double a2, UnivariateDerivative2 b2)
Compute a linear combination.UnivariateDerivative2
linearCombination(double a1, UnivariateDerivative2 b1, double a2, UnivariateDerivative2 b2, double a3, UnivariateDerivative2 b3)
Compute a linear combination.UnivariateDerivative2
linearCombination(double a1, UnivariateDerivative2 b1, double a2, UnivariateDerivative2 b2, double a3, UnivariateDerivative2 b3, double a4, UnivariateDerivative2 b4)
Compute a linear combination.UnivariateDerivative2
linearCombination(UnivariateDerivative2[] a, UnivariateDerivative2[] b)
Compute a linear combination.UnivariateDerivative2
linearCombination(UnivariateDerivative2 a1, UnivariateDerivative2 b1, UnivariateDerivative2 a2, UnivariateDerivative2 b2)
Compute a linear combination.UnivariateDerivative2
linearCombination(UnivariateDerivative2 a1, UnivariateDerivative2 b1, UnivariateDerivative2 a2, UnivariateDerivative2 b2, UnivariateDerivative2 a3, UnivariateDerivative2 b3)
Compute a linear combination.UnivariateDerivative2
linearCombination(UnivariateDerivative2 a1, UnivariateDerivative2 b1, UnivariateDerivative2 a2, UnivariateDerivative2 b2, UnivariateDerivative2 a3, UnivariateDerivative2 b3, UnivariateDerivative2 a4, UnivariateDerivative2 b4)
Compute a linear combination.UnivariateDerivative2
log()
Natural logarithm.UnivariateDerivative2
log10()
Base 10 logarithm.UnivariateDerivative2
log1p()
Shifted natural logarithm.UnivariateDerivative2
multiply(double a)
'×' operator.UnivariateDerivative2
multiply(int n)
Compute n × this.UnivariateDerivative2
multiply(UnivariateDerivative2 a)
Compute this × a.UnivariateDerivative2
negate()
Returns the additive inverse ofthis
element.UnivariateDerivative2
newInstance(double value)
Create an instance corresponding to a constant real value.UnivariateDerivative2
pow(double p)
Power operation.static UnivariateDerivative2
pow(double a, UnivariateDerivative2 x)
Compute ax where a is a double and x aUnivariateDerivative2
UnivariateDerivative2
pow(int n)
Integer power operation.UnivariateDerivative2
pow(UnivariateDerivative2 e)
Power operation.UnivariateDerivative2
reciprocal()
Returns the multiplicative inverse ofthis
element.UnivariateDerivative2
remainder(double a)
IEEE remainder operator.UnivariateDerivative2
remainder(UnivariateDerivative2 a)
IEEE remainder operator.UnivariateDerivative2
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.UnivariateDerivative2
rootN(int n)
Nth root.UnivariateDerivative2
scalb(int n)
Multiply the instance by a power of 2.UnivariateDerivative2
sign()
Compute the sign of the instance.UnivariateDerivative2
sin()
Sine operation.FieldSinCos<UnivariateDerivative2>
sinCos()
Combined Sine and Cosine operation.UnivariateDerivative2
sinh()
Hyperbolic sine operation.FieldSinhCosh<UnivariateDerivative2>
sinhCosh()
Combined hyperbolic sine and sosine operation.UnivariateDerivative2
sqrt()
Square root.UnivariateDerivative2
subtract(double a)
'-' operator.UnivariateDerivative2
subtract(UnivariateDerivative2 a)
Compute this - a.UnivariateDerivative2
tan()
Tangent operation.UnivariateDerivative2
tanh()
Hyperbolic tangent operation.double
taylor(double delta)
Evaluate Taylor expansion a univariate derivative.UnivariateDerivative2
toDegrees()
Convert radians to degrees, with error of less than 0.5 ULPDerivativeStructure
toDerivativeStructure()
Convert the instance to aDerivativeStructure
.UnivariateDerivative2
toRadians()
Convert degrees to radians, with error of less than 0.5 ULPUnivariateDerivative2
ulp()
Compute least significant bit (Unit in Last Position) for a number.-
Methods inherited from class org.hipparchus.analysis.differentiation.UnivariateDerivative
getFreeParameters, getPartialDerivative
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, 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
-
-
-
-
Field Detail
-
PI
public static final UnivariateDerivative2 PI
The constant value of π as aUnivariateDerivative2
.- Since:
- 2.0
-
-
Constructor Detail
-
UnivariateDerivative2
public UnivariateDerivative2(double f0, double f1, double f2)
Build an instance with values and derivative.- Parameters:
f0
- value of the functionf1
- first derivative of the functionf2
- second derivative of the function
-
UnivariateDerivative2
public UnivariateDerivative2(DerivativeStructure ds) throws MathIllegalArgumentException
Build an instance from aDerivativeStructure
.- Parameters:
ds
- derivative structure- Throws:
MathIllegalArgumentException
- if eitherds
parameters is not 1 ords
order is not 2
-
-
Method Detail
-
newInstance
public UnivariateDerivative2 newInstance(double value)
Create an instance corresponding to a constant real value.- Parameters:
value
- constant real value- Returns:
- instance corresponding to a constant real value
-
getReal
public double getReal()
Get the real value of the number.- Returns:
- real value
-
getValue
public double getValue()
Get the value part of the function.- Returns:
- value part of the value of the function
-
getDerivative
public double getDerivative(int n)
Get a derivative from the univariate derivative.- Specified by:
getDerivative
in classUnivariateDerivative<UnivariateDerivative2>
- Parameters:
n
- derivation order (must be between 0 andDerivative.getOrder()
, both inclusive)- Returns:
- nth derivative
-
getOrder
public int getOrder()
Get the derivation order.- Returns:
- derivation order
-
getFirstDerivative
public double getFirstDerivative()
Get the first derivative.- Returns:
- first derivative
- See Also:
getValue()
,getSecondDerivative()
-
getSecondDerivative
public double getSecondDerivative()
Get the second derivative.- Returns:
- second derivative
- See Also:
getValue()
,getFirstDerivative()
-
toDerivativeStructure
public DerivativeStructure toDerivativeStructure()
Convert the instance to aDerivativeStructure
.- Specified by:
toDerivativeStructure
in classUnivariateDerivative<UnivariateDerivative2>
- Returns:
- derivative structure with same value and derivative as the instance
-
add
public UnivariateDerivative2 add(double a)
'+' operator.- Parameters:
a
- right hand side parameter of the operator- Returns:
- this+a
-
add
public UnivariateDerivative2 add(UnivariateDerivative2 a)
Compute this + a.- Parameters:
a
- element to add- Returns:
- a new element representing this + a
-
subtract
public UnivariateDerivative2 subtract(double a)
'-' operator.- Parameters:
a
- right hand side parameter of the operator- Returns:
- this-a
-
subtract
public UnivariateDerivative2 subtract(UnivariateDerivative2 a)
Compute this - a.- Parameters:
a
- element to subtract- Returns:
- a new element representing this - a
-
multiply
public UnivariateDerivative2 multiply(int n)
Compute n × this. Multiplication by an integer number is defined as the following sum \[ n \times \mathrm{this} = \sum_{i=1}^n \mathrm{this} \]- Parameters:
n
- Number of timesthis
must be added to itself.- Returns:
- A new element representing n × this.
-
multiply
public UnivariateDerivative2 multiply(double a)
'×' operator.- Parameters:
a
- right hand side parameter of the operator- Returns:
- this×a
-
multiply
public UnivariateDerivative2 multiply(UnivariateDerivative2 a)
Compute this × a.- Parameters:
a
- element to multiply- Returns:
- a new element representing this × a
-
divide
public UnivariateDerivative2 divide(double a)
'÷' operator.- Parameters:
a
- right hand side parameter of the operator- Returns:
- this÷a
-
divide
public UnivariateDerivative2 divide(UnivariateDerivative2 a)
Compute this ÷ a.- Parameters:
a
- element to divide by- Returns:
- a new element representing this ÷ a
-
remainder
public UnivariateDerivative2 remainder(double 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
-
remainder
public UnivariateDerivative2 remainder(UnivariateDerivative2 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
-
negate
public UnivariateDerivative2 negate()
Returns the additive inverse ofthis
element.- Returns:
- the opposite of
this
.
-
abs
public UnivariateDerivative2 abs()
absolute value.Just another name for
CalculusFieldElement.norm()
- Returns:
- abs(this)
-
ceil
public UnivariateDerivative2 ceil()
Get the smallest whole number larger than instance.- Returns:
- ceil(this)
-
floor
public UnivariateDerivative2 floor()
Get the largest whole number smaller than instance.- Returns:
- floor(this)
-
rint
public UnivariateDerivative2 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.- Returns:
- a double number r such that r is an integer r - 0.5 ≤ this ≤ r + 0.5
-
sign
public UnivariateDerivative2 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)- Returns:
- -1.0, -0.0, +0.0, +1.0 or NaN depending on sign of a
-
copySign
public UnivariateDerivative2 copySign(UnivariateDerivative2 sign)
Returns the instance with the sign of the argument. A NaNsign
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 UnivariateDerivative2 copySign(double sign)
Returns the instance with the sign of the argument. A NaNsign
argument is treated as positive.- 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, removing the bias.For double numbers of the form 2x, the unbiased exponent is exactly x.
- Returns:
- exponent for the instance, without bias
-
scalb
public UnivariateDerivative2 scalb(int n)
Multiply the instance by a power of 2.- Parameters:
n
- power of 2- Returns:
- this × 2n
-
ulp
public UnivariateDerivative2 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.- Returns:
- ulp(this)
- Since:
- 2.0
-
hypot
public UnivariateDerivative2 hypot(UnivariateDerivative2 y)
Returns the hypotenuse of a triangle with sidesthis
andy
- 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.
- Parameters:
y
- a value- Returns:
- sqrt(this2 +y2)
-
reciprocal
public UnivariateDerivative2 reciprocal()
Returns the multiplicative inverse ofthis
element.- Returns:
- the inverse of
this
.
-
compose
public UnivariateDerivative2 compose(double... f)
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(Derivative.getValue()
), f'(Derivative.getValue()
), f''(Derivative.getValue()
)...]).- Returns:
- f(this)
-
sqrt
public UnivariateDerivative2 sqrt()
Square root.- Returns:
- square root of the instance
-
cbrt
public UnivariateDerivative2 cbrt()
Cubic root.- Returns:
- cubic root of the instance
-
rootN
public UnivariateDerivative2 rootN(int n)
Nth root.- Parameters:
n
- order of the root- Returns:
- nth root of the instance
-
getField
public UnivariateDerivative2Field getField()
Get theField
to which the instance belongs.- Returns:
Field
to which the instance belongs
-
pow
public static UnivariateDerivative2 pow(double a, UnivariateDerivative2 x)
Compute ax where a is a double and x aUnivariateDerivative2
- Parameters:
a
- number to exponentiatex
- power to apply- Returns:
- ax
-
pow
public UnivariateDerivative2 pow(double p)
Power operation.- Parameters:
p
- power to apply- Returns:
- thisp
-
pow
public UnivariateDerivative2 pow(int n)
Integer power operation.- Parameters:
n
- power to apply- Returns:
- thisn
-
pow
public UnivariateDerivative2 pow(UnivariateDerivative2 e)
Power operation.- Parameters:
e
- exponent- Returns:
- thise
-
exp
public UnivariateDerivative2 exp()
Exponential.- Returns:
- exponential of the instance
-
expm1
public UnivariateDerivative2 expm1()
Exponential minus 1.- Returns:
- exponential minus one of the instance
-
log
public UnivariateDerivative2 log()
Natural logarithm.- Returns:
- logarithm of the instance
-
log1p
public UnivariateDerivative2 log1p()
Shifted natural logarithm.- Returns:
- logarithm of one plus the instance
-
log10
public UnivariateDerivative2 log10()
Base 10 logarithm.- Returns:
- base 10 logarithm of the instance
-
cos
public UnivariateDerivative2 cos()
Cosine operation.- Returns:
- cos(this)
-
sin
public UnivariateDerivative2 sin()
Sine operation.- Returns:
- sin(this)
-
sinCos
public FieldSinCos<UnivariateDerivative2> sinCos()
Combined Sine and Cosine operation.- Returns:
- [sin(this), cos(this)]
-
tan
public UnivariateDerivative2 tan()
Tangent operation.- Returns:
- tan(this)
-
acos
public UnivariateDerivative2 acos()
Arc cosine operation.- Returns:
- acos(this)
-
asin
public UnivariateDerivative2 asin()
Arc sine operation.- Returns:
- asin(this)
-
atan
public UnivariateDerivative2 atan()
Arc tangent operation.- Returns:
- atan(this)
-
atan2
public UnivariateDerivative2 atan2(UnivariateDerivative2 x)
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 they
argument and thex
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 languagesatan2
two-arguments arc tangent and putsx
as its first argument.- Parameters:
x
- second argument of the arc tangent- Returns:
- atan2(this, x)
-
cosh
public UnivariateDerivative2 cosh()
Hyperbolic cosine operation.- Returns:
- cosh(this)
-
sinh
public UnivariateDerivative2 sinh()
Hyperbolic sine operation.- Returns:
- sinh(this)
-
sinhCosh
public FieldSinhCosh<UnivariateDerivative2> sinhCosh()
Combined hyperbolic sine and sosine operation.- Returns:
- [sinh(this), cosh(this)]
-
tanh
public UnivariateDerivative2 tanh()
Hyperbolic tangent operation.- Returns:
- tanh(this)
-
acosh
public UnivariateDerivative2 acosh()
Inverse hyperbolic cosine operation.- Returns:
- acosh(this)
-
asinh
public UnivariateDerivative2 asinh()
Inverse hyperbolic sine operation.- Returns:
- asin(this)
-
atanh
public UnivariateDerivative2 atanh()
Inverse hyperbolic tangent operation.- Returns:
- atanh(this)
-
toDegrees
public UnivariateDerivative2 toDegrees()
Convert radians to degrees, with error of less than 0.5 ULP- Returns:
- instance converted into degrees
-
toRadians
public UnivariateDerivative2 toRadians()
Convert degrees to radians, with error of less than 0.5 ULP- Returns:
- instance converted into radians
-
taylor
public double taylor(double delta)
Evaluate Taylor expansion a univariate derivative.- Parameters:
delta
- parameter offset Δx- Returns:
- value of the Taylor expansion at x + Δx
-
linearCombination
public UnivariateDerivative2 linearCombination(UnivariateDerivative2[] a, UnivariateDerivative2[] b)
Compute a linear combination.- Parameters:
a
- Factors.b
- Factors.- Returns:
Σi ai bi
.
-
linearCombination
public UnivariateDerivative2 linearCombination(double[] a, UnivariateDerivative2[] b)
Compute a linear combination.- Parameters:
a
- Factors.b
- Factors.- Returns:
Σi ai bi
.
-
linearCombination
public UnivariateDerivative2 linearCombination(UnivariateDerivative2 a1, UnivariateDerivative2 b1, UnivariateDerivative2 a2, UnivariateDerivative2 b2)
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
- See Also:
CalculusFieldElement.linearCombination(FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement)
,CalculusFieldElement.linearCombination(FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement)
-
linearCombination
public UnivariateDerivative2 linearCombination(double a1, UnivariateDerivative2 b1, double a2, UnivariateDerivative2 b2)
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
- See Also:
CalculusFieldElement.linearCombination(double, FieldElement, double, FieldElement, double, FieldElement)
,CalculusFieldElement.linearCombination(double, FieldElement, double, FieldElement, double, FieldElement, double, FieldElement)
-
linearCombination
public UnivariateDerivative2 linearCombination(UnivariateDerivative2 a1, UnivariateDerivative2 b1, UnivariateDerivative2 a2, UnivariateDerivative2 b2, UnivariateDerivative2 a3, UnivariateDerivative2 b3)
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
- See Also:
CalculusFieldElement.linearCombination(FieldElement, FieldElement, FieldElement, FieldElement)
,CalculusFieldElement.linearCombination(FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement)
-
linearCombination
public UnivariateDerivative2 linearCombination(double a1, UnivariateDerivative2 b1, double a2, UnivariateDerivative2 b2, double a3, UnivariateDerivative2 b3)
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
- See Also:
CalculusFieldElement.linearCombination(double, FieldElement, double, FieldElement)
,CalculusFieldElement.linearCombination(double, FieldElement, double, FieldElement, double, FieldElement, double, FieldElement)
-
linearCombination
public UnivariateDerivative2 linearCombination(UnivariateDerivative2 a1, UnivariateDerivative2 b1, UnivariateDerivative2 a2, UnivariateDerivative2 b2, UnivariateDerivative2 a3, UnivariateDerivative2 b3, UnivariateDerivative2 a4, UnivariateDerivative2 b4)
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 fourth termb4
- second factor of the fourth term- Returns:
- a1×b1 + a2×b2 + a3×b3 + a4×b4
- See Also:
CalculusFieldElement.linearCombination(FieldElement, FieldElement, FieldElement, FieldElement)
,CalculusFieldElement.linearCombination(FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement)
-
linearCombination
public UnivariateDerivative2 linearCombination(double a1, UnivariateDerivative2 b1, double a2, UnivariateDerivative2 b2, double a3, UnivariateDerivative2 b3, double a4, UnivariateDerivative2 b4)
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 fourth termb4
- second factor of the fourth term- Returns:
- a1×b1 + a2×b2 + a3×b3 + a4×b4
- See Also:
CalculusFieldElement.linearCombination(double, FieldElement, double, FieldElement)
,CalculusFieldElement.linearCombination(double, FieldElement, double, FieldElement, double, FieldElement)
-
getPi
public UnivariateDerivative2 getPi()
Get the Archimedes constant π.Archimedes constant is the ratio of a circle's circumference to its diameter.
- Returns:
- Archimedes constant π
-
equals
public boolean equals(Object other)
Test for the equality of two univariate derivatives.univariate derivatives are considered equal if they have the same derivatives.
-
hashCode
public int hashCode()
Get a hashCode for the univariate derivative.
-
compareTo
public int compareTo(UnivariateDerivative2 o)
Comparison performed considering that derivatives are intrinsically linked to monomials in the corresponding Taylor expansion and that the higher the degree, the smaller the term.
- Since:
- 3.0
-
-