SEO [PR] 爆速!無料ブログ 無料ホームページ開設 無料ライブ放送
メインページ   名前空間一覧   クラス階層   構成   ファイル一覧   名前空間メンバ   構成メンバ   ファイルメンバ  

mymt.h

解説を見る。
00001 /*
00002     fast Mersenne Twister routine for Pentium4
00003     2002/10/19
00004     MITSUNARI Shigeo(herumi@nifty.com)
00005     original source is http://www.math.keio.ac.jp/matumoto/emt.html
00006  */
00007 #ifndef MY_MT_H_
00008 #define MY_MT_H_
00009 
00010 #ifdef __cplusplus
00011 extern "C" {
00012 #endif
00013 
00014 typedef struct {
00015     unsigned int state[624];
00016     unsigned int output[624];
00017     unsigned int index;
00018     char *mallocPtr;
00019 } myMT_t;
00020 
00021 #ifdef _MSC_VER
00022     #define MYMT_EXPORT __declspec(dllexport) 
00023 #else
00024     #define MYMT_EXPORT
00025 #endif
00026 
00027 /*
00028     initialize for myMT
00029     return the handle of myMT
00030     this library is reentrant
00031 */
00032 MYMT_EXPORT myMT_t *myMT_Init(void);
00033 
00034 /*
00035     set the seed of MT
00036 */
00037 MYMT_EXPORT void myMT_SetSeed(myMT_t *mt, unsigned int seed);
00038 
00039 /*
00040     set the large seed of MT
00041     0 < seedNum <= 624
00042 */
00043 MYMT_EXPORT void myMT_SetSeeds(myMT_t *mt, unsigned int *seed, int seedNum);
00044 
00045 /*
00046     free of the handle of myMT
00047 */
00048 MYMT_EXPORT void myMT_Term(myMT_t *mt);
00049 
00050 MYMT_EXPORT extern void (*myMT_Next)(myMT_t *mt);
00051 
00052 /* generates a random number on [0,0xffffffff]-interval */
00053 /* You may call myMT_Next_SSE2 insted of myMT_Next if you use this on only Pentium 4 */
00054 #define myMT_GetInt32(mt) (((mt->index == 624) ? myMT_Next(mt), 0 : 0), mt->output[mt->index++])
00055 
00056 #ifdef __cplusplus
00057 }
00058 #endif
00059 
00060 #endif /* MY_MT_H_ */

dKingyoUtilClass (dkutil)に対してMon Jun 9 01:32:41 2003に生成されました。 doxygen1.3