Exemple #1
0
def generate_values(state, output_modulus=None):
    yield from lcg.generate_values(state,
                                   a=MULTIPLIER,
                                   c=INCREMENT,
                                   m=MODULUS,
                                   masked_bits=SHIFT_BITS,
                                   output_modulus=output_modulus)
Exemple #2
0
def generate_values(state, bits):
    gen = lcg.generate_values(state,
                              MULTIPLIER,
                              INCREMENT,
                              MODULUS,
                              0)
    for prediction in gen:
        yield prediction >> (48 - bits)
Exemple #3
0
def generate_values(state, output_modulus=None):
    yield from lcg.generate_values(state, a=MULTIPLIER, c=INCREMENT,
                                   m=MODULUS, masked_bits=SHIFT_BITS,
                                   output_modulus=output_modulus)
Exemple #4
0
def generate_values(state, bits):
    gen = lcg.generate_values(state, MULTIPLIER, INCREMENT, MODULUS, 0)
    for prediction in gen:
        yield prediction >> (48 - bits)