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

    • Method Detail

      • 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:
        getValue()
      • 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
      • 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
      • 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