Class BasisFunctionGenerator
- java.lang.Object
-
- com.opengamma.strata.math.impl.interpolation.BasisFunctionGenerator
-
public class BasisFunctionGenerator extends Object
Generator for a set of basis functions.
-
-
Constructor Summary
Constructors Constructor Description BasisFunctionGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Function<Double,Double>
generate(BasisFunctionKnots data, int index)
Generate the i^th basis functionList<Function<Double,Double>>
generateSet(BasisFunctionKnots knots)
Generate a set of b-splines with a given polynomial degree on the specified knots.List<Function<double[],Double>>
generateSet(BasisFunctionKnots[] knots)
Generate a set of N-dimensional b-splines as the produce of 1-dimensional b-splines with a given polynomial degree.
-
-
-
Method Detail
-
generateSet
public List<Function<Double,Double>> generateSet(BasisFunctionKnots knots)
Generate a set of b-splines with a given polynomial degree on the specified knots.- Parameters:
knots
- holder for the knots and degree- Returns:
- a List of functions
-
generateSet
public List<Function<double[],Double>> generateSet(BasisFunctionKnots[] knots)
Generate a set of N-dimensional b-splines as the produce of 1-dimensional b-splines with a given polynomial degree. on the specified knots- Parameters:
knots
- holder for the knots and degree in each dimension- Returns:
- a List of functions
-
generate
protected Function<Double,Double> generate(BasisFunctionKnots data, int index)
Generate the i^th basis function- Parameters:
data
- Container for the knots and degree of the basis functionindex
- The index (from zero) of the function. Must be in range 0 to data.getNumSplines() (exclusive) For example if the degree is 1, and index is 0, this will cover the first three knots.- Returns:
- The i^th basis function
-
-