lab_graphs
Gangnam-Style Graphs
lab_graphs_random.h
1 
11 #ifndef _LAB_GRAPHS_RANDOM_H_
12 #define _LAB_GRAPHS_RANDOM_H_
13 
14 #include <vector>
15 
16 using std::vector;
17 
22 class Random
23 {
24  public:
25 
30  inline Random(unsigned long seed);
31 
35  inline int nextInt();
36 
41  template <class T>
42  void shuffle(vector<T> & array);
43 
44  private:
45 
46  unsigned long shiftRegister;
47 
51  inline bool LFSR();
52 };
53 
54 #include "lab_graphs_random.cpp"
55 #endif
void shuffle(vector< T > &array)
Randomly shuffles a vector with the current seed state.
Provides random functionality per a given seed.
Definition: lab_graphs_random.h:22
Random(unsigned long seed)
Constructor.
Definition: lab_graphs_random.cpp:10
int nextInt()
Definition: lab_graphs_random.cpp:18