Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source is a random source using xorshift32 algorithm.
Marsaglia, George (July 2003). "Xorshift RNGs". Journal of Statistical Software. 8 (14).
Example ¶
package main
import (
"fmt"
"math/rand"
"github.com/shogo82148/randsrc/xorshift32"
)
func main() {
src := xorshift32.New(1)
r := rand.New(src)
for i := 0; i < 10; i++ {
fmt.Println(r.Int63())
}
}
Output: 580613040243456 5685324361786641575 5151145904873909736 1358144856227876441 4306488609506595258 5706062264076749723 6511120689350704215 187840544559483608 1914254710601805188 689360569037983500
Click to show internal directories.
Click to hide internal directories.