📄 randomgen250.h
字号:
// 32bit Random Generator using Kirkpatrick-Stoll(R250)
//
// Call SetRandomSeed() before you use GetRandom() to get random numbers
// Use time counts as the parameter to SetRandomSeed() on win32 platform usually like this:
// LARGE_INTEGER liCounter;
// QueryPerformanceCounter( &liCounter );
// CRandom.SetRandomSeed( (int)liCounter.LowPart );
#pragma once
class CRandomGen250
{
public:
CRandomGen250( void );
~CRandomGen250( void );
void SetRandomSeed( int iSeed );
double GetRandom( void );
private:
int m_ir[256];
int m_k;
int m_iran_ks;
};
typedef CRandomGen250 CRandom;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -