Introduce max_exponent and max_exponents properties in MultiIndexSet
While an instance of the MultiIndexSet
has already the poly_degree
property (whose definition depends on lp_degree
), sometimes it is also important to know the maximum exponents (for each dimension) and the maximum exponent (for all dimensions). For instance, the poly_degree
of a Grid
is associated with maximum exponent instead of multi_index.poly_degree
because it is defined as the maximum of all one-dimensional polynomial degrees.
These two quantities can be found by using np.max()
:
max_exponents = np.max(multi_index.exponents, axis=0)
max_exponent = np.max(multi_index.exponents)
but if it would more convenient to access these quantities via properties:
max_exponents = multi_index.max_exponents
max_exponent = multi_index.max_exponent
Adding these properties doesn't change the overall functionality of the codebase.