#ifndef pz_plot_H #define pz_plot_H /* !!! Move to libmsmatch !!! */ /* Plotting routines for dynamic programming graphs */ /* Last edited on 2008-02-13 08:38:38 by stolfi */ #include #include #include #include #include #include #include #include /* The following procedures generate illustrations of the {dynamic programming} algorithm. All procedures draw or assume drawn the dynamic programming graph, in the form of a rectangular grid defined by segments {s[0]} and {s[1]}, with cells of side {cellSize}. The plot will be positioned assuming that the reference grid defined by segments {sRef[0]} and {sRef[1]} has its lower left corner at the point {(h,h)} where {h == cellSize/2}. The plot will be clipped by a rectangle that contains the reference grid surrounded by a safety margin of {h}. The procedures that take a match {m} interpret it relative to the segment {s}, and plot the result relative to {sRef}. The procedures do not take into account that the curves are periodic; the segments are interpreted literaly, without reducing them modulo {s.tot}. Use {pz_plot_try_all_shifts} to get wrap-around plots. */ void pz_plot_seg_seg_grid( PSStream *f, pz_segment_pair *s, pz_segment_pair *sRef, double cellSize, bool_t drawDiags ) /* Draws a grid of {s[0].ns} by {s[1].ns} cells, with the current line style and color. The grid is intended to be used with {MatchInGrid} below. If {drawDiags} is TRUE, the grid will include diagonal lines with the orientation specified by {s[0].rev} and {s[1].rev}. */ void pz_plot_match_boxes( PSStream *f, pz_match_t *m, pz_segment_pair *s, pz_segment_pair *sRef, double cellSize, double boxSize ) /* Draws square boxes of side {boxSize} (in mm) around the nodes of the the pairing {m}, with the current line style/color and fill color. */ void pz_plot_match_path( PSStream *f, pz_match_t *m, pz_segment_pair *s, pz_segment_pair *sRef, double cellSize ) /* Draws the steps of the pairing {m}, as a path in the dynamic programming grid, with current line style and color. */ void pz_plot_match_dots( PSStream *f, pz_match_t *m, pz_segment_pair *s, pz_segment_pair *sRef, double cellSize, double dotSize /* (:= 0.0) */ ) /* Draws round dots at the nodes of the pairing {m}, with diameter {dotSize} (in mm), with the current line style/color and fill color. */