Refactor add_points() method for Grid instances
The instance method add_points()
of the Grid
class shall be renamed to add_exponents()
to avoid confusion because what is being added is actually exponents of multi-index set, not points in the grid.
The method add_exponents()
is a carry-over method of the same name from the underlying MultiIndexSet
instance attached to the instance of Grid
.
Currently, calling the method will return an instance of Grid
whose multi-index set is updated with the new exponents; the returned instance, however, may or may not be identical with the current instance.
Instead of this implicit behavior, it would be better that calling the method always return a new instance by default.
In principle, an in-place parameter may be introduced to the method to allow for an explicit in-place modification.
Similar carry-over methods from the underlying MultiIndexSet
instance are make_compete()
(Issue #157 (closed)) and make_downward_closed()
(Issue #156 (closed)).
By making these methods available to the Grid
instances, we can avoid directly working on the MultiIndexSet
instances unnecessarily (and then create a new Grid
instance) when dealing with instances of Grid
.
This issue is part of the update and refactoring of the Grid
class (Issue #135).