亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? acg.cc

?? 早期freebsd實(shí)現(xiàn)
?? CC
字號(hào):
// This may look like C code, but it is really -*- C++ -*-/* Copyright (C) 1989 Free Software FoundationThis file is part of the GNU C++ Library.  This library is freesoftware; you can redistribute it and/or modify it under the terms ofthe GNU Library General Public License as published by the FreeSoftware Foundation; either version 2 of the License, or (at youroption) any later version.  This library is distributed in the hopethat it will be useful, but WITHOUT ANY WARRANTY; without even theimplied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULARPURPOSE.  See the GNU Library General Public License for more details.You should have received a copy of the GNU Library General PublicLicense along with this library; if not, write to the Free SoftwareFoundation, 675 Mass Ave, Cambridge, MA 02139, USA.*/#ifdef __GNUG__#pragma implementation#endif#include <ACG.h>#include <assert.h>////	This is an extension of the older implementation of Algorithm M//	which I previously supplied. The main difference between this//	version and the old code are:////		+ Andres searched high & low for good constants for//		  the LCG.////		+ theres more bit chopping going on.////	The following contains his comments.////	agn@UNH.CS.CMU.EDU sez..//	//	The generator below is based on 2 well known//	methods: Linear Congruential (LCGs) and Additive//	Congruential generators (ACGs).//	//	The LCG produces the longest possible sequence//	of 32 bit random numbers, each being unique in//	that sequence (it has only 32 bits of state).//	It suffers from 2 problems: a) Independence//	isnt great, that is the (n+1)th number is//	somewhat related to the preceding one, unlike//	flipping a coin where knowing the past outcomes//	dont help to predict the next result.  b)//	Taking parts of a LCG generated number can be//	quite non-random: for example, looking at only//	the least significant byte gives a permuted//	8-bit counter (that has a period length of only//	256).  The advantage of an LCA is that it is//	perfectly uniform when run for the entire period//	length (and very uniform for smaller sequences//	too, if the parameters are chosen carefully).//	//	ACGs have extremly long period lengths and//	provide good independence.  Unfortunately,//	uniformity isnt not too great. Furthermore, I//	didnt find any theoretically analysis of ACGs//	that addresses uniformity.//	//	The RNG given below will return numbers//	generated by an LCA that are permuted under//	control of a ACG. 2 permutations take place: the//	4 bytes of one LCG generated number are//	subjected to one of 16 permutations selected by//	4 bits of the ACG. The permutation a such that//	byte of the result may come from each byte of//	the LCG number. This effectively destroys the//	structure within a word. Finally, the sequence//	of such numbers is permuted within a range of//	256 numbers. This greatly improves independence.//	////  Algorithm M as describes in Knuths "Art of Computer Programming",//	Vol 2. 1969//  is used with a linear congruential generator (to get a good uniform//  distribution) that is permuted with a Fibonacci additive congruential//  generator to get good independence.////  Bit, byte, and word distributions were extensively tested and pass//  Chi-squared test near perfect scores (>7E8 numbers tested, Uniformity//  assumption holds with probability > 0.999)////  Run-up tests for on 7E8 numbers confirm independence with//  probability > 0.97.////  Plotting random points in 2d reveals no apparent structure.////  Autocorrelation on sequences of 5E5 numbers (A(i) = SUM X(n)*X(n-i),//	i=1..512)//  results in no obvious structure (A(i) ~ const).////  Except for speed and memory requirements, this generator outperforms//  random() for all tests. (random() scored rather low on uniformity tests,//  while independence test differences were less dramatic).////  AGN would like to..//  thanks to M.Mauldin, H.Walker, J.Saxe and M.Molloy for inspiration & help.////  And I would (DGC) would like to thank Donald Kunth for AGN for letting me//  use his extensions in this implementation.//////	Part of the table on page 28 of Knuth, vol II. This allows us//	to adjust the size of the table at the expense of shorter sequences.//static randomStateTable[][3] = {{3,7,16}, {4,9, 32}, {3,10, 32}, {1,11, 32}, {1,15,64}, {3,17,128},{7,18,128}, {3,20,128}, {2,21, 128}, {1,22, 128}, {5,23, 128}, {3,25, 128},{2,29, 128}, {3,31, 128}, {13,33, 256}, {2,35, 256}, {11,36, 256},{14,39,256}, {3,41,256}, {9,49,256}, {3,52,256}, {24,55,256}, {7,57, 256},{19,58,256}, {38,89,512}, {17,95,512}, {6,97,512}, {11,98,512}, {-1,-1,-1} };//// spatial permutation table//	RANDOM_PERM_SIZE must be a power of two//#define RANDOM_PERM_SIZE 64unsigned long randomPermutations[RANDOM_PERM_SIZE] = {0xffffffff, 0x00000000,  0x00000000,  0x00000000,  // 32100x0000ffff, 0x00ff0000,  0x00000000,  0xff000000,  // 23100xff0000ff, 0x0000ff00,  0x00000000,  0x00ff0000,  // 31200x00ff00ff, 0x00000000,  0xff00ff00,  0x00000000,  // 12300xffff0000, 0x000000ff,  0x00000000,  0x0000ff00,  // 32010x00000000, 0x00ff00ff,  0x00000000,  0xff00ff00,  // 23010xff000000, 0x00000000,  0x000000ff,  0x00ffff00,  // 31020x00000000, 0x00000000,  0x00000000,  0xffffffff,  // 21030xff00ff00, 0x00000000,  0x00ff00ff,  0x00000000,  // 30120x0000ff00, 0x00000000,  0x00ff0000,  0xff0000ff,  // 20130x00000000, 0x00000000,  0xffffffff,  0x00000000,  // 10320x00000000, 0x0000ff00,  0xffff0000,  0x000000ff,  // 10230x00000000, 0xffffffff,  0x00000000,  0x00000000,  // 03210x00ffff00, 0xff000000,  0x00000000,  0x000000ff,  // 02130x00000000, 0xff000000,  0x0000ffff,  0x00ff0000,  // 01320x00000000, 0xff00ff00,  0x00000000,  0x00ff00ff   // 0123};////	SEED_TABLE_SIZE must be a power of 2//#define SEED_TABLE_SIZE 32static unsigned long seedTable[SEED_TABLE_SIZE] = {0xbdcc47e5, 0x54aea45d, 0xec0df859, 0xda84637b,0xc8c6cb4f, 0x35574b01, 0x28260b7d, 0x0d07fdbf,0x9faaeeb0, 0x613dd169, 0x5ce2d818, 0x85b9e706,0xab2469db, 0xda02b0dc, 0x45c60d6e, 0xffe49d10,0x7224fea3, 0xf9684fc9, 0xfc7ee074, 0x326ce92a,0x366d13b5, 0x17aaa731, 0xeb83a675, 0x7781cb32,0x4ec7c92d, 0x7f187521, 0x2cf346b4, 0xad13310f,0xb89cff2b, 0x12164de1, 0xa865168d, 0x32b56cdf};////	The LCG used to scramble the ACG////// LC-parameter selection follows recommendations in // "Handbook of Mathematical Functions" by Abramowitz & Stegun 10th, edi.//// LC_A = 251^2, ~= sqrt(2^32) = 66049// LC_C = result of a long trial & error series = 3907864577//static const unsigned long LC_A = 66049;static const unsigned long LC_C = 3907864577;static inline unsigned long LCG(unsigned long x){    return( x * LC_A + LC_C );}ACG::ACG(unsigned long seed, int size){    initialSeed = seed;        //    //	Determine the size of the state table    //        for (register int l = 0;	 randomStateTable[l][0] != -1 && randomStateTable[l][1] < size;	 l++);        if (randomStateTable[l][1] == -1) {	l--;    }    initialTableEntry = l;        stateSize = randomStateTable[ initialTableEntry ][ 1 ];    auxSize = randomStateTable[ initialTableEntry ][ 2 ];        //    //	Allocate the state table & the auxillary table in a single malloc    //        state = new unsigned long[stateSize + auxSize];    auxState = &state[stateSize];    reset();}////	Initialize the state//voidACG::reset(){    register unsigned long u;    if (initialSeed < SEED_TABLE_SIZE) {	u = seedTable[ initialSeed ];    } else {	u = initialSeed ^ seedTable[ initialSeed & (SEED_TABLE_SIZE-1) ];    }    j = randomStateTable[ initialTableEntry ][ 0 ] - 1;    k = randomStateTable[ initialTableEntry ][ 1 ] - 1;    register int i;    for(i = 0; i < stateSize; i++) {	state[i] = u = LCG(u);    }        for (i = 0; i < auxSize; i++) {	auxState[i] = u = LCG(u);    }        k = u % stateSize;    int tailBehind = (stateSize - randomStateTable[ initialTableEntry ][ 0 ]);    j = k - tailBehind;    if (j < 0) {	j += stateSize;    }        lcgRecurr = u;        assert(sizeof(double) == 2 * sizeof(long));}ACG::~ACG(){    if (state) delete state;    state = 0;    // don't delete auxState, it's really an alias for state.}////	Returns 32 bits of random information.//unsigned long ACG::asLong(){    unsigned long result = state[k] + state[j];    state[k] = result;    j = (j <= 0) ? (stateSize-1) : (j-1);    k = (k <= 0) ? (stateSize-1) : (k-1);        short int auxIndex = (result >> 24) & (auxSize - 1);    register unsigned long auxACG = auxState[auxIndex];    auxState[auxIndex] = lcgRecurr = LCG(lcgRecurr);        //    // 3c is a magic number. We are doing four masks here, so we    // do not want to run off the end of the permutation table.    // This insures that we have always got four entries left.    //    register unsigned long *perm = & randomPermutations[result & 0x3c];        result =  *(perm++) & auxACG;    result |= *(perm++) & ((auxACG << 24)			   | ((auxACG >> 8)& 0xffffff));    result |= *(perm++) & ((auxACG << 16)			   | ((auxACG >> 16) & 0xffff));    result |= *(perm++) & ((auxACG <<  8)			   | ((auxACG >> 24) &   0xff));        return(result);}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
蜜乳av一区二区三区| 国产亚洲欧美在线| 成人高清免费观看| 久久99这里只有精品| 天使萌一区二区三区免费观看| **性色生活片久久毛片| 国产精品久久久久久久久快鸭 | 亚洲自拍欧美精品| 久久亚洲免费视频| 蜜臂av日日欢夜夜爽一区| 一区二区三区四区在线播放| 国产精品免费视频网站| 95精品视频在线| 久草精品在线观看| 懂色av噜噜一区二区三区av| 豆国产96在线|亚洲| av不卡在线播放| 3d动漫精品啪啪一区二区竹菊| 欧美精品色综合| 欧美极品美女视频| 欧美一区二区三区婷婷月色| 国产精品区一区二区三区| 欧美日韩免费观看一区二区三区| 欧美三级欧美一级| 午夜精品一区二区三区免费视频 | 欧美三区免费完整视频在线观看| 色天使色偷偷av一区二区| 欧美亚洲另类激情小说| 国产欧美一区二区精品性色超碰| 亚洲一区二区三区小说| 国产在线播放一区二区三区| 91国在线观看| 亚洲免费观看在线视频| 国产麻豆精品theporn| 欧美精品国产精品| 日韩国产高清影视| 欧美高清你懂得| 丝袜亚洲精品中文字幕一区| 色偷偷久久一区二区三区| 亚洲女爱视频在线| 在线免费不卡视频| 中文字幕在线播放不卡一区| 国产电影一区二区三区| 国产欧美一区二区精品性| 国产一区二区美女诱惑| 国产欧美视频一区二区| 高清视频一区二区| 国产亚洲欧洲997久久综合 | 久久99久久99| 精品国产3级a| 成人免费观看男女羞羞视频| 国产日产精品1区| 成人网页在线观看| 亚洲美女偷拍久久| 精品久久久久久无| 国产精品18久久久久久久久久久久| 亚洲国产精品av| 日本精品一区二区三区高清| 免费成人美女在线观看| 欧美电影免费观看高清完整版| 国产99久久久久久免费看农村| 亚洲免费资源在线播放| 欧美电视剧免费全集观看| 成人听书哪个软件好| 日韩综合小视频| 亚洲伦理在线精品| www亚洲一区| 日韩视频免费观看高清完整版 | 在线一区二区三区四区五区| 蜜桃传媒麻豆第一区在线观看| 欧美成人一区二区| 91电影在线观看| 欧美少妇性性性| 欧美日韩亚洲综合在线| 欧美日韩久久一区二区| 日韩一区二区精品在线观看| 美女视频一区在线观看| 日本va欧美va精品发布| 午夜视频久久久久久| 丝袜美腿成人在线| 国产精品资源网站| 成人免费视频国产在线观看| 日韩免费一区二区三区在线播放| 日韩国产精品久久久| 亚洲乱码国产乱码精品精可以看| 欧美aⅴ一区二区三区视频| 亚洲欧美国产高清| av在线不卡电影| 水野朝阳av一区二区三区| 性久久久久久久久| 久久免费视频色| 欧美日韩一区不卡| 色婷婷精品大在线视频| 成人精品电影在线观看| 蜜臀av国产精品久久久久| 亚洲精品你懂的| 亚洲一区二区三区在线| 亚洲美腿欧美偷拍| 国产精品久久久久影院色老大| 亚洲国产精品成人综合 | 日韩福利视频导航| 日韩精品一区第一页| 美女诱惑一区二区| 久久国内精品视频| 国产福利一区二区三区视频在线| 99这里只有精品| 国产精品护士白丝一区av| 99精品欧美一区二区三区综合在线| 一区二区三区久久| 久久久91精品国产一区二区精品 | 亚洲同性gay激情无套| 欧美videossexotv100| 欧美一区二区播放| 久久精品免费在线观看| 欧美美女一区二区在线观看| 日韩欧美一区中文| 制服丝袜国产精品| 久久久久97国产精华液好用吗| 日韩女优电影在线观看| 国产人久久人人人人爽| 亚洲曰韩产成在线| 蜜桃av一区二区在线观看 | 欧美精品视频www在线观看 | 在线看日本不卡| 久久久久国产成人精品亚洲午夜| 亚洲人成精品久久久久| 日韩精品一区第一页| 国产99久久精品| 欧美精品777| 国产欧美日韩在线看| 三级一区在线视频先锋| 亚洲免费av网站| 成人白浆超碰人人人人| 亚洲愉拍自拍另类高清精品| 波多野结衣亚洲| 91精品国产麻豆| 五月天激情综合| 欧美亚洲高清一区| 久久丝袜美腿综合| 狠狠色丁香久久婷婷综| 欧美精品一区二区三区在线播放 | 99精品欧美一区二区三区小说 | 久久蜜臀精品av| 久久不见久久见免费视频1| 99视频精品全部免费在线| 久久这里只有精品视频网| 久久av老司机精品网站导航| 亚洲精品一区二区三区影院| 亚洲欧美激情一区二区| 欧美一区二区三区四区高清| 欧美卡1卡2卡| 色婷婷综合激情| 欧美一级片在线观看| 一区二区成人在线视频| 欧美色综合网站| 国产成人免费视频| 亚洲综合成人在线视频| 欧美在线免费播放| 九色|91porny| 婷婷开心激情综合| 成人免费在线播放视频| 日韩一级片网站| 欧美性色欧美a在线播放| 国产精品综合一区二区三区| 国产欧美一区二区精品婷婷 | 日韩国产高清在线| 一本色道久久综合亚洲91 | 国产麻豆日韩欧美久久| 国产一区二区电影| 亚洲1区2区3区4区| 亚洲国产精品av| 久久精品一级爱片| 欧美精品一区二区三区四区| 欧美日韩国产高清一区| 亚洲成在线观看| 一区二区三区不卡视频 | 亚洲高清三级视频| 日韩欧美一级片| 久久久久久麻豆| 日韩一区在线看| 亚洲午夜久久久久久久久久久| 一区二区三区在线视频免费 | 国产精品日韩精品欧美在线| 久久综合成人精品亚洲另类欧美| 久久久久国产一区二区三区四区| 黑人巨大精品欧美一区| 国产精品高潮久久久久无| 亚洲成人福利片| 亚洲成人在线免费| 亚洲国产精品久久久男人的天堂 | 偷拍日韩校园综合在线| 欧美一级日韩一级| 大白屁股一区二区视频| 亚洲综合一区二区精品导航| 亚洲午夜在线视频| 精品午夜久久福利影院 | 国产精品综合二区| 欧美日韩一区二区在线观看视频| 日韩一区二区三区电影| 欧美日韩在线电影|