Add support for equality checking via the == operator for MultiIndexSet instances.
An implementation of __eq__()
now allows for checking the equality in value between two instances of MultiIndexSet
via the ==
operator
(resp. the !=
operator). Two instances of MultiIndexSet
are equal in value if and only if:
- the underlying exponents of the instances are equal and
- the lp-degree of the instances are equal.
The second condition means that even if two instances have the same underlying exponents, the instances are not equal if the lp-degree is not equal. Furthermore, if both the exponents and lp-degree are equal, then it is safe to say that both the spatial dimension and poly. degree are also equal; therefore, they are not explicitly checked.
This MR should resolve Issue #107 (closed) and related to Issue #99 (closed).
Some additional changes:
- The test suite is extended to cover the behavior of equality checking.
- The How-To Guide is updated with a demonstration of how to carry out equality in value checking between instances of
MultiIndexSet
.
Edited by Damar Wicaksono