Add a new MultiIndexSet method to make a set of exponents downward-closed.
The method make_downward_closed()
of the MultiIndexSet
class is now available to make the underlying set of exponents downward-closed. The method fills in all backward indices that are missing from the current set until the whole set becomes downward-closed.
Following the convention adopted by other exponent-altering methods, such as, add_exponents()
and make_complete()
, the method make_downward_closed()
also supports a flag parameter inplace
to determine whether the change to the underlying exponents happens in-place or out-place. By default, the change happens out-place (i.e., a new instance is created).
This MR should resolve Issue #123 (closed).
Other changes included in this commit:
- A utility function that implements the routine to make an array of multi-indices downward-closed is added as
minterpy.core.utils.make_downward_closed()
. - The test suite is extended to test the behavior of the utility function as well as the new method
make_complete()
of theMultiIndexSet
class. - A new How-To Guide on making a multi-index set downward-closed is added to the docs.