Registration is open for TensorFlow Dev Summit 2020 Learn more

AnyRandomNumberGenerator

public struct AnyRandomNumberGenerator : RandomNumberGenerator

A type-erased random number generator.

The AnyRandomNumberGenerator type forwards random number generating operations to an underlying random number generator, hiding its specific underlying type.

  • Declaration

    public init(_ rng: RandomNumberGenerator)

    Parameters

    rng

    A random number generator.

  • Declaration

    public mutating func next() -> UInt64