One Logo Pool Ball
Accelerate · IOS API REFERENCE

BNNS.RandomGenerator

class · iOS 15.0+ · SDK 27.1

class RandomGenerator

A random number generator.

Members (3)

get · iOS 15.0+

state

TypeScript
get state(): BNNS_RandomGeneratorState
Swift declaration
var state: BNNS.RandomGeneratorState { get set }

The state of the random number generator. Use the random number generator's state to save and restore the generator.

set · iOS 15.0+

state

TypeScript
set state(value: BNNS_RandomGeneratorState)
Swift declaration
var state: BNNS.RandomGeneratorState { get set }

The state of the random number generator. Use the random number generator's state to save and restore the generator.

init · iOS 15.0+

init

TypeScript
static init(method: BNNS_RandomGeneratorMethod, seed?: (number) | null, filterParameters?: (BNNSFilterParameters) | null): (BNNS_RandomGenerator) | null
Swift declaration
init?(method: BNNS.RandomGeneratorMethod, seed: UInt64? = nil, filterParameters: BNNSFilterParameters? = nil)

Returns a new random number generator using the specified method and seed. - Parameter method: The random number generation method. - Parameter seed: An optional unsigned integer value used to initialize the random number generator. - Parameter filterParameters: Runtime filter parameters. If you use the generator on multiple threads, its usage is serialized through an internal lock. In this scenario, you should create different `RandomGenerator` objects with different seeds for each thread. Use the `state` property to ensure consistency of output.

Skipped declarations

No declarations were skipped in this snapshot.

All Accelerate types →