0
|
1 /*
|
|
2 * The design structure used in Locfit, and associated macro definitions.
|
|
3 */
|
|
4
|
|
5 typedef struct {
|
|
6 int des_init_id;
|
|
7 double *wk;
|
|
8 Sint *ind;
|
|
9 int lwk, lind;
|
|
10
|
|
11 double *xev; /* fitting point, length p */
|
|
12 double *X; /* design matrix, length n*p */
|
|
13 double *w, *di, *res, *th, *wd, h;
|
|
14 double *V, *P; /* matrices with length p*p */
|
|
15 double *f1, *ss, *oc, *cf; /* work vectors, length p */
|
|
16 double llk, smwt;
|
|
17 jacobian xtwx; /* to store X'WVX and decomposition */
|
|
18 int cfn[1+MXDIM], ncoef;
|
|
19 Sint *fix; /* integer vector for fixed coefficients. */
|
|
20 int (*itype)(); /* density integration function */
|
|
21 int n, p;
|
|
22 int (*vfun)(); /* pointer to the vertex processing function. */
|
|
23 } design;
|
|
24
|
|
25 #define cfn(des,i) (des->cfn[i])
|
|
26 #define d_x(des) ((des)->X)
|
|
27 #define d_xi(des,i) (&(des)->X[i*((des)->p)])
|
|
28 #define d_xij(des,i,j) ((des)->X[i*((des)->p)+j])
|
|
29 #define is_fixed(des,i) ((des)->fix[i]==1)
|
|
30 #define DES_INIT_ID 34988372
|
|
31
|
|
32 extern int des_reqd(), des_reqi();
|