Skip to content

Add multiplication operation support to MultiIndexSet.

Damar Wicaksono requested to merge dev-119 into dev

MultiIndexSet instances may now be multiplied with each other using the * operator. The resulting product set is the array sum of the cartesian product set. By convention, if two multi-index set operands have different spatial dimensions, the resulting product set has the largest dimension of the two operands. Furthermore, if two multi-index set operands have different lp-degree, the resulting product set has the largest lp-degree of the two operands.

This commit should resolve Issue #119 (closed).

Some additional changes:

  • A utility function to multiply multi-indices is implemented in minterpy.core.utils.multiply_indices(); the current implementation may become expensive for large multi-index sets.
  • The test suite is extended to test the behaviors of both the utility function and the multiplication of MultiIndexSet instances.
  • A new short How-To Guide to demonstrate MultiIndexSet multiplications is added.

Merge request reports

Loading