prodigy.util¶
prodigy.util¶
- dedup_list(data)[source]¶
Deduplicate a list using a set, preserving the ordering of the list.
>>> dedup_list([1,2,3,3]) [1, 2, 3]
- make_poly_clause(coef, variables, powers)[source]¶
Generates a polynomial clause _alpha_ * X^a * Y^b * Z^c …
- Parameters:
coef (
str)variables (
Collection[str])powers (
Collection[int])
- Return type:
- compute_hadamard_product(f, g)[source]¶
Computes the Hadamard product of two univariate rational functions, i.e. the point-wise product of the coefficients in their formal power series representation. TODO: To be moved into the distribution interface.
Modules