annotate rDiff/src/locfit/Source/design.h @ 0:0f80a5141704

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