You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
shuffle3/lean/include/rng/frng.hpp

18 lines
385 B

4 years ago
#include "impl.hpp"
namespace rng
{
struct frng : public RNG
{
inline frng(double s1, double s2) : state({s1, s2}){}
inline frng(const std::array<double, 2>& ar) : state(ar){}
inline frng(std::array<double, 2>&& ar) : state(ar){}
inline frng(const double (&ar)[2]) : state({ar[0], ar[1]}) {}
protected:
double sample();
private:
std::array<double, 2> state;
};
}