Class ValueDerivatives

  • All Implemented Interfaces:
    Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class ValueDerivatives
    extends Object
    implements org.joda.beans.ImmutableBean, Serializable
    A value and its derivatives.

    This defines a standard way to return a value and its derivatives to certain inputs. It is in particular used as a return object for Algorithmic Differentiation versions of some functions.

    See Also:
    Serialized Form
    • Method Detail

      • of

        public static ValueDerivatives of​(double value,
                                          DoubleArray derivatives)
        Obtains an instance from a value and array of derivatives.
        Parameters:
        value - the value
        derivatives - the derivatives of the value
        Returns:
        the object
      • getDerivative

        public double getDerivative​(int index)
        Gets the derivative of the variable with respect to an input.
        Parameters:
        index - the zero-based derivative to obtain
        Returns:
        the derivative
        Throws:
        IndexOutOfBoundsException - if the index is invalid
      • meta

        public static org.joda.beans.TypedMetaBean<ValueDerivatives> meta()
        The meta-bean for ValueDerivatives.
        Returns:
        the meta-bean, not null
      • metaBean

        public org.joda.beans.TypedMetaBean<ValueDerivatives> metaBean()
        Specified by:
        metaBean in interface org.joda.beans.Bean
      • getValue

        public double getValue()
        Gets the value of the variable.
        Returns:
        the value of the property
      • getDerivatives

        public DoubleArray getDerivatives()
        Gets the derivatives of the variable with respect to some inputs.
        Returns:
        the value of the property, not null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object