First commit - Seems to pass "all 1's" evolution test
This commit is contained in:
41
Random.h
Normal file
41
Random.h
Normal file
@@ -0,0 +1,41 @@
|
||||
|
||||
|
||||
//
|
||||
#pragma once
|
||||
|
||||
|
||||
//
|
||||
#include <random>
|
||||
|
||||
|
||||
//
|
||||
namespace BitEvolver
|
||||
{
|
||||
//
|
||||
class Random
|
||||
{
|
||||
//
|
||||
public:
|
||||
|
||||
//
|
||||
Random();
|
||||
|
||||
//
|
||||
int GetInt(int min, int max);
|
||||
double GetDouble(double min, double max);
|
||||
double GetNormal(double mean, double standard_deviation);
|
||||
|
||||
//
|
||||
bool RollBool(double chance);
|
||||
|
||||
//
|
||||
private:
|
||||
|
||||
//
|
||||
std::mt19937_64 generator_mersenne_twister;
|
||||
|
||||
//
|
||||
void InitializeGenerators();
|
||||
|
||||
};
|
||||
};
|
Reference in New Issue
Block a user