Interface NodalSurface
-
- All Superinterfaces:
ParameterizedData,Surface
- All Known Implementing Classes:
InterpolatedNodalSurface
public interface NodalSurface extends Surface
A surface based ondoublenodal points.This provides access to a surface mapping a
doublex-value anddoubley-value to adoublez-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 ParameterMetadatagetParameterMetadata(int parameterIndex)Gets the metadata of the parameter at the specified index.DoubleArraygetXValues()Gets the known x-values of the surface.DoubleArraygetYValues()Gets the known y-values of the surface.DoubleArraygetZValues()Gets the known z-values of the surface.NodalSurfacewithMetadata(SurfaceMetadata metadata)Returns a new surface with the specified metadata.NodalSurfacewithParameter(int parameterIndex, double newValue)Returns a copy of the data with the value at the specified index altered.default NodalSurfacewithPerturbation(ParameterPerturbation perturbation)Returns a perturbed copy of the data.NodalSurfacewithZValues(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:
withMetadatain 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,
SimpleSurfaceParameterMetadatawill be created.- Specified by:
getParameterMetadatain interfaceParameterizedData- Specified by:
getParameterMetadatain 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:ParameterizedDataReturns 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:
withParameterin interfaceParameterizedData- Specified by:
withParameterin 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:ParameterizedDataReturns 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:
withPerturbationin interfaceParameterizedData- Specified by:
withPerturbationin interfaceSurface- Parameters:
perturbation- the perturbation to apply- Returns:
- a parameterized data instance based on this with the specified perturbation applied
-
-