Interface FieldDerivative<S extends CalculusFieldElement<S>,T extends FieldDerivative<S,T>>

Type Parameters:
S - the type of the field elements
T - the type of the function derivative
All Superinterfaces:
CalculusFieldElement<T>, DifferentialAlgebra, FieldElement<T>
All Known Subinterfaces:
FieldDerivative1<S,T>
All Known Implementing Classes:
FieldDerivativeStructure, FieldGradient, FieldUnivariateDerivative, FieldUnivariateDerivative1, FieldUnivariateDerivative2

public interface FieldDerivative<S extends CalculusFieldElement<S>,T extends FieldDerivative<S,T>> extends CalculusFieldElement<T>, DifferentialAlgebra
Interface representing both the value and the differentials of a function.
Since:
1.7
See Also:
  • Method Details

    • getValue

      S getValue()
      Get the value part of the function.
      Returns:
      value part of the value of the function
    • getPartialDerivative

      S getPartialDerivative(int... orders) throws MathIllegalArgumentException
      Get a partial derivative.
      Parameters:
      orders - derivation orders with respect to each variable (if all orders are 0, the value is returned)
      Returns:
      partial derivative
      Throws:
      MathIllegalArgumentException - if the numbers of variables does not match the instance
      MathIllegalArgumentException - if sum of derivation orders is larger than the instance limits
      See Also:
    • getReal

      default double getReal()
      Get the real value of the number.
      Specified by:
      getReal in interface FieldElement<S extends CalculusFieldElement<S>>
      Returns:
      real value
    • newInstance

      default T newInstance(S 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.

      Parameters:
      value - constant value
      Returns:
      instance corresponding to a constant Field value
      Since:
      3.1
    • withValue

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

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

      Parameters:
      value - zeroth-order derivative of new represented function
      Returns:
      new object with changed value
      Since:
      3.1
    • add

      default T add(S a)
      '+' operator.
      Parameters:
      a - right hand side parameter of the operator
      Returns:
      this+a
      Since:
      3.1
    • subtract

      default T subtract(S a)
      '-' operator.
      Parameters:
      a - right hand side parameter of the operator
      Returns:
      this-a
      Since:
      3.1
    • log10

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

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

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

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

      default T acos()
      Arc cosine operation.
      Specified by:
      acos in interface CalculusFieldElement<S extends CalculusFieldElement<S>>
      Returns:
      acos(this)
    • ceil

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

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

      default 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<S extends CalculusFieldElement<S>>
      Returns:
      a double number r such that r is an integer r - 0.5 ≤ this ≤ r + 0.5
    • ulp

      default T ulp()
      Compute least significant bit (Unit in Last Position) for a number.
      Specified by:
      ulp in interface CalculusFieldElement<S extends CalculusFieldElement<S>>
      Returns:
      ulp(this)
    • sign

      default 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<S extends CalculusFieldElement<S>>
      Returns:
      -1.0, -0.0, +0.0, +1.0 or NaN depending on sign of a
    • getExponent

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

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

      Specified by:
      getExponent in interface CalculusFieldElement<S extends CalculusFieldElement<S>>
      Returns:
      exponent for the instance, without bias