Title: Multidimensional Self-Adaptive Grid Code, Sage