An instance of the CubicSpline class implements a function \(y=f(x)\) composed of three cubic spline segments of the form \(y=ax^3+bx^2+cx+d\).
More...
|
def | __init__ (self, point1, point2) |
|
def | ay (self, x) |
|
def | y (self, x) |
|
|
| a1 |
|
| a2 |
|
| a3 |
|
| b1 |
|
| b2 |
|
| b3 |
|
| c1 |
|
| c2 |
|
| c3 |
|
| d1 |
|
| d2 |
|
| d3 |
|
| x1 |
|
| x2 |
|
An instance of the CubicSpline class implements a function \(y=f(x)\) composed of three cubic spline segments of the form \(y=ax^3+bx^2+cx+d\).
The function is constrained as follows:
- the function is defined only for \(x\) values in the interval [0,1]
- the function goes through the four points \((0,0),\,(x_1,y_1),\,(x_2,y_2),\,(1,1)\) with \(0<x_1<x_2<1\), where the outer points are fixed and the inner points are provided as arguments to the constructor
- the function's first and second derivatives are continuous at the inner points
- the function's second derivative is zero at the outer points ("natural bounding conditions")
- regardless of the form dictated by the spline segments, the \(y\) value is always clipped to the interval [0,1]
The documentation for this class was generated from the following file: