No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Daniel Baumann 37d49d90e8
Releasing fastforward version 1.0.1-2~ffwd13+u1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2026-07-08 12:52:53 +02:00
debian Releasing fastforward version 1.0.1-2~ffwd13+u1. 2026-07-08 12:52:53 +02:00
go.mod Adding upstream version 1.0.1. 2026-07-08 12:51:58 +02:00
go.sum Adding upstream version 1.0.1. 2026-07-08 12:51:58 +02:00
LICENSE Adding upstream version 1.0.1. 2026-07-08 12:51:58 +02:00
package.go Adding upstream version 1.0.1. 2026-07-08 12:51:58 +02:00
par_pcg.go Adding upstream version 1.0.1. 2026-07-08 12:51:58 +02:00
par_pcg_test.go Adding upstream version 1.0.1. 2026-07-08 12:51:58 +02:00
pcg.go Adding upstream version 1.0.1. 2026-07-08 12:51:58 +02:00
pcg_test.go Adding upstream version 1.0.1. 2026-07-08 12:51:58 +02:00
README.txt Adding upstream version 1.0.1. 2026-07-08 12:51:58 +02:00
tid.go Adding upstream version 1.0.1. 2026-07-08 12:51:58 +02:00
tid_test.go Adding upstream version 1.0.1. 2026-07-08 12:51:58 +02:00

PACKAGE DOCUMENTATION

package pcg
    import "github.com/zeebo/pcg"


FUNCTIONS

func Float32() float32
    Float32 returns a float32 uniformly in [0, 1). Safe for concurrent
    callers.

func Float64() float64
    Float64 returns a float64 uniformly in [0, 1). Safe for concurrent
    callers.

func Uint32() uint32
    Uint32 returns a random uint32. Safe for concurrent callers.

func Uint32n(n uint32) uint32
    Uint32n returns a uint32 uniformly in [0, n). Safe for concurrent
    callers.

func Uint64() uint64
    Uint64 returns a random uint64. Safe for concurrent callers.

TYPES

type PT struct {
    // contains filtered or unexported fields
}
    PT is a thread safe pcg generator. The output is non-deterministic, even
    if all of the calls are single threaded. The zero value is valid.

func NewParallel(state uint64) PT
    New constructs a parallel pcg with the given state.

func (p *PT) Float32() float32
    Float32 returns a float32 uniformly in [0, 1). Safe for concurrent
    callers.

func (p *PT) Float64() float64
    Float64 returns a float64 uniformly in [0, 1). Safe for concurrent
    callers.

func (p *PT) Uint32() uint32
    Uint32 returns a random uint32. Safe for concurrent callers.

func (p *PT) Uint32n(n uint32) uint32
    Uint32n returns a uint32 uniformly in [0, n). Safe for concurrent
    callers.

func (p *PT) Uint64() uint64
    Uint64 returns a random uint64. Safe for concurrent callers.

type T struct {
    // contains filtered or unexported fields
}
    T is a pcg generator. The zero value is valid.

func New(state uint64) T
    New constructs a pcg with the given state.

func (p *T) Float32() float32
    Float32 returns a float32 uniformly in [0, 1). Not safe for concurrent
    callers.

func (p *T) Float64() float64
    Float64 returns a float64 uniformly in [0, 1). Not safe for concurrent
    callers.

func (p *T) Uint32() uint32
    Uint32 returns a random uint32. Not safe for concurrent callers.

func (p *T) Uint32n(n uint32) uint32
    Uint32n returns a uint32 uniformly in [0, n). Not safe for concurrent
    callers.

func (p *T) Uint64() uint64
    Uint64 returns a random uint64. Not safe for concurrent callers.