from RNG import *
from random import randint


if __name__ == "__main__":

    print("\nBinary RNG Tests\n")
    print(f"random_bool(truth_factor=1/3)")
    distribution_timer(random_bool, truth_factor=1/3)

    print("\nInteger RNG Tests\n")
    print("Base Case: randint(1, 6)")
    distribution_timer(randint, 1, 6)
    print("random_int(lo=1, hi=6)")
    distribution_timer(random_int, lo=1, hi=6)
    print("random_binomial(number_of_trials=4, probability=0.5)")
    distribution_timer(random_binomial, number_of_trials=4, probability=0.5)
    print("random_negative_binomial(number_of_trials=5, probability=0.75)")
    distribution_timer(random_negative_binomial, number_of_trials=5, probability=0.75)
    print("random_geometric(probability=0.75)")
    distribution_timer(random_geometric, probability=0.75)
    print("random_poisson(mean=4.5)")
    distribution_timer(random_poisson, mean=4.5)
    print("random_discrete(count=6, xmin=0.7, xmax=21.0, step=1)")
    distribution_timer(random_discrete, count=6, xmin=0.7, xmax=21.0, step=1)

    print("\nFloating Point RNG Tests\n")
    print("random_float(lo=0.0, hi=10.0)")
    floor_distribution_timer(random_float, lo=0.0, hi=10.0)
    print("random_exponential(lambda_rate=1.0)")
    floor_distribution_timer(random_exponential, lambda_rate=1.0)
    print("random_gamma(shape=1.0, scale=1.0)")
    floor_distribution_timer(random_gamma, shape=1.0, scale=1.0)
    print("random_weibull(shape=1.0, scale=1.0)")
    floor_distribution_timer(random_weibull, shape=1.0, scale=1.0)
    print("random_extreme_value(location=0.0, scale=1.0)")
    round_distribution_timer(random_extreme_value, location=0.0, scale=1.0)
    print("random_normal(mean=5.0, std_dev=2.0)")
    round_distribution_timer(random_normal, mean=5.0, std_dev=2.0)
    print("random_log_normal(log_mean=1.6, log_deviation=0.25)")
    round_distribution_timer(random_log_normal, log_mean=1.6, log_deviation=0.25)
    print("random_chi_squared(degrees_of_freedom=1.0)")
    round_distribution_timer(random_chi_squared, degrees_of_freedom=1.0)
    print("random_cauchy(location=0.0, scale=0.0005)")
    round_distribution_timer(random_cauchy, location=0.0, scale=0.0005)
    print("random_fisher_f(degrees_of_freedom_1=3.0, degrees_of_freedom_2=8.0)")
    round_distribution_timer(random_fisher_f, degrees_of_freedom_1=3.0, degrees_of_freedom_2=8.0)
    print("random_student_t(degrees_of_freedom=8.0)")
    round_distribution_timer(random_student_t, degrees_of_freedom=8.0)
    print("generate_canonical()")
    round_distribution_timer(generate_canonical)
