design.h 1.0 KB

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