protocol

randomp

Random number generator protocol.

author:
Paulo Moura
version:
1.0
date:
2000/7/24
compilation:
static

(no dependencies on other files)

Public interface

random/1

Returns a new random float value in the interval [0.0, 1.0[.

compilation:
static
template:
random(Random)
mode – number of solutions:
random(-float) – one

random/3

Returns a new random value in the interval [Lower, Upper[.

compilation:
static
template:
random(Lower, Upper, Random)
mode – number of solutions:
random(+integer, +integer, -integer) – zero_or_one
random(+float, +float, -float) – zero_or_one

randseq/4

Returns a list of Length random values in the interval [Lower, Upper[.

compilation:
static
template:
randseq(Length, Lower, Upper, List)
mode – number of solutions:
randseq(+integer, +integer, +integer, -list) – zero_or_one
randseq(+integer, +float, +float, -list) – zero_or_one

randset/4

Returns an ordered set of Length random values in the interval [Lower, Upper[.

compilation:
static
template:
randset(Length, Lower, Upper, Set)
mode – number of solutions:
randset(+integer, +integer, +integer, -list) – zero_or_one
randset(+integer, +float, +float, -list) – zero_or_one

reset_seed/0

Resets the random seed to its default value.

compilation:
static
mode – number of solutions:
reset_seed – one

set_seed/1

Sets the random seed to the given value.

compilation:
static
template:
set_seed(Seed)
mode – number of solutions:
set_seed(+integer) – zero_or_one

Protected interface

(none)

Private predicates

(none)

Remarks

(none)