workfactor_helper¶
- cryptographic_estimators.SDEstimator.SDWorkfactorModels.workfactor_helper.binary_entropy(c: float)¶
Computes the binary entropy function H.
- cryptographic_estimators.SDEstimator.SDWorkfactorModels.workfactor_helper.binomial_approximation(n: float, k: float)¶
Computes the binomial coefficient (n over k) via Sterlings approximation.
- cryptographic_estimators.SDEstimator.SDWorkfactorModels.workfactor_helper.inverse_binary_entropy(v: float)¶
Compute the inverse binary entropy function.
- Parameters:
v (float) – The value for which the inverse binary entropy function should be computed.
- Returns:
The unique value of x in the range [0, …, 1/2] such that H^{-1}(x) = v.
- Return type:
float
- cryptographic_estimators.SDEstimator.SDWorkfactorModels.workfactor_helper.list_of_random_tuples(x: float, y: float, z: int)¶
- cryptographic_estimators.SDEstimator.SDWorkfactorModels.workfactor_helper.may_ozerov_near_neighbor_time(list_size: float, vector_length: float, target_weight: float)¶
Computes the asymptotic runtime of the Nearest Neighbour Algorithm by May-Ozerov [MO15].
- cryptographic_estimators.SDEstimator.SDWorkfactorModels.workfactor_helper.representations_asymptotic(target_weight: float, weight_to_cancel: float, vector_length: float)¶
Computes the asymptotic number of representations of a length-vector_length weight-target_weight vector constructed as sum of two length-vector_length weight-(target_weight/2 + weight_to_cancel) vectors.
- Returns:
The asymptotic number of representations.
- cryptographic_estimators.SDEstimator.SDWorkfactorModels.workfactor_helper.wrap(f, g)¶
Helper function for the SciPy optimization framework.