Ocular Engine
CMWC.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_MATH_RANDOM_CMWC__H__
19 #define __H__OCULAR_MATH_RANDOM_CMWC__H__
20 
21 #include "ARandom.hpp"
22 #include <array>
23 
24 //------------------------------------------------------------------------------------------
25 
30 namespace Ocular
31 {
36  namespace Math
37  {
42  namespace Random
43  {
48  class CMWC131104 : public ARandom
49  {
50  public:
51 
52  CMWC131104();
53  ~CMWC131104();
54 
55  virtual void seed(int64_t seed);
56  virtual uint32_t next();
57 
58  protected:
59 
60  private:
61 
62  void finishSeed();
63 
64  uint32_t m_SeedCast;
65  uint32_t m_C;
66 
67  std::array<uint32_t, 4096> m_Q;
68  };
69  }
73  }
77 }
82 //------------------------------------------------------------------------------------------
83 
84 #endif
Definition: CMWC.hpp:48
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
virtual uint32_t next()
Definition: CMWC.cpp:65
void seed()
Definition: ARandom.cpp:52
Definition: ARandom.hpp:67