expandGridSample function

Sample the Cartesian Product