continuing work on migrating to boost multiarrays & c++ classes.  Added a few templated functions.