Miscellaneous utility routines affirm.h, affirm.c Variants of {assert} with custom messages. argparser.h, argparser.c Tools for parsing options from the command line. bool.h, bool.c The {bool_t} data type. box.h Tools for working with axis-aligned boxes (multidimensional intervals). fget.h, fget.c Functions for parsing basic data types (ints, chars, booleans, etc.) from a byte stream, with automatic bomb-out on error. filefmt.h, filefmt.c Functions for parsing structured files. A structured file has a header line "begin ...", comment lines, some data, and a matching "end ..." line. Many structured files can be nested and concatenated into a single Unix file, with no confusion and easy parsing. Also provides facilities for skipping comment lines in such files. indexing.h, indexing.c Tools for indexing multi-dimensional arrays through descriptors. Includes cropping, slicing, flipping, subsampling, all in O(1) interval.h, interval.c Interval data type and split/join/meet operations. (See ia.h for interval arithmetic operations.) irange.h, irange.c Integer interval data type and its join/meet operations. intheap.h, intheap.c Ordered heaps of integers (e.g. indices into an arbitrary array). This version makes less comparisons than the standard textbook implementation. intmerge.h, intmerge.c Merge two ordered arrays of integers. intmerge_extra.h, intmerge_extra.c Alternative implementatons of intmerge.h, intmerge.c for comparison. intsort.h, intsort_ins.c, intsort_bins.c, intsort_heap.c, intsort_merge.c Sorting arrays of integers by various methods: insertion sort, binary-search insertion sort, heapsort, mergesort. ioprotos.h Prototypes for scanf, printf, etc. (needed in some old systems). js.h, js.c Miscellaneous string, math, and utility functions: check whether a string is a prefix of another, string concatenation, integer to string conversion, date as string, processor clock in {double} format, file open with diagnostic and bomb-out on failure, read a line as a string, random numbers (uniform in interval, Gaussian), integer power, relative difference of two numbers. nat.h Defines a {nat_t} type, same as {unsigned int}. nget.h, nget.c Parses named parameters of various types ({int}, {double}, {bool_t}, etc.) from a byte stream, in the format "{name} = {value}". set32.h, set32.c Subsets of the integers {0..31}, stored as unsigned 32-bit integers: belonging, union, intersection, containment, couting, {k}th smallest, etc.. sign.h The {sign_t} data type, with values {NEG = -1}, {ZER = 00}, {POS = +1}. tbfind.h, tbfind.c Table search by linear interpolation and binary search. timefunc.h, timefunc.c Tools for measuring and reporting the average time taken by function calls. vec.h, vec.c Vector descriptors. A descriptor has a pointer to an array of some data type and the number of elements in that array. Thus the size needs not be passed as a separate parameter. Also has efficient tools for expanding and trimming such vectors dynamically, and for defining vectors of new data types. # Last edited on 2007-04-16 23:01:39 by stolfi