seed.hpp - Deterministic Randomization

seed.hpp - Deterministic Randomization#

class Seed#

A random seed that can be used to make randomization in exact-real reproducible and deterministic.

Public Functions

Seed()#

Create a random seed that is different from any previously generated random seed in this process.

Note

This seed is not really random. It’s just a global counter so you are going to see the same seeds in an otherwise deterministic use of exact-real.

#include <exact-real/seed.hpp>
const exactreal::Seed seed;
seed.value
// -> 1337

Seed(unsigned int seed)#

Create a fixed seed with value seed.

Public Members

unsigned int value#

The underlying value used as a seed in random number generators.