seed.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <random> // std::mt19937_64
4 #include <armadillo> // arma::sed
5 
6 namespace pass
7 {
8 class seed
9 {
10 public:
14  seed() = delete;
15  seed(const seed &) = delete;
16  seed &operator=(const seed &) = delete;
17 
22  static std::mt19937_64 &get_generator();
23 
27  static void set_seed(
28  const arma::arma_rng::seed_type seed);
29 
41  static void set_random_seed();
42 
46  static arma::arma_rng::seed_type get_seed();
47 
48 protected:
49  static arma::arma_rng::seed_type seed_;
50  static std::mt19937_64 generator_;
51 };
52 } // namespace pass
seed & operator=(const seed &)=delete
static void set_seed(const arma::arma_rng::seed_type seed)
Definition: seed.cpp:13
static arma::arma_rng::seed_type seed_
Definition: seed.hpp:49
static std::mt19937_64 generator_
Definition: seed.hpp:50
static arma::arma_rng::seed_type get_seed()
Definition: seed.cpp:33
seed()=delete
static std::mt19937_64 & get_generator()
Definition: seed.cpp:8
Definition: adaptive_parameter_search.hpp:5
Definition: seed.hpp:8
static void set_random_seed()
Definition: seed.cpp:21