// Generated by Lisette bindgen
// Source: math/rand/v2 (Go stdlib)
// Package: rand
// Go: 1.25.5
// Lisette: 0.1.14

/// ExpFloat64 returns an exponentially distributed float64 in the range
/// (0, +math.MaxFloat64] with an exponential distribution whose rate parameter
/// (lambda) is 1 and whose mean is 1/lambda (1) from the default Source.
/// To produce a distribution with a different rate parameter,
/// callers can adjust the output using:
/// 
/// 	sample = ExpFloat64() / desiredRateParameter
pub fn ExpFloat64() -> float64

/// Float32 returns, as a float32, a pseudo-random number in the half-open interval [0.0,1.0)
/// from the default Source.
pub fn Float32() -> float32

/// Float64 returns, as a float64, a pseudo-random number in the half-open interval [0.0,1.0)
/// from the default Source.
pub fn Float64() -> float64

/// Int returns a non-negative pseudo-random int from the default Source.
pub fn Int() -> int

/// Int32 returns a non-negative pseudo-random 31-bit integer as an int32
/// from the default Source.
pub fn Int32() -> int32

/// Int32N returns, as an int32, a pseudo-random number in the half-open interval [0,n)
/// from the default Source.
/// It panics if n <= 0.
pub fn Int32N(n: int32) -> int32

/// Int64 returns a non-negative pseudo-random 63-bit integer as an int64
/// from the default Source.
pub fn Int64() -> int64

/// Int64N returns, as an int64, a pseudo-random number in the half-open interval [0,n)
/// from the default Source.
/// It panics if n <= 0.
pub fn Int64N(n: int64) -> int64

/// IntN returns, as an int, a pseudo-random number in the half-open interval [0,n)
/// from the default Source.
/// It panics if n <= 0.
pub fn IntN(n: int) -> int

// SKIPPED: N - constraint:comparable
// type constraint Int cannot be represented

pub fn New(src: Source) -> Ref<Rand>

pub fn NewChaCha8(seed: Slice<uint8>) -> Ref<ChaCha8>

pub fn NewPCG(seed1: uint64, seed2: uint64) -> Ref<PCG>

pub fn NewZipf(r: Ref<Rand>, s: float64, v: float64, imax: uint64) -> Option<Ref<Zipf>>

/// NormFloat64 returns a normally distributed float64 in the range
/// [-math.MaxFloat64, +math.MaxFloat64] with
/// standard normal distribution (mean = 0, stddev = 1)
/// from the default Source.
/// To produce a different normal distribution, callers can
/// adjust the output using:
/// 
/// 	sample = NormFloat64() * desiredStdDev + desiredMean
pub fn NormFloat64() -> float64

/// Perm returns, as a slice of n ints, a pseudo-random permutation of the integers
/// in the half-open interval [0,n) from the default Source.
pub fn Perm(n: int) -> Slice<int>

/// Shuffle pseudo-randomizes the order of elements using the default Source.
/// n is the number of elements. Shuffle panics if n < 0.
/// swap swaps the elements with indexes i and j.
pub fn Shuffle(n: int, swap: fn(int, int) -> ())

/// Uint returns a pseudo-random uint from the default Source.
pub fn Uint() -> uint

/// Uint32 returns a pseudo-random 32-bit value as a uint32
/// from the default Source.
pub fn Uint32() -> uint32

/// Uint32N returns, as a uint32, a pseudo-random number in the half-open interval [0,n)
/// from the default Source.
/// It panics if n == 0.
pub fn Uint32N(n: uint32) -> uint32

/// Uint64 returns a pseudo-random 64-bit value as a uint64
/// from the default Source.
pub fn Uint64() -> uint64

/// Uint64N returns, as a uint64, a pseudo-random number in the half-open interval [0,n)
/// from the default Source.
/// It panics if n == 0.
pub fn Uint64N(n: uint64) -> uint64

/// UintN returns, as a uint, a pseudo-random number in the half-open interval [0,n)
/// from the default Source.
/// It panics if n == 0.
pub fn UintN(n: uint) -> uint

/// A ChaCha8 is a ChaCha8-based cryptographically strong
/// random number generator.
pub type ChaCha8

/// A PCG is a PCG generator with 128 bits of internal state.
/// A zero PCG is equivalent to NewPCG(0, 0).
pub type PCG

/// A Rand is a source of random numbers.
pub type Rand

/// A Source is a source of uniformly-distributed
/// pseudo-random uint64 values in the range [0, 1<<64).
/// 
/// A Source is not safe for concurrent use by multiple goroutines.
pub interface Source {
  fn Uint64() -> uint64
}

/// A Zipf generates Zipf distributed variates.
pub type Zipf

impl ChaCha8 {
  /// AppendBinary implements the [encoding.BinaryAppender] interface.
  fn AppendBinary(self: Ref<ChaCha8>, mut b: Slice<uint8>) -> Result<Slice<uint8>, error>

  /// MarshalBinary implements the [encoding.BinaryMarshaler] interface.
  fn MarshalBinary(self: Ref<ChaCha8>) -> Result<Slice<uint8>, error>

  /// Read reads exactly len(p) bytes into p.
  /// It always returns len(p) and a nil error.
  /// 
  /// If calls to Read and Uint64 are interleaved, the order in which bits are
  /// returned by the two is undefined, and Read may return bits generated before
  /// the last call to Uint64.
  fn Read(self: Ref<ChaCha8>, mut p: Slice<uint8>) -> Partial<int, error>

  /// Seed resets the ChaCha8 to behave the same way as NewChaCha8(seed).
  fn Seed(self: Ref<ChaCha8>, seed: Slice<uint8>)

  /// Uint64 returns a uniformly distributed random uint64 value.
  fn Uint64(self: Ref<ChaCha8>) -> uint64

  /// UnmarshalBinary implements the [encoding.BinaryUnmarshaler] interface.
  fn UnmarshalBinary(self: Ref<ChaCha8>, data: Slice<uint8>) -> Result<(), error>
}

impl PCG {
  /// AppendBinary implements the [encoding.BinaryAppender] interface.
  fn AppendBinary(self: Ref<PCG>, mut b: Slice<uint8>) -> Result<Slice<uint8>, error>

  /// MarshalBinary implements the [encoding.BinaryMarshaler] interface.
  fn MarshalBinary(self: Ref<PCG>) -> Result<Slice<uint8>, error>

  /// Seed resets the PCG to behave the same way as NewPCG(seed1, seed2).
  fn Seed(self: Ref<PCG>, seed1: uint64, seed2: uint64)

  /// Uint64 return a uniformly-distributed random uint64 value.
  fn Uint64(self: Ref<PCG>) -> uint64

  /// UnmarshalBinary implements the [encoding.BinaryUnmarshaler] interface.
  fn UnmarshalBinary(self: Ref<PCG>, data: Slice<uint8>) -> Result<(), error>
}

impl Rand {
  /// ExpFloat64 returns an exponentially distributed float64 in the range
  /// (0, +math.MaxFloat64] with an exponential distribution whose rate parameter
  /// (lambda) is 1 and whose mean is 1/lambda (1).
  /// To produce a distribution with a different rate parameter,
  /// callers can adjust the output using:
  /// 
  /// 	sample = ExpFloat64() / desiredRateParameter
  fn ExpFloat64(self: Ref<Rand>) -> float64

  /// Float32 returns, as a float32, a pseudo-random number in the half-open interval [0.0,1.0).
  fn Float32(self: Ref<Rand>) -> float32

  /// Float64 returns, as a float64, a pseudo-random number in the half-open interval [0.0,1.0).
  fn Float64(self: Ref<Rand>) -> float64

  /// Int returns a non-negative pseudo-random int.
  fn Int(self: Ref<Rand>) -> int

  /// Int32 returns a non-negative pseudo-random 31-bit integer as an int32.
  fn Int32(self: Ref<Rand>) -> int32

  /// Int32N returns, as an int32, a non-negative pseudo-random number in the half-open interval [0,n).
  /// It panics if n <= 0.
  fn Int32N(self: Ref<Rand>, n: int32) -> int32

  /// Int64 returns a non-negative pseudo-random 63-bit integer as an int64.
  fn Int64(self: Ref<Rand>) -> int64

  /// Int64N returns, as an int64, a non-negative pseudo-random number in the half-open interval [0,n).
  /// It panics if n <= 0.
  fn Int64N(self: Ref<Rand>, n: int64) -> int64

  /// IntN returns, as an int, a non-negative pseudo-random number in the half-open interval [0,n).
  /// It panics if n <= 0.
  fn IntN(self: Ref<Rand>, n: int) -> int

  /// NormFloat64 returns a normally distributed float64 in
  /// the range -math.MaxFloat64 through +math.MaxFloat64 inclusive,
  /// with standard normal distribution (mean = 0, stddev = 1).
  /// To produce a different normal distribution, callers can
  /// adjust the output using:
  /// 
  /// 	sample = NormFloat64() * desiredStdDev + desiredMean
  fn NormFloat64(self: Ref<Rand>) -> float64

  /// Perm returns, as a slice of n ints, a pseudo-random permutation of the integers
  /// in the half-open interval [0,n).
  fn Perm(self: Ref<Rand>, n: int) -> Slice<int>

  /// Shuffle pseudo-randomizes the order of elements.
  /// n is the number of elements. Shuffle panics if n < 0.
  /// swap swaps the elements with indexes i and j.
  fn Shuffle(self: Ref<Rand>, n: int, swap: fn(int, int) -> ())

  /// Uint returns a pseudo-random uint.
  fn Uint(self: Ref<Rand>) -> uint

  /// Uint32 returns a pseudo-random 32-bit value as a uint32.
  fn Uint32(self: Ref<Rand>) -> uint32

  /// Uint32N returns, as a uint32, a non-negative pseudo-random number in the half-open interval [0,n).
  /// It panics if n == 0.
  fn Uint32N(self: Ref<Rand>, n: uint32) -> uint32

  /// Uint64 returns a pseudo-random 64-bit value as a uint64.
  fn Uint64(self: Ref<Rand>) -> uint64

  /// Uint64N returns, as a uint64, a non-negative pseudo-random number in the half-open interval [0,n).
  /// It panics if n == 0.
  fn Uint64N(self: Ref<Rand>, n: uint64) -> uint64

  /// UintN returns, as a uint, a non-negative pseudo-random number in the half-open interval [0,n).
  /// It panics if n == 0.
  fn UintN(self: Ref<Rand>, n: uint) -> uint
}

impl Zipf {
  /// Uint64 returns a value drawn from the Zipf distribution described
  /// by the Zipf object.
  fn Uint64(self: Ref<Zipf>) -> uint64
}
