/* Last edited on 2004-08-17 23:10:12 by stolfi */ typedef struct dg_interp_data_t { bz_Patch *bz; } dg_interp_data_t; /* A locus data record for interpolation. The record contains an array {bz} of Bézier patches, where {bz[i]} is associated to the cell {K(E)[i]} in the star of the current locus {E}. These patches describe the weighted sum of all tents in the selected basis whose domain properly contains the star of {E}. */ void dg_interpolate ( bz_DDim m, bz_RDim n, dg_Function f, dg_node_t *root, dg_degree_t g, dg_cont_t c, bool_t vtxOnly, bool_t maximal, dg_tent_vec_t *tv, double *c ) { dg_locus_vec_t crit = dg_locus_vec_new(100); int nCrit = 0; auto void visit ( dg_locus_t E, dg_rank_t r, dg_node_star_t *NE, dg_locus_data_t *dtE, bool_t maxE ); void visit ( dg_locus_t E, dg_rank_t r, dg_node_star_t *NE, dg_locus_data_t *dtE, bool_t maxE ) { if ((maximal == maxE) && ((! vtxOnly) || (dg_locus_dimension(d, E) == 0))) { if (nCrit >= crit.nel) { dg_locus_vec_expand(&crit, nCrit); } crit.el[nCrit] = E; nCrit++; } } dg_enum_critical_loci(d, root, visit, root_sp, shrink_sp, split_sp, free_sp); dg_locus_vec_trim(&crit, nCrit); return crit; }