Here are some little C programs and libraries which you may find interesting. They were written by by me, often with the help or advice of my students and colleagues.
You can copy this software free of charge, and use or modify it as you wish, provided only that you don't try to prevent others from doing the same, and give proper credit to the author(s).
Please note that this software is provided `as is' whithout any guarantee. Neither the authors not their employers can be held responsible for any damages or losses that might be attributable to the use of this software.
bool: A replacement for the Unix comm tool.
It checks whether the files are really sorted,
is TAB-free, and has a much nicer user interface:
bool 1-2 file1 file2 for set difference,
bool 1+2 file1 file2 for set union,
bool 1.2 file1 file2 for set intersection, etc.
dusort: A filter that sorts the output of "du" by total space, and formats it in tree fashion:
Input Output ---------------- ----------------- 600 small/a 20000 big/ 4400 small/b 14000 . d/ 5000 small 12000 . . e 4000 big/c 2000 . . f 12000 big/d/e 4000 . c 2000 big/d/f 5000 small/ 14000 big/d 4400 . b 20000 big 600 . a
capitize: A filter that changes all words in the input to initial caps, i.e. "this is a UNICAMP MoonSITE" becomes "This Is A Unicamp Moonsite". A rather dumb program, but handles all ISO Latin-1 characters.
libquad The quad-edge data structure for representing the topology of maps on surfaces. See the paper [gui-sto-85-quad]
The data structure is simple yet flexible. Each node represents an edge of the map and the corresponding edge of the dual map. Four pointers link each edge record to the records of adjacent edges.
Two basic construction operators suffice to build any map on any surface; except that every map region must be a topological disc, and (in this particular implementation) the surface must be orientable.
See the libdelaunay and tests-delaunay packages for an example of its use.
libdelaunay A simple procedure for building the Delaunay triangulation for a set of points on the plane.
libaa An implementation of affine arithmetic, a numerical computation model that resembles interval arithmetic but takes into account the first-order correlation of the operands. See the paper [com-sto-93-aa] for a description.
libia An implementation of standard interval arithmetic. There are better libraries around (check out BLAS, for instance). It is included here mainly because it is used internally by libaa above, and has basically the same programmer's interface (in order to make comparisons easier).
libps Routines that simplify somewhat the task of generating Postscript files for geometric graphics. Used in many of the test programs below.
libflt, libjs Libraries used internally by several of the other packages in this directory.
tests-aa Programs to test the affine arithmetic library (libaa).
tests-ia Programs to test the interval arithmetic library (libia).
tests-delaunay A program that tests the Delaunay diagram and quad-edge libraries (libdelaunay, libquad).