Refactor `add_exponents()` method of the `MultiIndexSet` class
Following Issue #103 (closed), the method add_exponents()
of the MultiIndexSet
class shall also be refactored to include inplace
parameter to have a more transparent behavior after adding a set of exponents to an existing MultiIndexSet
instance. Currently, when this method is called, we are not really sure whether the returned instance is an identical instance or a new instance that may lead to complication downstream.
The expected behaviors with respect to the MultiIndexSet
instance are as follows:
exponents unchanged |
exponents changed |
|
---|---|---|
inplace=False |
return a shallow copy | return a new instance |
inplace=True |
instance unmodified | instance modified |
When an instance is modified in-place, the exponents are changed. Moreover, the poly_degree
and is_complete
(and later on, is_downward_closed
, see Issue #105 (closed)) properties may also change.
A merge request related to this issue will also include an update to the in-code documentation of the method.
This issue is part of larger refactoring tasks in Issue #99 (closed).