/usr/include/tuxcap/MTRand.h is in libtuxcap-dev 1.4.0.dfsg2-2.2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | #ifndef __MTRAND_H__
#define __MTRAND_H__
#include <string>
#include <stdint.h>
namespace Sexy
{
#define MTRAND_N 624
class MTRand
{
uint32_t mt[MTRAND_N]; /* the array for the state vector */
int mti;
public:
MTRand(const std::string& theSerialData);
MTRand(uint32_t seed);
MTRand();
void SRand(const std::string& theSerialData);
void SRand(uint32_t seed);
uint32_t NextNoAssert();
uint32_t Next();
uint32_t NextNoAssert(uint32_t range);
uint32_t Next(uint32_t range);
float NextNoAssert(float range);
float Next( float range );
std::string Serialize();
static void SetRandAllowed(bool allowed);
};
struct MTAutoDisallowRand
{
MTAutoDisallowRand() { MTRand::SetRandAllowed(false); }
~MTAutoDisallowRand() { MTRand::SetRandAllowed(true); }
};
}
#endif //__MTRAND_H__
|