A simple, templated matrix class