streamlined c++ precomputing classes