Interface IInterpolation<T,U>
-
- Type Parameters:
T
- The result vector typeU
- The boxed type of an item of the result
- All Known Implementing Classes:
AInterpolation
,InterpolationDouble
,InterpolationVector
public interface IInterpolation<T,U>
Defines an interpolation utility
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IMarketDataset<T,U>
getMarketDataInterpolate(RuntimeData<U> runtimeData, IMarketDataset<T,U> inputData)
Main function for interpolation returns a dataset interpolated from the input dataBiFunction<Double,U,U>
getPostMarketDataInterpolationFunction(IServiceContext context, int axisIndex, String sensitivityKind, String sensitivityName, String riskClass)
Retrieves a function that performs a calculation on the market data for a given axis after interpolation of market data is doneBiFunction<Double,U,U>
getPreMarketDataInterpolationFunction(IServiceContext context, int axisIndex, String sensitivityKind, String sensitivityName, String riskClass)
Retrieves a function that performs a calculation on the market data for a given axis before interpolation of market data is donecom.quartetfs.fwk.impl.Pair<U,String>
interpolation(boolean generateDebugString, Double position, NavigableSet<Double> plots, BiFunction<Double,U,U> preInterpolationCalculation, BiFunction<Double,U,U> postInterpolationCalculation, Function<Double,com.quartetfs.fwk.impl.Pair<U,String>> retriever)
Linear interpolation between two plots of a value
-
-
-
Method Detail
-
getMarketDataInterpolate
IMarketDataset<T,U> getMarketDataInterpolate(RuntimeData<U> runtimeData, IMarketDataset<T,U> inputData)
Main function for interpolation returns a dataset interpolated from the input data- Parameters:
runtimeData
- Context values used for interpolationinputData
- The data to interpolate- Returns:
- The interpolated data
-
getPreMarketDataInterpolationFunction
BiFunction<Double,U,U> getPreMarketDataInterpolationFunction(IServiceContext context, int axisIndex, String sensitivityKind, String sensitivityName, String riskClass)
Retrieves a function that performs a calculation on the market data for a given axis before interpolation of market data is done- Parameters:
context
- The caller contextaxisIndex
- index of the axissensitivityKind
- The type of sensitivity delta / gamma /vega / ....sensitivityName
- sensitivity nameriskClass
- risk class- Returns:
- A function with that prototype
(pillar, md) -> intermediate
, pillar is the current location of the md, interpolation will be made on intermediate Pre and Post functions must give identity on a non interpolated point for consistencyPost(pillar, Pre(pillar, md) = (pillar, md) -> md
-
getPostMarketDataInterpolationFunction
BiFunction<Double,U,U> getPostMarketDataInterpolationFunction(IServiceContext context, int axisIndex, String sensitivityKind, String sensitivityName, String riskClass)
Retrieves a function that performs a calculation on the market data for a given axis after interpolation of market data is done- Parameters:
context
- The caller contextaxisIndex
- index of the axissensitivityKind
- The type of sensitivity delta / gamma /vega / ....sensitivityName
- sensitivity nameriskClass
- risk class- Returns:
- A function with that prototype
(pillar, intermediate) -> md
, pillar is the target location of the md, intermediate is the interpolated value Pre and Post functions must give identity on a non interpolated point for consistencyPost(pillar, Pre(pillar, md) = (pillar, md) -> md
-
interpolation
com.quartetfs.fwk.impl.Pair<U,String> interpolation(boolean generateDebugString, Double position, NavigableSet<Double> plots, BiFunction<Double,U,U> preInterpolationCalculation, BiFunction<Double,U,U> postInterpolationCalculation, Function<Double,com.quartetfs.fwk.impl.Pair<U,String>> retriever)
Linear interpolation between two plots of a value- Parameters:
generateDebugString
- flag to enable the generation of the interpolation debug stringposition
- the position to interpolateplots
- the available reference positionspreInterpolationCalculation
- The functions computed before the interpolation of market data is performed, defined for the current axis.postInterpolationCalculation
- The functions computed after the interpolation of market data is performed, defined for the current axis.retriever
- the function that return the value on a reference plot- Returns:
- the interpolated value
-
-