# Module quickrand_cache

- Description
- Data Types
- Function Index
- Function Details

### Quick Random Number Generation With Cached Data

.

Copyright © 2017-2020 Michael Truog

Version: 2.0.2 May 26 2021 18:14:15 ------------------------------------------------------------------------

Authors: Michael Truog (`mjtruog at protonmail dot com`).

## Description

### Quick Random Number Generation With Cached Data

## Data Types

### options()

`options() = [{cache_size, Bytes::pos_integer()}]`

### state()

`state() = #quickrand_cache{i = non_neg_integer(), cache_size = pos_integer(), cache = binary()}`

## Function Index

float/0 | #### Process dictionary cache version of quickrand:strong_float/0. .
float/1 | #### State cache version of quickrand:strong_float/0. .
floatL/0 | #### Process dictionary cache version of quickrand:strong_floatL/0. .
floatL/1 | #### State cache version of quickrand:strong_floatL/0. .
floatM/0 | #### Process dictionary cache version of quickrand:strong_floatM/0. .
floatM/1 | #### State cache version of quickrand:strong_floatM/0. .
floatR/0 | #### Process dictionary cache version of quickrand:strong_floatR/0. .
floatR/1 | #### State cache version of quickrand:strong_floatR/0. .
init/0 | #### Initialize cached process dictionary data. .
init/1 | #### Initialize cached process dictionary data with options. .
new/0 | #### Initialize cached state data. .
new/1 | #### Initialize cached state data with options. .
rand_bytes/1 | #### Get random bytes using cached process dictionary data. .
rand_bytes/2 | #### Get random bytes using cached state data. .
uniform/1 | #### Process dictionary cache version of quickrand:strong_uniform/1. .
uniform/2 | #### State cache version of quickrand:strong_uniform/1. .
uniform_range/2 | #### Process dictionary cache version of quickrand:strong_uniform_range/2. .
uniform_range/3 | #### State cache version of quickrand:strong_uniform_range/2. .

## Function Details

### float/0

`float() -> float()`

#### Process dictionary cache version of quickrand:strong_float/0.

### float/1

`float(State::state()) -> {float(), state()}`

#### State cache version of quickrand:strong_float/0.

### floatL/0

`floatL() -> float()`

#### Process dictionary cache version of quickrand:strong_floatL/0.

### floatL/1

`floatL(State::state()) -> {float(), state()}`

#### State cache version of quickrand:strong_floatL/0.

### floatM/0

`floatM() -> float()`

#### Process dictionary cache version of quickrand:strong_floatM/0.

### floatM/1

`floatM(State::state()) -> {float(), state()}`

#### State cache version of quickrand:strong_floatM/0.

### floatR/0

`floatR() -> float()`

#### Process dictionary cache version of quickrand:strong_floatR/0.

### floatR/1

`floatR(State::state()) -> {float(), state()}`

#### State cache version of quickrand:strong_floatR/0.

### init/0

`init() -> ok`

#### Initialize cached process dictionary data.

### init/1

`init(Options::options()) -> ok`

#### Initialize cached process dictionary data with options.

### new/0

`new() -> state()`

#### Initialize cached state data.

### new/1

`new(Options::options()) -> state()`

#### Initialize cached state data with options.

### rand_bytes/1

`rand_bytes(N::pos_integer()) -> binary()`

#### Get random bytes using cached process dictionary data.

### rand_bytes/2

`rand_bytes(N::pos_integer(), State::state()) -> {binary(), state()}`

#### Get random bytes using cached state data.

### uniform/1

`uniform(N::pos_integer()) -> pos_integer()`

#### Process dictionary cache version of quickrand:strong_uniform/1.

### uniform/2

`uniform(N::pos_integer(), State::state()) -> {pos_integer(), state()}`

#### State cache version of quickrand:strong_uniform/1.

### uniform_range/2

`uniform_range(Min::non_neg_integer(), Max::non_neg_integer()) -> non_neg_integer()`

#### Process dictionary cache version of quickrand:strong_uniform_range/2.

### uniform_range/3

`uniform_range(Min::non_neg_integer(), Max::non_neg_integer(), State::state()) -> {non_neg_integer(), state()}`

#### State cache version of quickrand:strong_uniform_range/2.

Generated by EDoc