{'fraction_non_alphanumeric': 0.01447178002894356, 'fraction_numerical': 0.001447178002894356, 'mean_word_length': 5.065789473684211, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Algorithms for computing cubatures based on moment theory

Quadrature is an approximation of the definite integral of a function by a weighted sum of function values at specified points, or nodes, within the domain of integration. Gaussian quadratures are constructed to yield exact results for any polynomials of degree 2r−1 or less by a suitable choice of r nodes and weights. Cubature is a generalization of quadrature in higher dimension. In this article, we elaborate algorithms to compute all minimal cubatures for a given domain and a given degree. We propose first algorithm in symbolic computation to characterize all cubatures of a given degree with a fixed number of nodes. The determination of the nodes and weights is then left to the computation of the eigenvectors of the matrix identified at the characterization stage and can be performed numerically. The characterization of cubatures on which our algorithms are based stems from moment theory. We formulate the results there in a basis‐independent way: Rather than considering the moment matrix, the central object in moment problems, we introduce the underlying linear map from the polynomial ring to its dual, the Hankel operator. This makes natural the use of bases of polynomials other than the monomial basis, and proves to be computationally relevant, either for numerical properties or to exploit symmetry.