src/cpython/random

    Dark Mode
Search:
Group by:

Procs

proc seed() {....raises: [Exception, ValueError, OSError, IOError, EOFError,
                       KeyError], tags: [RootEffect].}
proc seed(a: int; version = 2) {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc randbytes(n: int): string {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc randrange(stop: int): int {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc randrange(start, stop: int): int {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc randrange(start, stop, step: int): int {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc randint(a, b: int): int {....raises: [Exception, ValueError, OSError, IOError,
                                        EOFError, KeyError], tags: [RootEffect].}
proc getrandbits(k: int): int {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc choice(sequence: seq[int]): int {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc choice(sequence: seq[char]): char {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc choice(sequence: seq[bool]): bool {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc choice(sequence: seq[float]): float {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc choice(sequence: seq[string]): string {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc sample(sequence: seq[int]; length: int): seq[int] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc sample(sequence: seq[char]; length: int): seq[char] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc sample(sequence: seq[bool]; length: int): seq[bool] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc sample(sequence: seq[float]; length: int): seq[float] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc sample(sequence: seq[string]; length: int): seq[string] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc random(): float {....raises: [Exception, ValueError, OSError, IOError,
                                EOFError, KeyError], tags: [RootEffect].}
proc uniform(a, b: float): float {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc uniform(a, b: int): float {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc triangular(lo, hi, mode: float): float {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc triangular(lo, hi, mode: int): float {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc betavariate(alpha, beta: float): range[0.0 .. 1.0] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc betavariate(alpha, beta: int): range[0.0 .. 1.0] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc expovariate(lambd: float): float {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc expovariate(lambd: int): float {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc gammavariate(alpha, beta: float): float {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc gammavariate(alpha, beta: int): float {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc gauss(mu, sigma: float): float {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc gauss(mu, sigma: int): float {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc lognormvariate(mu, sigma: float): float {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc lognormvariate(mu, sigma: int): float {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc normalvariate(mu, sigma: float): float {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc normalvariate(mu, sigma: int): float {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc vonmisesvariate(mu, kappa: float): float {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc vonmisesvariate(mu, kappa: int): float {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc paretovariate(alpha: float): float {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc paretovariate(alpha: int): float {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc weibullvariate(alpha: float): float {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc weibullvariate(alpha: int): float {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}