# RandomKey

A functional interface for generating random numbers. See also the paper "Splittable pseudorandom number generators using cryptographic hashing" by Claessen and Palka (https://publications.lib.chalmers.se/records/fulltext/183348/local_183348.pdf). A given RandomKey should be used either for the split operation, or floats. Once it is used for one of these, the given RandomKey instance should be discarded, as it would only generate the same values again. By default, a RandomKey will throw an exception if you try to use it for more than one operation. To permit multiple uses of the same RandomKey instance, for example because you want deterministic results, call permitReuse and use its return value instead.

## Types

## Functions

Produce a fresh vector of the given length filled with random float values between 0 (inclusive) and 1 (exclusive). This method will always produce the same sequence of values for a given key.

Produce a fresh tensor of the given shape filled with uniformly distributed float values between 0 (inclusive) and 1 (exclusive). This method will always produce the same sequence of values for a given RandomKey instance.

## Inheritors

## Extensions

Samples from a cauchy distribution with a loc of 1 and a scale of 0 The cumulative distribution function (CDF) is F = (1 / 𝜋) arctan((x - loc) / scale) + (1 / 2) The random variable Y = F(x) has a uniform distribution. Therefore, we can invert F and use a uniform distribution to simulate random variable X https://en.wikipedia.org/wiki/Cauchy_distribution