Interface NodalSurface
-
- All Superinterfaces:
ParameterizedData
,Surface
- All Known Implementing Classes:
InterpolatedNodalSurface
public interface NodalSurface extends Surface
A surface based ondouble
nodal points.This provides access to a surface mapping a
double
x-value anddouble
y-value to adouble
z-value.The parameters of an x-y surface are the x-y values. The values themselves are returned by
getXValues()
andgetYValues()
. The metadata is returned bySurface.getMetadata()
.- See Also:
InterpolatedNodalSurface
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method 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 surface.DoubleArray
getYValues()
Gets the known y-values of the surface.DoubleArray
getZValues()
Gets the known z-values of the surface.NodalSurface
withMetadata(SurfaceMetadata metadata)
Returns a new surface with the specified metadata.NodalSurface
withParameter(int parameterIndex, double newValue)
Returns a copy of the data with the value at the specified index altered.default NodalSurface
withPerturbation(ParameterPerturbation perturbation)
Returns a perturbed copy of the data.NodalSurface
withZValues(DoubleArray values)
Returns a new surface with the specified values.-
Methods inherited from interface com.opengamma.strata.market.param.ParameterizedData
getParameter, getParameterCount
-
Methods inherited from interface com.opengamma.strata.market.surface.Surface
createParameterSensitivity, createParameterSensitivity, findParameterIndex, firstPartialDerivatives, getMetadata, getName, zValue, zValue, zValueParameterSensitivity, zValueParameterSensitivity
-
-
-
-
Method Detail
-
withMetadata
NodalSurface withMetadata(SurfaceMetadata metadata)
Returns a new surface with the specified metadata.This allows the metadata of the surface 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 surface.
- Specified by:
withMetadata
in interfaceSurface
- Parameters:
metadata
- the new metadata for the surface- Returns:
- the new surface
-
getParameterMetadata
default ParameterMetadata getParameterMetadata(int parameterIndex)
Gets the metadata of the parameter at the specified index.If there is no specific parameter metadata,
SimpleSurfaceParameterMetadata
will be created.- Specified by:
getParameterMetadata
in interfaceParameterizedData
- Specified by:
getParameterMetadata
in interfaceSurface
- Parameters:
parameterIndex
- the zero-based index of the parameter to get- Returns:
- the metadata of the parameter
- Throws:
IndexOutOfBoundsException
- if the index is invalid
-
getXValues
DoubleArray getXValues()
Gets the known x-values of the surface.This method returns the fixed x-values used to define the surface. This will be of the same size as the y-values and z-values.
- Returns:
- the x-values
-
getYValues
DoubleArray getYValues()
Gets the known y-values of the surface.This method returns the fixed y-values used to define the surface. This will be of the same size as the x-values and z-values.
- Returns:
- the y-values
-
getZValues
DoubleArray getZValues()
Gets the known z-values of the surface.This method returns the fixed z-values used to define the surface. This will be of the same size as the x-values and y-values.
- Returns:
- the z-values
-
withZValues
NodalSurface withZValues(DoubleArray values)
Returns a new surface with the specified values.This allows the z-values of the surface to be changed while retaining the same x-values and y-values.
- Parameters:
values
- the new y-values for the surface- Returns:
- the new surface
-
withParameter
NodalSurface withParameter(int parameterIndex, double newValue)
Description copied from interface:ParameterizedData
Returns a copy of the data with the value at the specified index altered.This instance is immutable and unaffected by this method call.
- Specified by:
withParameter
in interfaceParameterizedData
- Specified by:
withParameter
in interfaceSurface
- Parameters:
parameterIndex
- the zero-based index of the parameter to getnewValue
- the new value for the specified parameter- Returns:
- a parameterized data instance based on this with the specified parameter altered
-
withPerturbation
default NodalSurface withPerturbation(ParameterPerturbation perturbation)
Description copied from interface:ParameterizedData
Returns a perturbed copy of the data.The 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.
- Specified by:
withPerturbation
in interfaceParameterizedData
- Specified by:
withPerturbation
in interfaceSurface
- Parameters:
perturbation
- the perturbation to apply- Returns:
- a parameterized data instance based on this with the specified perturbation applied
-
-