Refactor the MultiIndexSet class
This is the parent issue for the refactoring of MultiIndexSet
.
The following changes are proposed (the list may be extended):
-
Fix edge cases when inferring the polynomial degree given multi-index set and lp-degree (see Issue #97 (closed); fixed via MR !63 (merged)) -
Remove the setter for lp_degree
property of theMultiIndexSet
(see Issue #98 (closed); fixed via MR !66 (merged)) -
Fix memory issue when adding exponents after the property is_complete
has been queried once for large sparse problems (see Issue #81 (closed); fixed via MR !77 (merged)) -
Make explicit the default value for the lp_degree
parameter of thefrom_degree()
class method (see Issue #76 (closed); fixed via MR !64 (merged)) -
Change the instance attribute poly_degree
to a read-only property (see Issue #100 (closed); fixed via MR !65 (merged)) -
Consider removing the default value for the lp_degree
parameter in the default constructor (see Issue #37 (closed); fixed via MR !64 (merged)) -
Consider allowing values of non int
type as the polynomial degree for thefrom_degree()
constructor as long as the value remains reasonable (see Issue #101 (closed); resolved via MR !86 (merged)) -
Consider allowing values of non int
type as the spatial dimension for thefrom_degree()
constructor as long as the value remains reasonable (see Issue #77 (closed); resolved via MR !85 (merged)) -
Consider removing exponents_completed
property (see Issue #104 (closed); resolved via MR !104 (merged)) -
Refactor the _new_instance_if_necessary()
method, especially if theexponents_completed
property is removed (resolved via MR !104 (merged)) -
Rename the is_complete
property tois_downward_closed
, or keep both but distinguish them (see Issue #105 (closed); resolved via MR !83 (merged)) -
Consider adding make_downward_closed()
method (see Issue #105 (closed) and Issue #123 (closed); resolved via MR !84 (merged)) -
Consider adding an inplace
parameter for themake_complete()
method (see Issue #103 (closed); resolved via MR !69 (merged)) -
Consider adding an inplace
parameter for theadd_exponents()
method (see Issue #117 (closed); resolved via MR !77 (merged)) -
Consider adding an inplace
parameter for theexpand_dim()
method (see Issue #118 (closed); resolved via MR !78 (merged)) -
Fix the documentation issue of the add_exponents()
method (see Issue #117 (closed); fixed via MR !77 (merged)) -
Consider having an __eq__
dunder method forMultiIndexSet
instances (see Issue #107 (closed); resolved via MR !88 (merged))- Two
MultiIndexSet
instances are equal when both the exponents and the lp-degrees are equal.
- Two
-
Clarify the behavior of copy.copy() and copy.deepcopy() for MultiIndexSet (see Issue #106 (closed); resolved via MR !97 (merged)) -
the dunder method __repr__()
should provide an unambiguous string representation of the instance (see Issue #133 (closed); resolved via MR !106 (merged))- The information provided by
__repr__()
can, in principle, be used to recreate the instance using the default constructor. - This means the lp_degree information should be included in the representation and be distinguished from
__str__()
- The information provided by
-
Define a dunder method for multiplying two instances of MultiIndexSet
(see Issue #119 (closed); resolved via MR !80 (merged)) -
Define a dunder method for multiplying two instances of MultiIndexSet
inplace (see Issue #125 (closed); resolved via MR !94 (merged)) -
Define a dunder method for creating a union of two instances of MultiIndexSet
(see Issue #124 (closed); resolved via MR !89 (merged)) -
Define the special method __contains__
so individual multi-indices may be checked for containment (see Issue #128 (closed); resolved via MR !103 (merged)) -
Define method/operator for subset check (see Issue #129 (closed); resolved via MR !98 (merged)) -
Define method/operator for proper subset check (see Issue #129 (closed); resolved via MR !99 (merged)) -
Define method/operator for superset check (see Issue #129 (closed); resolved via MR !100 (merged)) -
Define method/operator for proper superset check (see Issue #129 (closed); resolved via MR !101 (merged)) -
Define method/operator for disjoint check (see Issue #129 (closed); resolved via MR !102 (merged)) -
Define an empty MultiIndexSet
instance (see Issue #132 (closed); resolved by MR !96 (merged)) -
The default constructor of MultiIndexSet
should accept lexicographically unsorted and repeat exponents (see Issue #120 (closed); resolved by MR !79 (merged)) -
Refactor the implementation to find the position of an index within a multi-index set; use binary instead of linear search (see Issue #121 (closed); resolved via MR !81 (merged)) -
Refactor the generator to yield missing multi-indices with respect to downward-closedness to avoid duplicate terms (see Issue #122 (closed)) -
Clean up the in-code documentation (see Issue #134 (closed); resolved via MR !107 (merged))
When applicable, multiple merge requests will be made for the proposed changes; a separate issue may be created in order to elaborate the problem further.
Edited by Damar Wicaksono