Here are bits of code and even a few complete programs you might find useful. Of course, I'd like to hear of any errors you find or corrections or improvements you make.
The code here makes up a library of routines that I use frequently. None of them are as good as libraries provided by other sources but they are free, they seem to work with any ANSI C++ compiler, and they seem to work well with each other.
|What it's called||What it does.|
|tarray.h||Templates for fixed size vectors and matrices that can
The matrix classes include LU decomposition and backsubstitution routines suitable for solving most linear systems. You can have parametric vectors with components in any class that provides definitions of :
|llist.h||This file offers a rudimentary list that expands and contracts in order
to hold what is asked of it. You can manipulate the items contained in
the list by using subscripts --- the  operator.
|stack.h||Based on the list.h class, this file provides a simple parametrized
|These files provide a rudimentary String class. They were written because
I needed to write a program on SOLARIS 2.3 but had no access to GNU libc++
(which would work just fine) or documentation for SUN's libraries. (Don't
|Code for random number routines and numerical prcedures I use most
most frequently. Included are functions for randomizing the components of a vector.
Use these routines with vectors and arrays of doubles and ints found in arrays.cc
|Vector and matrix classes of doubles and ints. These classes are essentially those provided in tarrays.h. They're used in several programs mentioned below.|
|random.h||The classes defined in this file use two different random number generators (the system supplied rand() and a generator based on Knuth's subtraction method) to produce Uniform, Normal, Exponential random numbers.|
|splines.h||These classes implement piecewise C^1 cubic splines and piecewise C^0 linear splines.|
|Eval.java||This file contains classes and methods needed to evaluate formulae. You can see how the code works by looking at the calculator applet. Email me if you think you need this code. I'm not making it generally available since it seems to turn up frequently in student's programming assignments.|
|Grapher.java||This file contains classes for an applet that lets you include the graphs of functions in an HTML document. You can see a demo of how it works in the browser test pages of the Onlne Exercises demo.Email me if you think you need this code. I'm not making it generally available since it seems to turn up frequently in student's programming assignments.|
|StatCalc.java||An applet that performs simple statistical calulations. You can preview the applet.|
|Online Exercises||This package contains the Onine Exercises system. It accepts a file written in "QuizMaker", (an extension of LaTeX) and produces a file that can be processed by LaTeX2html. It provides automatic generation of graphs, randomization of parameters, selection of questions, etc. See the Online Exercises demo page for more information.|
is a program to make population genetic inferences from multilocus probe data.