My implementation of some standard algorithms.