## SECTION I. User-callable Routines Category K. Approximation (search also class L8)

```         K1.  Least squares (L-2) approximation
K6.  Service routines

BSPDOC-A  Documentation for BSPLINE, a package of subprograms for
working with piecewise polynomial functions
in B-representation.

K1.  Least squares (L-2) approximation
K1A.  Linear least squares (search also classes D5, D6, D9)
K1A1.  Unconstrained
K1A1A.  Univariate data (curve fitting)
K1A1A1.  Polynomial splines (piecewise polynomials)

EFC-S     Fit a piecewise polynomial curve to discrete data.
DEFC-D    The piecewise polynomials are represented as B-splines.
The fitting is done in a weighted least squares sense.

FC-S      Fit a piecewise polynomial curve to discrete data.
DFC-D     The piecewise polynomials are represented as B-splines.
The fitting is done in a weighted least squares sense.
Equality and inequality constraints can be imposed on the
fitted curve.

K1A1A2.  Polynomials

PCOEF-S   Convert the POLFIT coefficients to Taylor series form.
DPCOEF-D

POLFIT-S  Fit discrete data in a least squares sense by polynomials
DPOLFT-D  in one variable.

K1A2.  Constrained
K1A2A.  Linear constraints

EFC-S     Fit a piecewise polynomial curve to discrete data.
DEFC-D    The piecewise polynomials are represented as B-splines.
The fitting is done in a weighted least squares sense.

FC-S      Fit a piecewise polynomial curve to discrete data.
DFC-D     The piecewise polynomials are represented as B-splines.
The fitting is done in a weighted least squares sense.
Equality and inequality constraints can be imposed on the
fitted curve.

LSEI-S    Solve a linearly constrained least squares problem with
DLSEI-D   equality and inequality constraints, and optionally compute
a covariance matrix.

SBOCLS-S  Solve the bounded and constrained least squares
DBOCLS-D  problem consisting of solving the equation
E*X = F  (in the least squares sense)
subject to the linear constraints
C*X = Y.

SBOLS-S   Solve the problem
DBOLS-D        E*X = F (in the least  squares  sense)
with bounds on selected X values.

WNNLS-S   Solve a linearly constrained least squares problem with
DWNNLS-D  equality constraints and nonnegativity constraints on
selected variables.

K1B.  Nonlinear least squares
K1B1.  Unconstrained

SCOV-S    Calculate the covariance matrix for a nonlinear data
DCOV-D    fitting problem.  It is intended to be used after a
successful return from either SNLS1 or SNLS1E.

K1B1A.  Smooth functions
K1B1A1.  User provides no derivatives

SNLS1-S   Minimize the sum of the squares of M nonlinear functions
DNLS1-D   in N variables by a modification of the Levenberg-Marquardt
algorithm.

SNLS1E-S  An easy-to-use code which minimizes the sum of the squares
DNLS1E-D  of M nonlinear functions in N variables by a modification
of the Levenberg-Marquardt algorithm.

K1B1A2.  User provides first derivatives

SNLS1-S   Minimize the sum of the squares of M nonlinear functions
DNLS1-D   in N variables by a modification of the Levenberg-Marquardt
algorithm.

SNLS1E-S  An easy-to-use code which minimizes the sum of the squares
DNLS1E-D  of M nonlinear functions in N variables by a modification
of the Levenberg-Marquardt algorithm.

K6.  Service routines (e.g., mesh generation, evaluation of fitted functions)
(search also class N5)

BFQAD-S   Compute the integral of a product of a function and a

DBSPDR-D  Use the B-representation to construct a divided difference
BSPDR-S   table preparatory to a (right) derivative calculation.

BSPEV-S   Calculate the value of the spline and its derivatives from
DBSPEV-D  the B-representation.

BSPPP-S   Convert the B-representation of a B-spline to the piecewise
DBSPPP-D  polynomial (PP) form.

BSPVD-S   Calculate the value and all derivatives of order less than
DBSPVD-D  NDERIV of all basis functions which do not vanish at X.

BSPVN-S   Calculate the value of all (possibly) nonzero basis
DBSPVN-D  functions at X.

BSQAD-S   Compute the integral of a K-th order B-spline using the

BVALU-S   Evaluate the B-representation of a B-spline at X for the
DBVALU-D  function value or any of its derivatives.

INTRV-S   Compute the largest integer ILEFT in 1 .LE. ILEFT .LE. LXT
DINTRV-D  such that XT(ILEFT) .LE. X where XT(*) is a subdivision
of the X interval.

PFQAD-S   Compute the integral on (X1,X2) of a product of a function
DPFQAD-D  F and the ID-th derivative of a B-spline,
(PP-representation).

PPQAD-S   Compute the integral on (X1,X2) of a K-th order B-spline
DPPQAD-D  using the piecewise polynomial (PP) representation.

PPVAL-S   Calculate the value of the IDERIV-th derivative of the
DPPVAL-D  B-spline from the PP-representation.

PVALUE-S  Use the coefficients generated by POLFIT to evaluate the
DP1VLU-D  polynomial fit of degree L, along with the first NDER of
its derivatives, at a specified point.

```