Refactor superset checking of MultiIndexSet instsances.
The method is_super_index_set_of()
method of the MultiIndexSet
class is now renamed to is_superset()
for brevity and to conform with the method of the Python sets.
The instance of the class now also supports the operator >=
for superset checking. By default via the operator, if there is a difference in the spatial dimension, the set with the lower dimension is first expanded. This behavior can be changed via a parameter in the method call.
This MR should partially resolve Issue #129 (closed).
Some additional changes:
- The method
contains_these_exponents()
is refactored to include an optional parameterexpand_dim
whose default value is set toFalse
. This change is to simplify the code as bothis_subset()
andis_superset()
methods both usecontains_these_exponents()
and each of those methods implement the same dimension expansion logic. - The test suite is updated to include testing for superset checking.
- The How-To Guide on superset checking is updated with the checking via operator.