Пример #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)
Пример #2
0
def generate_values(state, bits):
    gen = lcg.generate_values(state,
                              MULTIPLIER,
                              INCREMENT,
                              MODULUS,
                              0)
    for prediction in gen:
        yield prediction >> (48 - bits)
Пример #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)
Пример #4
0
def generate_values(state, bits):
    gen = lcg.generate_values(state, MULTIPLIER, INCREMENT, MODULUS, 0)
    for prediction in gen:
        yield prediction >> (48 - bits)