/* Routines that generate the 1d figs for the dygrid papers. */ /* Last edited on 2009-02-10 09:54:38 by stolfi */ #ifndef figs1d_H #define figs1d_H #include #include #include #include void figs_1d_basis ( PlotOptions *o, char *tag, /* Tag for figure/file name. */ b1d_basis_t *bas /* The basis to plot. */ ); /* Outputs several figures showing the graphs of all elements of the 1d basis {bas}. */ void figs_1d_approx ( PlotOptions *o, char *tag, /* Tag for figure/file name. */ double (*f)(double t), /* Original signal to be approximated. */ b1d_basis_t *bas /* The basis to plot. */ ); /* Outputs one or more figures showing the function {F(x) = f(t)} where {t} ranges over [0_1] as {x} ranges over {bas.dom}, and the least squares approximation of {F} in the basis {bas}. */ /* SINGLE PLOTS WITH KNOWN RANGES */ void fig_1d_element ( PlotOptions *o, char *tag, /* Tag for figure/file name. */ b1d_basis_t *bas, /* The basis to plot. */ int ix, /* Index of element in basis. */ interval_t fr[] /* Arg and function ranges of interest. */ ); /* Outputs a figure showing the single element of basis {bas} with index {pix}. */ void fig_1d_element_set ( PlotOptions *o, char *tag, /* Tag for figure/file name. */ b1d_basis_t *bas, /* The basis to plot. */ int nel, /* Number of elements to plot. */ int elix[], /* Indices of elements in basis. */ interval_t fr[] /* Arg and function ranges of interest. */ ); /* Outputs one figure showing {nel} elements of basis {bas}, with indices {elix[0..nel-1]}. */ void fig_1d_func_approx ( PlotOptions *o, char *tag, /* Tag for figure/file name. */ double (*F)(double x), /* Original signal to be approximated. */ double (*G)(double x), /* Approximation. */ interval_t fr[] /* Arg and function ranges of interest. */ ); /* Outputs a figure showing the graphs of function {F(x)} and {G(x)} over the range {fr[0]}. */ void fig_1d_mother_pulse ( PlotOptions *o, char *tag, /* Tag for figure/file dg. */ udg_pulse_kind_t pkind, /* Kind of element. */ udg_cont_t c, /* Continuity order of element. */ udg_degree_t g, /* Degree of element. */ udg_pulse_mother_index_t pix, /* Index of element in set. */ udg_grid_size_t gsz, /* Domain period (number of grid intervals). */ interval_t fr[] /* Arg and function ranges of interest. */ ); void fig_1d_mother_pulse_set ( PlotOptions *o, char *tag, /* Tag for figure/file name. */ udg_pulse_kind_t pkind, /* Kind of element. */ udg_cont_t c, /* Continuity order of element. */ udg_degree_t g, /* Degree of element. */ udg_grid_size_t gsz, /* Domain period (number of grid intervals). */ interval_t fr[] /* Arg and function ranges of interest. */ ); #endif