Fix Issue #97: Edge case of inferring poly. degree
This MR should resolve Issue #97 (closed).
- To infer the (minimum) poly. degree that includes all the elements of a multi-index set, the ceiling of the maximum lp-norm given lp-degree is used. In some cases, the max. lp-norm is very close but not identical to the nearest integer. If the nearest integer is smaller, then the inferred polynomial degree is one larger than necessary. A guardrail is introduced to take care of this edge case.
- The corresponding utility function
_get_poly_degree()
has been renamed toget_poly_degree()
because the function is used outside the module as well (it is not a module-level hidden function). - The test suite has been extended specifically for the known edge cases.
PS: The ceiling function applied on the maximum of lp-norm of a multi-index set is required according to Issue #65 (closed).
Edited by Damar Wicaksono