Refactor the factory methods of the Grid class.
The factory methods of the Grid
class have been refactored. Specifically:
-
from_generator()
is renamed tofrom_function()
to avoid confusion with the Python's "generator". -
from_degree()
is introduced to directly create a grid that corresponds to a complete multi-index set without the need to separately create an instance ofMultiIndexSet
first. -
from_points()
is introduced to directly create a grid with a given array of generating points. -
from_value_set()
is refactored to only accepts one-dimensional array of two-dimensional array with a single column/row.
Additionally:
- The corresponding tests are updated to reflect these changes.
- Several How-To Guides regarding the construction of
Grid
instances are introduced in the docs.
This MR should resolve Issue #149 (closed) and part of the refactoring of the Grid
class (see Issue #135).