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]
Parameters:

data (List[T])

Return type:

List[T]

make_poly_clause(coef, variables, powers)[source]

Generates a polynomial clause _alpha_ * X^a * Y^b * Z^c …

Parameters:
Return type:

str

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.

Parameters:
Return type:

str

Modules