Click or drag to resize

SmoothingCubicSplineBasecubgcv Method

[Missing <summary> documentation for "M:Altaxo.Calc.Interpolation.SmoothingCubicSplineBase.cubgcv(System.Double[],System.Double[],System.Double[],System.Int32,System.Double[],System.Double[][],System.Int32,System.Double,System.Int32,System.Double[],System.Double[][],System.Double[][],System.Double[],System.Double[],System.Int32@)"]


Namespace: Altaxo.Calc.Interpolation
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static void cubgcv(
	double[] x,
	double[] f,
	double[] df,
	int n,
	double[] y,
	double[][] C,
	int ic,
	double var,
	int job,
	double[] se,
	double[][] WK0,
	double[][] WK1,
	double[] WK2,
	double[] WK3,
	out int ier
)

Parameters

x  Double
Input: Abscissae of the N data points. Must be ordered so that x[i] < x[i+1].
f  Double
Input: Ordinates (function values) of the N data points.
df  Double
Input/Output: df[i] is the relative standard deviation of the error associated with the data point i. Each df[i] must be positive. The values in df are scaled so that their mean square value is 1, and unscaled again on normal exit. The mean squaree value of the df[i] is returned in WK3[i] on normal exit. If the absolute standard deviations are known, these should be provided in df and the error variance parameter var (see below) should then be set to 1. If the relative standard deviations are unknown, set each df[i] = 1.
n  Int32
Number of data points. Must be >=3.
y  Double
Output: Spline coefficients of order 0.
C  Double
Output: Spline coefficients of order 1, 2, and 3. THE VALUE OF THE SPLINE APPROXIMATION AT T IS S(T)=((C(I,3)*D+C(I,2))*D+C(I,1))*D+Y(I) WHERE X(I).LE.T.LT.X(I+1) AND D = T-X(I).
ic  Int32
Input: ROW DIMENSION OF MATRIX C EXACTLY AS SPECIFIED IN THE DIMENSION STATEMENT IN THE CALLING PROGRAM.
var  Double
Input/Output: ERROR VARIANCE. (INPUT/OUTPUT) IF VAR IS NEGATIVE(I.E.UNKNOWN) THEN THE SMOOTHING PARAMETER IS DETERMINED BY MINIMIZING THE GENERALIZED CROSS VALIDATION AND AN ESTIMATE OF THE ERROR VARIANCE IS RETURNED IN VAR. IF VAR IS NON-NEGATIVE(I.E.KNOWN) THEN THE SMOOTHING PARAMETER IS DETERMINED TO MINIMIZE AN ESTIMATE, WHICH DEPENDS ON VAR, OF THE TRUE MEAN SQUARE ERROR, AND VAR IS UNCHANGED. IN PARTICULAR, IF VAR IS ZERO, THEN AN INTERPOLATING NATURAL CUBIC SPLINE IS CALCULATED. VAR SHOULD BE SET TO 1 IF ABSOLUTE STANDARD DEVIATIONS HAVE BEEN PROVIDED IN DF (SEE ABOVE).
job  Int32
Input: JOB SELECTION PARAMETER. JOB = 0 SHOULD BE SELECTED IF POINT STANDARD ERROR ESTIMATES ARE NOT REQUIRED IN SE. JOB = 1 SHOULD BE SELECTED IF POINT STANDARD ERROR ESTIMATES ARE REQUIRED IN SE.
se  Double
SE - VECTOR OF LENGTH N CONTAINING BAYESIAN STANDARD ERROR ESTIMATES OF THE FITTED SPLINE VALUES IN Y. SE IS NOT REFERENCED IF JOB=0. (OUTPUT)
WK0  Double
WK - WORK VECTOR OF LENGTH 7*(N + 2). ON NORMAL EXIT THE FIRST 7 VALUES OF WK ARE ASSIGNED AS FOLLOWS:- WK(1) = SMOOTHING PARAMETER(= RHO/(RHO + 1)) WK(2) = ESTIMATE OF THE NUMBER OF DEGREES OF FREEDOM OF THE RESIDUAL SUM OF SQUARES WK(3) = GENERALIZED CROSS VALIDATION WK(4) = MEAN SQUARE RESIDUAL WK(5) = ESTIMATE OF THE TRUE MEAN SQUARE ERROR AT THE DATA POINTS WK(6) = ESTIMATE OF THE ERROR VARIANCE WK(7) = MEAN SQUARE VALUE OF THE DF(I) IF WK(1)=0 (RHO=0) AN INTERPOLATING NATURAL CUBIC SPLINE HAS BEEN CALCULATED. IF WK(1)=1 (RHO=INFINITE) A LEAST SQUARES REGRESSION LINE HAS BEEN CALCULATED. WK(2) IS AN ESTIMATE OF THE NUMBER OF DEGREES OF FREEDOM OF THE RESIDUAL WHICH REDUCES TO THE USUAL VALUE OF N-2 WHEN A LEAST SQUARES REGRESSION LINE IS CALCULATED. WK(3),WK(4),WK(5) ARE CALCULATED WITH THE DF(I) SCALED TO HAVE MEAN SQUARE VALUE 1. THE UNSCALED VALUES OF WK(3),WK(4),WK(5) MAY BE CALCULATED BY DIVIDING BY WK(7). WK(6) COINCIDES WITH THE OUTPUT VALUE OF VAR IF VAR IS NEGATIVE ON INPUT.IT IS CALCULATED WITH THE UNSCALED VALUES OF THE DF(I) TO FACILITATE COMPARISONS WITH A PRIORI VARIANCE ESTIMATES.
WK1  Double
WK2  Double
WK3  Double
ier  Int32
IER - ERROR PARAMETER. (OUTPUT) TERMINAL ERROR IER = 129, IC IS LESS THAN N-1. IER = 130, N IS LESS THAN 3. IER = 131, INPUT ABSCISSAE ARE NOT ORDERED SO THAT X(I).LT.X(I+1). IER = 132, DF(I)IS NOT POSITIVE FOR SOME I. IER = 133, JOB IS NOT 0 OR 1.
See Also