Initial commit

This commit is contained in:
Alexander Kobjolke 2025-03-13 22:36:51 +01:00
commit 4f4397b3e1
48 changed files with 2002 additions and 0 deletions

View file

@ -0,0 +1,30 @@
// -*- mode: c++ -*-
#pragma once
#include "../generator.h"
#include <random>
namespace atlas::generator {
class RandomIntGenerator : public Generator<int> {
public:
RandomIntGenerator()
: RandomIntGenerator(rand())
{
}
RandomIntGenerator(int const seed)
: m_device(seed)
{
}
auto next() -> value_type override
{
return m_gen(m_device);
}
private:
std::mt19937 m_device;
std::uniform_int_distribution<> m_gen;
};
}