estimator.SDis.is_bounded_uniform

static SDis.is_bounded_uniform(secret_distribution)[source]

Return true if the secret is bounded uniform (sparse or not).

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

EXAMPLES:

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

sage: SDis.is_bounded_uniform(True)
False

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

sage: SDis.is_bounded_uniform(((-3, 3), 64))
True

sage: SDis.is_bounded_uniform((-3, 3))
True

Note

This function requires the bounds to be of opposite sign, as scaling code does not handle the other case.