public final class BasisFunctionKnots extends Object
| Modifier and Type | Method and Description |
|---|---|
static BasisFunctionKnots |
fromInternalKnots(double[] internalKnots,
int degree)
Generate a set of knots capable of supporting the given degree of basis functions.
|
static BasisFunctionKnots |
fromKnots(double[] knots,
int degree)
Generate a set of knots capable of supporting the given degree of basis functions.
|
static BasisFunctionKnots |
fromUniform(double xa,
double xb,
int nKnots,
int degree)
Generate knots uniformly in the range xa and xb and knots outside this range to support the basis functions on
the edge of the range.
|
int |
getDegree()
the polynomial degree of the basis functions.
|
double[] |
getKnots()
Get the full set of knots.
|
int |
getNumKnots()
The number of knots.
|
int |
getNumSplines()
The number of basis splines of the degree this set of knots will support.
|
public static BasisFunctionKnots fromUniform(double xa, double xb, int nKnots, int degree)
xa - start of the rangexb - end of the rangenKnots - number of knots in the range (internal knots)degree - the polynomial degree of the basis functions (this will determine how many external knots are required)public static BasisFunctionKnots fromInternalKnots(double[] internalKnots, int degree)
internalKnots - the internal knots. The start of the range is the first knot and the end is the last.degree - the polynomial degree of the basis functions (this will determine how many external knots are required)public static BasisFunctionKnots fromKnots(double[] knots, int degree)
knots - The total set of knots - must be strictly accedingdegree - the polynomial degree of the basis functionspublic double[] getKnots()
public int getNumKnots()
public int getDegree()
public int getNumSplines()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.