Skip to content

Allow unsorted exponents as input for `MultiIndexSet` constructor.

Damar Wicaksono requested to merge dev-120 into dev

An unsorted array of exponents (possibly with duplicate entries) may now be passed to the default constructor of the MultiIndexSet class. Only unique entries are kept and the resulting array will be lexicographically sorted (ordered).

This MR should resolve Issue #120 (closed).

Additionally:

  • A new multi-index related utility function is introduced to lexicographically sort an array of multi-indices and keep only unique elements.
  • The test suite is extended to test these changes both in the MultiIndexSet level and the utility function level.
  • The numba-accelerated function lex_smaller_or_equal() is refactored with updated in-code documentation.
  • The numba-accelerated function have_lexicographical_ordering() is renamed to is_lex_sorted() and refactored with updated in-code documentation.
  • The in-code documentation of MultiIndexSet class is updated, in particular, the docstring of the default constructor.

Merge request reports

Loading