BsLeastSquares Class |
Namespace: Imsl.Math
The BsLeastSquares type exposes the following members.
Name | Description | |
---|---|---|
BsLeastSquares(Double, Double, Int32) |
Constructs a least squares B-spline approximation to the given data
points.
| |
BsLeastSquares(Double, Double, Int32, Int32) |
Constructs a least squares B-spline approximation to the given data
points.
| |
BsLeastSquares(Double, Double, Int32, Int32, Double, Double) |
Constructs a least squares B-spline approximation to the given data
points.
|
Name | Description | |
---|---|---|
Derivative(Double) |
Returns the value of the first derivative of the B-spline at a point.
(Inherited from BSpline.) | |
Derivative(Double, Int32) |
Returns the value of the derivative of the B-spline at a point.
(Inherited from BSpline.) | |
Derivative(Double, Int32) |
Returns the value of the derivative of the B-spline at each point of
an array.
(Inherited from BSpline.) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Eval(Double) |
Returns the value of the B-spline at a point.
(Inherited from BSpline.) | |
Eval(Double) |
Returns the value of the B-spline at each point of an array.
(Inherited from BSpline.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetKnots |
Returns a copy of the knot sequence.
(Inherited from BSpline.) | |
GetSpline |
Returns a Spline representation of the B-spline.
(Inherited from BSpline.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Integral |
Returns the value of an integral of the B-spline.
(Inherited from BSpline.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Let's make the identifications
n = xData.Length
x = xData
f = yData
m = nCoef
k = order
For convenience, we assume that the sequence x is increasing, although the class does not require this.
By default, k = 4, and the knot sequence we select equally distributes the knots through the distinct . In particular, the m + k knots will be generated in with k knots stacked at each of the extreme values. The interior knots will be equally spaced in the interval.
Once knots and weights w are determined, then the spline least-squares fit to the data is computed by minimizing over the linear coefficients
where the are a (B-spline) basis for the spline subspace.
This algorithm is based on the routine L2APPR by deBoor (1978, p. 255).