public interface NodalCurve extends Curve
double nodal points.
This provides access to a curve mapping a double x-value to a double y-value.
The parameters of an x-y curve are the x-y values.
The values themselves are returned by getXValues() and getYValues().
The metadata is returned by Curve.getMetadata().
InterpolatedNodalCurve| Modifier and Type | Method and Description |
|---|---|
default ParameterMetadata |
getParameterMetadata(int parameterIndex)
Gets the metadata of the parameter at the specified index.
|
DoubleArray |
getXValues()
Gets the known x-values of the curve.
|
DoubleArray |
getYValues()
Gets the known y-values of the curve.
|
default MapStream<Double,Double> |
values()
Converts this instance to a stream of y-values, keyed by the x-values.
|
NodalCurve |
withMetadata(CurveMetadata metadata)
Returns a new curve with the specified metadata.
|
NodalCurve |
withNode(double x,
double y,
ParameterMetadata paramMetadata)
Returns a new curve with an additional node, specifying the parameter metadata.
|
NodalCurve |
withParameter(int parameterIndex,
double newValue)
Returns a copy of the data with the value at the specified index altered.
|
default NodalCurve |
withPerturbation(ParameterPerturbation perturbation)
Returns a perturbed copy of the data.
|
NodalCurve |
withValues(DoubleArray xValues,
DoubleArray yValues)
Returns a new curve with the specified x-values and y-values.
|
NodalCurve |
withYValues(DoubleArray values)
Returns a new curve with the specified values.
|
createParameterSensitivity, createParameterSensitivity, findParameterIndex, firstDerivative, getMetadata, getName, split, withUnderlyingCurve, yValue, yValueParameterSensitivitygetParameter, getParameterCountNodalCurve withMetadata(CurveMetadata metadata)
This allows the metadata of the curve to be changed while retaining all other information. If parameter metadata is present, the size of the list must match the number of parameters of this curve.
withMetadata in interface Curvemetadata - the new metadata for the curvedefault ParameterMetadata getParameterMetadata(int parameterIndex)
If there is no specific parameter metadata, SimpleCurveParameterMetadata will be created.
getParameterMetadata in interface CurvegetParameterMetadata in interface ParameterizedDataparameterIndex - the zero-based index of the parameter to getIndexOutOfBoundsException - if the index is invalidDoubleArray getXValues()
This method returns the fixed x-values used to define the curve. This will be of the same size as the y-values.
DoubleArray getYValues()
This method returns the fixed y-values used to define the curve. This will be of the same size as the x-values.
NodalCurve withYValues(DoubleArray values)
This allows the y-values of the curve to be changed while retaining the same x-values.
values - the new y-values for the curveNodalCurve withValues(DoubleArray xValues, DoubleArray yValues)
This allows the x values and y-values of the curve to be changed.
xValues - the new x-values for the curveyValues - the new y-values for the curvedefault MapStream<Double,Double> values()
This returns a MapStream keyed by the x-values.
NodalCurve withParameter(int parameterIndex, double newValue)
ParameterizedDataThis instance is immutable and unaffected by this method call.
withParameter in interface CurvewithParameter in interface ParameterizedDataparameterIndex - the zero-based index of the parameter to getnewValue - the new value for the specified parameterdefault NodalCurve withPerturbation(ParameterPerturbation perturbation)
ParameterizedDataThe perturbation instance will be invoked once for each parameter in this instance, returning the perturbed value for that parameter. The result of this method is a new instance that is based on those perturbed values.
This instance is immutable and unaffected by this method call.
withPerturbation in interface CurvewithPerturbation in interface ParameterizedDataperturbation - the perturbation to applyNodalCurve withNode(double x, double y, ParameterMetadata paramMetadata)
The result will contain the specified node. If the x-value equals an existing x-value, the y-value will be changed. If the x-value does not equal an existing x-value, the node will be added.
The result will only contain the specified parameter metadata if this curve also has parameter meta-data.
x - the new x-valuey - the new y-valueparamMetadata - the new parameter metadataCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.