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 xorshift64 algorithm.
Marsaglia, George (July 2003). "Xorshift RNGs". Journal of Statistical Software. 8 (14).
Example ¶
package main
import (
"fmt"
"math/rand"
"github.com/shogo82148/randsrc/xorshift64"
)
func main() {
src := xorshift64.New(1)
r := rand.New(src)
for i := 0; i < 10; i++ {
fmt.Println(r.Int63())
}
}
Output: 541134880 576496499416926752 5588758332216382228 8839011916000968722 4829565071999682866 8887899500566907904 5846517310170255160 7139982085056146566 4512327100996027519 4166335364516418199
Click to show internal directories.
Click to hide internal directories.