Implementation of sparse grid method.

* Need to modify product rule for differences.