# Class FieldUnivariateDerivative1<T extends CalculusFieldElement<T>>

java.lang.Object
org.hipparchus.analysis.differentiation.FieldUnivariateDerivative<T,FieldUnivariateDerivative1<T>>
org.hipparchus.analysis.differentiation.FieldUnivariateDerivative1<T>
Type Parameters:
T - the type of the function parameters and value
All Implemented Interfaces:
DifferentialAlgebra, FieldDerivative<T,FieldUnivariateDerivative1<T>>, FieldDerivative1<T,FieldUnivariateDerivative1<T>>, CalculusFieldElement<FieldUnivariateDerivative1<T>>, FieldElement<FieldUnivariateDerivative1<T>>

public class FieldUnivariateDerivative1<T extends CalculusFieldElement<T>> extends FieldUnivariateDerivative<T,FieldUnivariateDerivative1<T>> implements FieldDerivative1<T,FieldUnivariateDerivative1<T>>
Class representing both the value and the differentials of a function.

This class is a stripped-down version of FieldDerivativeStructure with only one free parameter and derivation order also limited to one. It should have less overhead than FieldDerivativeStructure 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.

FieldUnivariateDerivative1 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.

Since:
1.7
• ## Constructor Summary

Constructors
Constructor
Description
FieldUnivariateDerivative1(FieldDerivativeStructure<T> ds)
Build an instance from a DerivativeStructure.
FieldUnivariateDerivative1(T f0, T f1)
Build an instance with values and derivative.
• ## Method Summary

Modifier and Type
Method
Description
FieldUnivariateDerivative1<T>
abs()
absolute value.
FieldUnivariateDerivative1<T>
add(double a)
'+' operator.
FieldUnivariateDerivative1<T>
add(FieldUnivariateDerivative1<T> a)
Compute this + a.
FieldUnivariateDerivative1<T>
atan2(FieldUnivariateDerivative1<T> x)
Two arguments arc tangent operation.
FieldUnivariateDerivative1<T>
compose(T g0, T g1)
Compute composition of the instance by a function.
FieldUnivariateDerivative1<T>
copySign(double sign)
Returns the instance with the sign of the argument.
FieldUnivariateDerivative1<T>
copySign(FieldUnivariateDerivative1<T> sign)
Returns the instance with the sign of the argument.
FieldUnivariateDerivative1<T>
copySign(T sign)
Returns the instance with the sign of the argument.
FieldUnivariateDerivative1<T>
divide(double a)
'÷' operator.
FieldUnivariateDerivative1<T>
divide(FieldUnivariateDerivative1<T> a)
Compute this ÷ a.
FieldUnivariateDerivative1<T>
divide(T a)
'÷' operator.
boolean
equals(Object other)
Test for the equality of two univariate derivatives.
T
getDerivative(int n)
Get a derivative from the univariate derivative.
FieldUnivariateDerivative1Field<T>
getField()
Get the Field to which the instance belongs.
T
getFirstDerivative()
Get the first derivative.
FieldUnivariateDerivative1<T>
getPi()
Get the Archimedes constant π.
T
getValue()
Get the value part of the univariate derivative.
Field<T>
getValueField()
Get the Field the value and parameters of the function belongs to.
int
hashCode()
Get a hashCode for the univariate derivative.
FieldUnivariateDerivative1<T>
hypot(FieldUnivariateDerivative1<T> y)
Returns the hypotenuse of a triangle with sides this and y - sqrt(this2 +y2) avoiding intermediate overflow or underflow.
FieldUnivariateDerivative1<T>
linearCombination(double[] a, FieldUnivariateDerivative1<T>[] b)
Compute a linear combination.
FieldUnivariateDerivative1<T>
linearCombination(double a1, FieldUnivariateDerivative1<T> b1, double a2, FieldUnivariateDerivative1<T> b2)
Compute a linear combination.
FieldUnivariateDerivative1<T>
linearCombination(double a1, FieldUnivariateDerivative1<T> b1, double a2, FieldUnivariateDerivative1<T> b2, double a3, FieldUnivariateDerivative1<T> b3)
Compute a linear combination.
FieldUnivariateDerivative1<T>
linearCombination(double a1, FieldUnivariateDerivative1<T> b1, double a2, FieldUnivariateDerivative1<T> b2, double a3, FieldUnivariateDerivative1<T> b3, double a4, FieldUnivariateDerivative1<T> b4)
Compute a linear combination.
FieldUnivariateDerivative1<T>
linearCombination(FieldUnivariateDerivative1<T>[] a, FieldUnivariateDerivative1<T>[] b)
Compute a linear combination.
FieldUnivariateDerivative1<T>
linearCombination(FieldUnivariateDerivative1<T> a1, FieldUnivariateDerivative1<T> b1, FieldUnivariateDerivative1<T> a2, FieldUnivariateDerivative1<T> b2)
Compute a linear combination.
FieldUnivariateDerivative1<T>
linearCombination(FieldUnivariateDerivative1<T> a1, FieldUnivariateDerivative1<T> b1, FieldUnivariateDerivative1<T> a2, FieldUnivariateDerivative1<T> b2, FieldUnivariateDerivative1<T> a3, FieldUnivariateDerivative1<T> b3)
Compute a linear combination.
FieldUnivariateDerivative1<T>
linearCombination(FieldUnivariateDerivative1<T> a1, FieldUnivariateDerivative1<T> b1, FieldUnivariateDerivative1<T> a2, FieldUnivariateDerivative1<T> b2, FieldUnivariateDerivative1<T> a3, FieldUnivariateDerivative1<T> b3, FieldUnivariateDerivative1<T> a4, FieldUnivariateDerivative1<T> b4)
Compute a linear combination.
FieldUnivariateDerivative1<T>
linearCombination(T[] a, FieldUnivariateDerivative1<T>[] b)
Compute a linear combination.
FieldUnivariateDerivative1<T>
linearCombination(T a1, FieldUnivariateDerivative1<T> b1, T a2, FieldUnivariateDerivative1<T> b2, T a3, FieldUnivariateDerivative1<T> b3)
Compute a linear combination.
FieldUnivariateDerivative1<T>
multiply(double a)
'×' operator.
FieldUnivariateDerivative1<T>
multiply(int n)
Compute n × this.
FieldUnivariateDerivative1<T>
multiply(FieldUnivariateDerivative1<T> a)
Compute this × a.
FieldUnivariateDerivative1<T>
multiply(T a)
'×' operator.
FieldUnivariateDerivative1<T>
negate()
Returns the additive inverse of this element.
FieldUnivariateDerivative1<T>
newInstance(double value)
Create an instance corresponding to a constant real value.
FieldUnivariateDerivative1<T>
newInstance(T value)
Create an instance corresponding to a constant Field value.
FieldUnivariateDerivative1<T>
pow(double p)
Power operation.
static <T extends CalculusFieldElement<T>>FieldUnivariateDerivative1<T>
pow(double a, FieldUnivariateDerivative1<T> x)
Compute ax where a is a double and x a FieldUnivariateDerivative1
FieldUnivariateDerivative1<T>
pow(int n)
Integer power operation.
FieldUnivariateDerivative1<T>
remainder(double a)
IEEE remainder operator.
FieldUnivariateDerivative1<T>
remainder(FieldUnivariateDerivative1<T> a)
IEEE remainder operator.
FieldUnivariateDerivative1<T>
remainder(T a)
IEEE remainder operator.
FieldUnivariateDerivative1<T>
rootN(int n)
Nth root.
FieldUnivariateDerivative1<T>
scalb(int n)
Multiply the instance by a power of 2.
FieldUnivariateDerivative1<T>
subtract(double a)
'-' operator.
FieldUnivariateDerivative1<T>
subtract(FieldUnivariateDerivative1<T> a)
Compute this - a.
T
taylor(double delta)
Evaluate Taylor expansion of a univariate derivative.
T
taylor(T delta)
Evaluate Taylor expansion of a univariate derivative.
FieldUnivariateDerivative1<T>
toDegrees()
Convert radians to degrees, with error of less than 0.5 ULP
FieldDerivativeStructure<T>
toDerivativeStructure()
Convert the instance to a FieldDerivativeStructure.
FieldUnivariateDerivative1<T>
toRadians()
Convert degrees to radians, with error of less than 0.5 ULP
FieldUnivariateDerivative1<T>
withValue(T value)
Create a new object with new value (zeroth-order derivative, as passed as input) and same derivatives of order one and above.

### Methods inherited from class org.hipparchus.analysis.differentiation.FieldUnivariateDerivative

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.analysis.differentiation.DifferentialAlgebra

getFreeParameters

### Methods inherited from interface org.hipparchus.analysis.differentiation.FieldDerivative

add, ceil, floor, getExponent, getPartialDerivative, getReal, pow, rint, sign, subtract, ulp

### Methods inherited from interface org.hipparchus.analysis.differentiation.FieldDerivative1

acos, acosh, asin, asinh, atan, atanh, cbrt, cos, cosh, exp, expm1, getOrder, log, log10, log1p, reciprocal, sin, sinCos, sinh, sinhCosh, sqrt, square, tan, tanh

### Methods inherited from interface org.hipparchus.FieldElement

isZero
• ## Constructor Details

• ### FieldUnivariateDerivative1

public FieldUnivariateDerivative1(T f0, T f1)
Build an instance with values and derivative.
Parameters:
f0 - value of the function
f1 - first derivative of the function
• ### FieldUnivariateDerivative1

public FieldUnivariateDerivative1(FieldDerivativeStructure<T> ds) throws MathIllegalArgumentException
Build an instance from a DerivativeStructure.
Parameters:
ds - derivative structure
Throws:
MathIllegalArgumentException - if either ds parameters is not 1 or ds order is not 1
• ## Method Details

• ### newInstance

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

public  newInstance(T value)
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:
newInstance in interface FieldDerivative<T extends CalculusFieldElement<T>,FieldUnivariateDerivative1<T extends CalculusFieldElement<T>>>
Parameters:
value - constant value
Returns:
instance corresponding to a constant Field value
• ### withValue

public  withValue(T value)
Create a new object with new value (zeroth-order derivative, as passed as input) and same derivatives of order one and above.

This default implementation is there so that no API gets broken by the next release, which is not a major one. Custom inheritors should probably overwrite it.

Specified by:
withValue in interface FieldDerivative<T extends CalculusFieldElement<T>,FieldUnivariateDerivative1<T extends CalculusFieldElement<T>>>
Parameters:
value - zeroth-order derivative of new represented function
Returns:
new object with changed value
• ### getValue

public T getValue()
Get the value part of the univariate derivative.
Specified by:
getValue in interface FieldDerivative<T extends CalculusFieldElement<T>,FieldUnivariateDerivative1<T extends CalculusFieldElement<T>>>
Returns:
value part of the univariate derivative
• ### getDerivative

public T getDerivative(int n)
Get a derivative from the univariate derivative.
Specified by:
getDerivative in class FieldUnivariateDerivative<T extends CalculusFieldElement<T>,FieldUnivariateDerivative1<T extends CalculusFieldElement<T>>>
Parameters:
n - derivation order (must be between 0 and DifferentialAlgebra.getOrder(), both inclusive)
Returns:
nth derivative, or NaN if n is either negative or strictly larger than DifferentialAlgebra.getOrder()
• ### getFirstDerivative

public T getFirstDerivative()
Get the first derivative.
Returns:
first derivative
• ### getValueField

public Field<T> getValueField()
Get the Field the value and parameters of the function belongs to.
Returns:
Field the value and parameters of the function belongs to
• ### toDerivativeStructure

public  toDerivativeStructure()
Convert the instance to a FieldDerivativeStructure.
Specified by:
toDerivativeStructure in class FieldUnivariateDerivative<T extends CalculusFieldElement<T>,FieldUnivariateDerivative1<T extends CalculusFieldElement<T>>>
Returns:
derivative structure with same value and derivative as the instance

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

Compute this + a.
Specified by:
add in interface FieldElement<T extends CalculusFieldElement<T>>
Parameters:
a - element to add
Returns:
a new element representing this + a
• ### subtract

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

public  subtract
Compute this - a.
Specified by:
subtract in interface CalculusFieldElement<T extends CalculusFieldElement<T>>
Specified by:
subtract in interface FieldElement<T extends CalculusFieldElement<T>>
Parameters:
a - element to subtract
Returns:
a new element representing this - a
• ### multiply

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

public  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}$
Specified by:
multiply in interface CalculusFieldElement<T extends CalculusFieldElement<T>>
Specified by:
multiply in interface FieldElement<T extends CalculusFieldElement<T>>
Parameters:
n - Number of times this must be added to itself.
Returns:
A new element representing n × this.
• ### multiply

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

public  multiply
Compute this × a.
Specified by:
multiply in interface FieldElement<T extends CalculusFieldElement<T>>
Parameters:
a - element to multiply
Returns:
a new element representing this × a
• ### divide

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

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

public  divide
Compute this ÷ a.
Specified by:
divide in interface CalculusFieldElement<T extends CalculusFieldElement<T>>
Specified by:
divide in interface FieldElement<T extends CalculusFieldElement<T>>
Parameters:
a - element to divide by
Returns:
a new element representing this ÷ a
• ### remainder

public  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  remainder(double a)
IEEE remainder operator.
Specified by:
remainder in interface CalculusFieldElement<T extends CalculusFieldElement<T>>
Parameters:
a - right hand side parameter of the operator
Returns:
this - n × a where n is the closest integer to this/a
• ### remainder

public  remainder
IEEE remainder operator.
Specified by:
remainder in interface CalculusFieldElement<T extends CalculusFieldElement<T>>
Parameters:
a - right hand side parameter of the operator
Returns:
this - n × a where n is the closest integer to this/a
• ### negate

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

public  abs()
absolute value.
Specified by:
abs in interface CalculusFieldElement<T extends CalculusFieldElement<T>>
Returns:
abs(this)
• ### copySign

public  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  copySign(FieldUnivariateDerivative1<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<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  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<T extends CalculusFieldElement<T>>
Parameters:
sign - the sign for the returned value
Returns:
the instance with the same sign as the sign argument
• ### scalb

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

public  hypot
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<T extends CalculusFieldElement<T>>
Parameters:
y - a value
Returns:
sqrt(this2 +y2)
• ### compose

public  compose(T g0, T g1)
Compute composition of the instance by a function.
Specified by:
compose in interface FieldDerivative1<T extends CalculusFieldElement<T>,FieldUnivariateDerivative1<T extends CalculusFieldElement<T>>>
Parameters:
g0 - value of the function at the current point (i.e. at g(getValue()))
g1 - first derivative of the function at the current point (i.e. at g'(getValue()))
Returns:
g(this)
• ### rootN

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

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

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

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

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

public  atan2
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<T extends CalculusFieldElement<T>>
Parameters:
x - second argument of the arc tangent
Returns:
atan2(this, x)
• ### toDegrees

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

Convert degrees to radians, with error of less than 0.5 ULP
Specified by:
toRadians in interface CalculusFieldElement<T extends CalculusFieldElement<T>>
Returns:
• ### taylor

public T taylor(double delta)
Evaluate Taylor expansion of a univariate derivative.
Parameters:
delta - parameter offset Δx
Returns:
value of the Taylor expansion at x + Δx
• ### taylor

public T taylor(T delta)
Evaluate Taylor expansion of a univariate derivative.
Parameters:
delta - parameter offset Δx
Returns:
value of the Taylor expansion at x + Δx
• ### linearCombination

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

public  linearCombination(FieldUnivariateDerivative1<T>[] a, FieldUnivariateDerivative1<T>[] b)
Compute a linear combination.
Specified by:
linearCombination in interface CalculusFieldElement<T extends CalculusFieldElement<T>>
Parameters:
a - Factors.
b - Factors.
Returns:
Σi ai bi.
• ### linearCombination

public  linearCombination(double[] a, FieldUnivariateDerivative1<T>[] b)
Compute a linear combination.
Specified by:
linearCombination in interface CalculusFieldElement<T extends CalculusFieldElement<T>>
Parameters:
a - Factors.
b - Factors.
Returns:
Σi ai bi.
• ### linearCombination

public  linearCombination
Compute a linear combination.
Specified by:
linearCombination in interface CalculusFieldElement<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
Returns:
a1×b1 + a2×b2
• ### linearCombination

public  linearCombination(double a1, FieldUnivariateDerivative1<T> b1, double a2, FieldUnivariateDerivative1<T> b2)
Compute a linear combination.
Specified by:
linearCombination in interface CalculusFieldElement<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
Returns:
a1×b1 + a2×b2
• ### linearCombination

public  linearCombination
Compute a linear combination.
Specified by:
linearCombination in interface CalculusFieldElement<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
Returns:
a1×b1 + a2×b2 + a3×b3
• ### linearCombination

public  linearCombination(T a1, FieldUnivariateDerivative1<T> b1, T a2, FieldUnivariateDerivative1<T> b2, T a3, FieldUnivariateDerivative1<T> b3)
Compute a linear combination.
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
Returns:
a1×b1 + a2×b2 + a3×b3
Throws:
MathIllegalArgumentException - if number of free parameters or orders are inconsistent
• ### linearCombination

public  linearCombination(double a1, FieldUnivariateDerivative1<T> b1, double a2, FieldUnivariateDerivative1<T> b2, double a3, FieldUnivariateDerivative1<T> b3)
Compute a linear combination.
Specified by:
linearCombination in interface CalculusFieldElement<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
Returns:
a1×b1 + a2×b2 + a3×b3
• ### linearCombination

public  linearCombination
Compute a linear combination.
Specified by:
linearCombination in interface CalculusFieldElement<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
• ### linearCombination

public  linearCombination(double a1, FieldUnivariateDerivative1<T> b1, double a2, FieldUnivariateDerivative1<T> b2, double a3, FieldUnivariateDerivative1<T> b3, double a4, FieldUnivariateDerivative1<T> b4)
Compute a linear combination.
Specified by:
linearCombination in interface CalculusFieldElement<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
• ### getPi

public  getPi()
Get the Archimedes constant π.

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

Specified by:
getPi in interface CalculusFieldElement<T extends CalculusFieldElement<T>>
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.

Overrides:
equals in class Object
Parameters:
other - Object to test for equality to this
Returns:
true if two univariate derivatives are equal
• ### hashCode

public int hashCode()
Get a hashCode for the univariate derivative.
Overrides:
hashCode in class Object
Returns:
a hash code value for this object