Gravitational Encounters and the Evolution of Galactic Nuclei. I. Method - David Merritt (Institute of Physics, 2015)