sdfq_helper¶
- cryptographic_estimators.SDFqEstimator.sdfq_helper.binom(n: int, k: int)¶
Computes the binomial coefficient.
- Parameters:
n (int) – The total number of items.
k (int) – The number of items to be selected.
- Returns:
The binomial coefficient.
- Return type:
int
- cryptographic_estimators.SDFqEstimator.sdfq_helper.min_max(a: int, b: int, s: bool)¶
Returns the minimum or maximum of two integers, depending on a boolean switch.
- Parameters:
a (int) – The first integer to compare.
b (int) – The second integer to compare.
s (bool) – The switch that determines whether the minimum or maximum value is returned.
- Returns:
The minimum of a and b if s is False, otherwise the maximum of a and b.
- Return type:
int