/* aagraph.h -- Plots graph of unary function with affine arithmetic. */ /* Last edited on 2003-09-22 03:38:58 by stolfi */ #ifndef aagraph_H #define aagraph_H #include #include #include #include void aagraph_plot_paralelograms ( FILE *psfile, AAP f (AAP x), Interval xd, Interval yd, int n ); /* Writes to {psfile} a PostScript plot of the graph of f(x), computed on {n} equal sub-intervals in {xd}. Specifically, converts each sub-interval {xi} into an affine form {xa}, with a new noise variable, and then plots the paralogram defined by the forms {(xa, f(xa))}. Assumes that {psfile} has been properly initialized for a plot with the given coordinate ranges. */ void aagraph_plot_boxes ( FILE *psfile, AAP f (AAP x), Interval xd, Interval yd, int n ); /* Writes to {psfile} a PostScript plot of the graph of f(x), computed on {n} equal sub-intervals in {xd}. Specifically, converts each sub-interval {xi} into an affine form {xa}, with a new noise variable, and then plots the rectangle defined by the intervals {(xi, aa_range(f(xa)))}. Intervals are clipped to {yd} in the vertical direction. Assumes that {psfile} has been properly initialized for a plot with the given coordinate ranges. */ void aagraph_plot_2d_range(FILE *psfile, AAP x, AAP y, double R, double G, double B); /* Writes to {psfile} commands that draw the joint range of the affine forms {x} and {y}, filled with the given {R,G,B} color. Assumes that {psfile} has been properly initialized. */ #endif