.fig
files.fig
graphics files,
such as can be produced interactively and displayed by the
xfig
program.
But it is designed for diagrams whose contents are to be calculated by a
program rather than placed "by hand" as when using xfig
.fig
file
Xfig
structure, Xfig.sml
.fig
file
xfig -autorefresh hanoi.fig
Or just look at the diagram containing the final configuration
program,
final output
xfig -autorefresh btree.fig
program,
output (initial tree),
output (heap-ordered tree)
Meanings of node colours are:
You won't want to use this code to heapsort your own data! It's far more complicated, because of the need to capture and display the tree at intermediate stages through the heapsort algorithm. But it does have the interesting feature, easy with SML- or Haskell-style polymorphism, that the code used to repair the heap after extracting the top item (during the second phase) is the same as the code used in heap-ordering the tree (during the first phase).
.tar.gz
file containing
all the above.
Jeremy Dawson, jeremy at rsise anu edu au (with dots)