Maze Builder Docs 6.3.5
Loading...
Searching...
No Matches
randomizer.h
Go to the documentation of this file.
1#ifndef RANDOMIZER_H
2#define RANDOMIZER_H
3
4#include <vector>
5#include <memory>
6
8namespace mazes {
9
11
16public:
17
20
23
26 randomizer(const randomizer& other);
27
32
35 randomizer(randomizer&& other) noexcept;
36
40 randomizer& operator=(randomizer&& other) noexcept;
41
46 int get_int_incl(int low, int high) noexcept;
47
52 std::vector<int> get_num_ints_incl(int low = 0, int high = 1) noexcept;
53
56 void seed(unsigned long long seed = 0) noexcept;
57
62 int operator()(int low, int high) noexcept {
63 return get_int_incl(low, high);
64 }
65
66private:
67 class randomizer_impl;
68 std::unique_ptr<randomizer_impl> m_impl;
69};
70
71}
72#endif // RANDOMIZER_H
Provides random-number generating capabilities.
Definition randomizer.h:15
void seed(unsigned long long seed=0) noexcept
Seeds the random number generator with the given seed value.
~randomizer()
Destructor.
randomizer(randomizer &&other) noexcept
Move constructor.
int get_int_incl(int low, int high) noexcept
Generates a random integer within a specified range.
randomizer & operator=(randomizer &&other) noexcept
Move assignment operator.
randomizer()
Default constructor.
randomizer & operator=(const randomizer &other)
Copy assignment operator.
std::vector< int > get_num_ints_incl(int low=0, int high=1) noexcept
Generates a random vector of integers with an optional range.
randomizer(const randomizer &other)
Copy constructor.
Namespace for the maze builder.
Definition algo_interface.h:9