Skip to content

Guarantee no duplication in the missing backward neighbors generator.

Damar Wicaksono requested to merge dev-122 into dev

All the missing backward neighbors ("first derivatives") may be generated (via a generator) from a given array of non-downward-closed multi-indices. Using a simple caching, the generator now guarantees that it yields no duplication of these missing neighbors.

This MR should resolve Issue #122 (closed).

Additional changes:

  • The utility function minterpy.core.utils.gen_missing_derivatives() is now renamed to minterpy.core.utils.gen_missing_backward_neighbors().
  • The utility function minterpy.core.utils.gen_partial_derivatives() is now renamed to minterpy.core.utils.gen_backward_neighbors().
  • The test suite is extended to include tests for the behaviors of generating both the backward neighbors given a multi-index element and all the missing backward neighbors given a set of multi-indices.
  • In-code documentation is updated for both utility functions.

The renaming of the functions is to refer to a more general notion of backward neighbors of a multi-index element in the literature, instead of partial derivatives of polynomials.

Edited by Damar Wicaksono

Merge request reports

Loading