Define an empty MultiIndexSet instance
To further support the set operations involving instances of MultiIndexSet
, the empty MultiIndexSet
instance shall be defined.
An empty MultiIndexSet
can be constructed with:
>>> import minterpy as mp
>>> mi = mp.MultiIndexSet(np.array([[]]), lp_degree=1.0)
>>> mi
MultiIndexSet
[]
>>> mi.spatial_dimension # empty set may have 0 spatial dimension
0
>>> mi = mp.MultiIndexSet(np.empty((0, 5)), lp_degree=2.0)
>>> mi
MultiIndexSet
[]
>>> mi.spatial_dimension # empty set may have its own spatial dimension
5
>>> mi.poly_degree # poly. degree is `None` as it can't be computed
>>>
Note that, to create an empty MultiIndexSet
an empty NumPy two-dimensional array must be fed to the constructor.
Furthermore, the parameter lp_degree
remains obligatory.
The following properties are defined a priori for an empty set:
-
exponents
(_exponents
): a two-dimensional empty array as specified. -
lp_degree
(_lp_degree
): as specified. -
poly_degree
(_poly_degree
):None
. -
spatial_dimension
(_spatial_dimension
): according to the dimension of the empty array. -
is_complete
(_is_complete
):False
. -
is_downward_closed
(_is_downward_closed
):False
.
This issue is related to the refactoring project of MultiIndexSet
(Issue #99 (closed)).