Class ValueDerivatives
- java.lang.Object
-
- com.opengamma.strata.basics.value.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
double
getDerivative(int index)
Gets the derivative of the variable with respect to an input.DoubleArray
getDerivatives()
Gets the derivatives of the variable with respect to some inputs.double
getValue()
Gets the value of the variable.int
hashCode()
static org.joda.beans.TypedMetaBean<ValueDerivatives>
meta()
The meta-bean forValueDerivatives
.org.joda.beans.TypedMetaBean<ValueDerivatives>
metaBean()
static ValueDerivatives
of(double value, DoubleArray derivatives)
Obtains an instance from a value and array of derivatives.String
toString()
-
-
-
Method Detail
-
of
public static ValueDerivatives of(double value, DoubleArray derivatives)
Obtains an instance from a value and array of derivatives.- Parameters:
value
- the valuederivatives
- 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 forValueDerivatives
.- Returns:
- the meta-bean, not null
-
metaBean
public org.joda.beans.TypedMetaBean<ValueDerivatives> metaBean()
- Specified by:
metaBean
in interfaceorg.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
-
-