made changes why modifying c++ generalised sparse grid