estimator.SDis.is_ternary

static SDis.is_ternary(secret_distribution)[source]

Return true if the secret is ternary (sparse or not)

Parameters:secret_distribution – distribution of secret, see module level documentation for details

EXAMPLES:

sage: from estimator import SDis
sage: SDis.is_ternary(False)
False

sage: SDis.is_ternary(True)
False

sage: SDis.is_ternary(((-1, 1), 64))
True

sage: SDis.is_ternary((-1, 1))
True

sage: SDis.is_ternary(((-3, 3), 64))
False

sage: SDis.is_ternary((-3, 3))
False