A simple implementation of inverse matrix calculation caching