src/pylib/Lib/random_impl/proc_dispatched

Source   Edit  

functions and methods that can be directly dispatched to std/random

Procs

func choice[T](self: PyRandom; data: openArray[T]): T
Source   Edit  
func genrand_uint32(self: PyRandom): uint32 {....raises: [], tags: [], forbids: [].}
inner. Source   Edit  
proc getstate(): PyRandomState {....raises: [], tags: [], forbids: [].}
Source   Edit  
func guass(self: PyRandom; mu = 0.0; sigma = 1.0): float {....raises: [], tags: [],
    forbids: [].}
Source   Edit  
func randbelow[T: SomeInteger](self: PyRandom; n: T): T
_randbelow inner. Source   Edit  
func randint[T: SomeInteger](self: PyRandom; a, b: T): T
Source   Edit  
func randrange[T: SomeInteger](self: PyRandom; start, stop: T): T
Source   Edit  
func randrange[T: SomeInteger](self: PyRandom; stop: T): T
Source   Edit  
proc setstate(state: PyRandomState) {....raises: [], tags: [], forbids: [].}
Source   Edit  
func uniform(self: PyRandom; a, b: float): float {....raises: [], tags: [],
    forbids: [].}
Source   Edit  

Methods

method random(self: PyRandom): float {.base, ...raises: [], tags: [], forbids: [].}
Source   Edit  
method seed(self: PyRandom; val = none(int64)) {.base, ...raises: [], tags: [],
    forbids: [].}
Source   Edit  

Templates

template choice[T](data: openArray[T]): T
Source   Edit  
template genrand_uint32(): uint32
Source   Edit  
template guass(mu = 0.0; sigma = 1.0): float
Source   Edit  
template randbelow[T: SomeInteger](n: T): T
Source   Edit  
template randint[T: SomeInteger](a, b: T): T
Source   Edit  
template random(): float
Source   Edit  
template randrange[T: SomeInteger](start, stop: T): T
Source   Edit  
template randrange[T: SomeInteger](stop: T): T
Source   Edit  
template seed(val = none(int64))
Source   Edit  
template uniform(a, b: float): float
Source   Edit