protocol

# `pseudo_random_protocol`

Pseudo-random number generator protocol for seed handling predicates. These predicates are declared as synchronized when the library is compiled using a backend supporting threads.

Availability:
`logtalk_load(random(loader))`
Author: Paulo Moura
Version: 1:0:0
Date: 2021-02-21
Compilation flags:
`static`
Extends:
`public` random_protocol
Remarks:
(none)
Inherited public predicates:
between/3 enumerate/2 maybe/0 maybe/1 maybe/2 maybe_call/1 maybe_call/2 member/2 permutation/2 random/1 random/3 randseq/4 randset/4 select/3 select/4 sequence/4 set/4 swap/2 swap_consecutive/2

## Public predicates

### `get_seed/1`

Gets the current random generator seed. Seed should be regarded as an opaque ground term.

Compilation flags:
`static, synchronized`
Template:
`get_seed(Seed)`
Mode and number of proofs:
`get_seed(-ground)` - `one`

### `set_seed/1`

Sets the random generator seed to a given value returned by calling the `get_seed/1` predicate.

Compilation flags:
`static, synchronized`
Template:
`set_seed(Seed)`
Mode and number of proofs:
`set_seed(+ground)` - `one`

## Protected predicates

(no local declarations; see entity ancestors if any)

## Private predicates

(no local declarations; see entity ancestors if any)

## Operators

(none)

See also

random, backend_random, fast_random