Ejemplo n.º 1
0
 def random(a, b, c, d):
     u = ds.rg0()
     if (b != 0):
         return -a / b + 1 / b * math.sqrt(a**2 + 2 * b * math.pow(
             -math.log(1 - math.pow(u, 1 / d)), 1 / c))
     return 1 / a * math.pow(-math.log(1 - math.pow(u, 1 / d)), 1 / c)
Ejemplo n.º 2
0
 def random(c,l,t):
     return math.log(1-c/l*math.log(1-math.pow(ds.rg0(),t)))/c
Ejemplo n.º 3
0
 def random(a, b, l):
     return b * (math.pow(-math.log(1 - ds.rg0()) / l, 1 / a) - 1)
Ejemplo n.º 4
0
 def random(mu,sigma,xi):
     if(xi==0):
         return extremevalue.random(mu,sigma)
     if(sigma<=0):
         raise ValueError("sigma must be positive")
     return mu+sigma*(math.pow(math.log(1/ds.rg0()),-xi)-1)/xi
Ejemplo n.º 5
0
 def random(b, bb, d, l):
     u = ds.rg0()
     return math.pow(l, 1 / d) * math.pow(
         math.pow(1 + math.pow(1 - math.log(1 - u), -1 / b), 1 / bb) - 1,
         -1 / d)
Ejemplo n.º 6
0
 def random(a, b, aa, p):
     u = ds.rg0()
     return -a / b + math.sqrt(
         a**2 - 2 * b * math.log(1 - math.pow((1 - p) * u) /
                                 (1 - p * u), 1 / aa)) / b
Ejemplo n.º 7
0
 def random(a, l):
     u = ds.rg0()
     i = 2 * l / ((1 + l) - math.sqrt((1 + l)**2 - 4 * l * u))
     return a / math.log(i)
 def random(a, b, g, l):  #bad
     u = ds.rg0()
     return (math.pow(
         -math.pow(-math.log(-u *
                             (math.exp(l) - 1) + math.exp(l)) / l, 1 / a) +
         1, -1 / g) - 1) / b
Ejemplo n.º 9
0
 def random(mu,sigma):
     if(sigma<=0):
         raise ValueError("sigma must be positive")
     return mu-sigma*math.log(-math.log(ds.rg0()))
Ejemplo n.º 10
0
 def random(r, k, l, s):
     return s * math.asinh(-math.log(
         (math.pow(ds.rg0(), -1 / r) - 1) / k)) + l
Ejemplo n.º 11
0
 def random(g, l, s, t):
     return s * math.pow(-l * math.log(1 - math.pow(ds.rg0(), 1 / g)),
                         1 / t)