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

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

?? bitsieve.java

?? java源代碼 請看看啊 提點(diǎn)寶貴的意見
?? JAVA
字號(hào):
/* * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. *//* * @(#)BitSieve.java	1.9 03/01/23 */package java.math;/** * A simple bit sieve used for finding prime number candidates. Allows setting * and clearing of bits in a storage array. The size of the sieve is assumed to * be constant to reduce overhead. All the bits of a new bitSieve are zero, and * bits are removed from it by setting them. * * To reduce storage space and increase efficiency, no even numbers are * represented in the sieve (each bit in the sieve represents an odd number). * The relationship between the index of a bit and the number it represents is * given by * N = offset + (2*index + 1); * Where N is the integer represented by a bit in the sieve, offset is some * even integer offset indicating where the sieve begins, and index is the * index of a bit in the sieve array. * * @see     BigInteger * @version 1.9, 01/23/03 * @author  Michael McCloskey * @since   1.3 */class BitSieve {    /**     * Stores the bits in this bitSieve.     */    private long bits[];    /**     * Length is how many bits this sieve holds.     */    private int length;    /**     * A small sieve used to filter out multiples of small primes in a search     * sieve.     */    private static BitSieve smallSieve = new BitSieve();    /**     * Construct a "small sieve" with a base of 0.  This constructor is      * used internally to generate the set of "small primes" whose multiples     * are excluded from sieves generated by the main (package private)     * constructor, BitSieve(BigInteger base, int searchLen).  The length     * of the sieve generated by this constructor was chosen for performance;     * it controls a tradeoff between how much time is spent constructing     * other sieves, and how much time is wasted testing composite candidates     * for primality.  The length was chosen experimentally to yield good     * performance.     */    private BitSieve() {        length = 150 * 64;        bits = new long[(unitIndex(length - 1) + 1)];        // Mark 1 as composite        set(0);        int nextIndex = 1;        int nextPrime = 3;        // Find primes and remove their multiples from sieve        do {            sieveSingle(length, nextIndex + nextPrime, nextPrime);            nextIndex = sieveSearch(length, nextIndex + 1);            nextPrime = 2*nextIndex + 1;        } while((nextIndex > 0) && (nextPrime < length));    }    /**     * Construct a bit sieve of searchLen bits used for finding prime number     * candidates. The new sieve begins at the specified base, which must     * be even.     */    BitSieve(BigInteger base, int searchLen) {        /*         * Candidates are indicated by clear bits in the sieve. As a candidates         * nonprimality is calculated, a bit is set in the sieve to eliminate         * it. To reduce storage space and increase efficiency, no even numbers         * are represented in the sieve (each bit in the sieve represents an         * odd number).         */        bits = new long[(unitIndex(searchLen-1) + 1)];        length = searchLen;        int start = 0;                int step = smallSieve.sieveSearch(smallSieve.length, start);        int convertedStep = (step *2) + 1;        // Construct the large sieve at an even offset specified by base        MutableBigInteger r = new MutableBigInteger();        MutableBigInteger q = new MutableBigInteger();        do {            // Calculate base mod convertedStep            r.copyValue(base.mag);            r.divideOneWord(convertedStep, q);            start = r.value[r.offset];            // Take each multiple of step out of sieve            start = convertedStep - start;            if (start%2 == 0)                start += convertedStep;            sieveSingle(searchLen, (start-1)/2, convertedStep);            // Find next prime from small sieve            step = smallSieve.sieveSearch(smallSieve.length, step+1);            convertedStep = (step *2) + 1;        } while (step > 0);    }            /**     * Given a bit index return unit index containing it.     */    private static int unitIndex(int bitIndex) {        return bitIndex >>> 6;    }    /**     * Return a unit that masks the specified bit in its unit.     */    private static long bit(int bitIndex) {        return 1L << (bitIndex & ((1<<6) - 1));    }    /**     * Get the value of the bit at the specified index.     */    private boolean get(int bitIndex) {        int unitIndex = unitIndex(bitIndex);        return ((bits[unitIndex] & bit(bitIndex)) != 0);    }    /**     * Set the bit at the specified index.     */    private void set(int bitIndex) {        int unitIndex = unitIndex(bitIndex);        bits[unitIndex] |= bit(bitIndex);             }    /**     * This method returns the index of the first clear bit in the search     * array that occurs at or after start. It will not search past the     * specified limit. It returns -1 if there is no such clear bit.     */    private int sieveSearch(int limit, int start) {        if (start >= limit)            return -1;                int index = start;        do {            if (!get(index))                return index;            index++;        } while(index < limit-1);        return -1;    }    /**     * Sieve a single set of multiples out of the sieve. Begin to remove     * multiples of the specified step starting at the specified start index,     * up to the specified limit.     */    private void sieveSingle(int limit, int start, int step) {        while(start < limit) {            set(start);            start += step;        }    }    /**     * Test probable primes in the sieve and return successful candidates.     */    BigInteger retrieve(BigInteger initValue, int certainty) {        // Examine the sieve one long at a time to find possible primes        int offset = 1;        for (int i=0; i<bits.length; i++) {            long nextLong = ~bits[i];            for (int j=0; j<64; j++) {                if ((nextLong & 1) == 1) {                    BigInteger candidate = initValue.add(                                           BigInteger.valueOf(offset));                    if (candidate.primeToCertainty(certainty))                        return candidate;                }                nextLong >>>= 1;                offset+=2;            }        }        return null;    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久久久久久久免费樱桃 | 亚洲人123区| 婷婷一区二区三区| 成人精品亚洲人成在线| 欧美一区二区三区影视| 亚洲精品五月天| 激情成人午夜视频| 欧美日韩不卡在线| 亚洲乱码中文字幕综合| 黄色日韩三级电影| 91麻豆精品久久久久蜜臀| 综合欧美一区二区三区| 国产精品系列在线播放| 日韩一区国产二区欧美三区| 日韩精品一二三区| 成人免费三级在线| 久久综合九色综合欧美亚洲| 肉肉av福利一精品导航| 欧美制服丝袜第一页| 国产精品久久看| 国产成人免费网站| 国产丝袜在线精品| 国产精品一区免费在线观看| 日韩网站在线看片你懂的| 三级亚洲高清视频| 欧美猛男男办公室激情| 亚洲精品中文字幕在线观看| 91亚洲精品乱码久久久久久蜜桃 | 秋霞电影网一区二区| 欧美午夜影院一区| 亚洲va天堂va国产va久| 欧美蜜桃一区二区三区| 日日夜夜一区二区| 91精品福利在线一区二区三区 | 欧美一区二区网站| 青青青伊人色综合久久| 日韩精品影音先锋| 韩国av一区二区| 久久久久9999亚洲精品| 韩国v欧美v亚洲v日本v| 久久久久久久国产精品影院| 国产美女主播视频一区| 国产日韩影视精品| 国产主播一区二区三区| 久久你懂得1024| www.亚洲人| 一区二区三区在线免费视频| 欧美在线看片a免费观看| 偷拍自拍另类欧美| 精品国产精品网麻豆系列| 国产伦精品一区二区三区视频青涩| 26uuu亚洲综合色欧美| 粉嫩嫩av羞羞动漫久久久 | 日韩网站在线看片你懂的| 另类小说综合欧美亚洲| 国产亚洲自拍一区| 97se亚洲国产综合自在线不卡| 亚洲制服丝袜av| 欧美tickling网站挠脚心| 国产成人自拍在线| 亚洲国产一区二区三区青草影视| 欧美一区三区四区| 国产不卡免费视频| 亚洲综合男人的天堂| 在线成人免费视频| 国产一二精品视频| 亚洲一级二级在线| 国产视频一区二区在线| 色94色欧美sute亚洲线路一ni| 日本不卡不码高清免费观看| 国产精品福利影院| 制服丝袜亚洲播放| 成人免费视频一区| 久久成人久久鬼色| 亚洲国产中文字幕在线视频综合| 久久久91精品国产一区二区精品 | 亚洲精品成a人| 精品区一区二区| 在线观看免费亚洲| 成人激情免费电影网址| 免费一级欧美片在线观看| 亚洲色图在线播放| 国产性做久久久久久| 欧美日韩大陆在线| 色婷婷综合激情| 国产成人自拍网| 九九视频精品免费| 亚洲午夜精品网| 亚洲乱码精品一二三四区日韩在线| 欧美成人一区二区三区在线观看| 91免费观看在线| 成人免费观看视频| 狠狠色丁香久久婷婷综| 亚洲444eee在线观看| 一区二区高清免费观看影视大全| 久久久久久久久97黄色工厂| 日韩一二三区不卡| 欧美精品三级日韩久久| 在线免费观看成人短视频| a美女胸又www黄视频久久| 国产成人亚洲精品青草天美| 久久99国产精品久久| 天天影视色香欲综合网老头| 亚洲自拍另类综合| 夜夜嗨av一区二区三区四季av | 精品国产精品网麻豆系列| 91精品国产综合久久久蜜臀图片| 91社区在线播放| 91农村精品一区二区在线| 成人丝袜高跟foot| 成人毛片老司机大片| 欧洲人成人精品| 色网综合在线观看| 一本久久精品一区二区| 91亚洲资源网| 91在线视频网址| 91麻豆福利精品推荐| 91偷拍与自偷拍精品| 91色视频在线| 欧洲人成人精品| 337p亚洲精品色噜噜狠狠| 在线不卡一区二区| 精品国产一区二区在线观看| 欧美mv日韩mv国产网站app| 26uuu欧美日本| 久久婷婷色综合| 国产欧美日韩在线视频| 国产精品美女一区二区在线观看| 国产精品视频麻豆| 亚洲综合丝袜美腿| 免费观看在线色综合| 国产乱人伦精品一区二区在线观看| 精油按摩中文字幕久久| 懂色中文一区二区在线播放| 99国产精品国产精品毛片| 欧美亚洲综合在线| 日韩欧美国产1| 国产精品青草综合久久久久99| 亚洲欧美日韩国产中文在线| 亚洲国产毛片aaaaa无费看 | 日韩一级欧美一级| 国产肉丝袜一区二区| 亚洲综合色视频| 久久99精品网久久| 波多野结衣亚洲| 欧美精品色综合| 亚洲国产精品成人综合色在线婷婷| 亚洲欧美电影一区二区| 美女视频黄 久久| 成人精品免费看| 欧美性受极品xxxx喷水| 精品国产一区二区国模嫣然| 中文字幕在线不卡一区| 蜜臀a∨国产成人精品| 粉嫩蜜臀av国产精品网站| 欧美欧美欧美欧美| 国产欧美日韩在线| 婷婷丁香久久五月婷婷| 波多野结衣在线aⅴ中文字幕不卡| 欧洲激情一区二区| 国产欧美日韩另类一区| 亚洲国产美国国产综合一区二区| 国产乱人伦偷精品视频不卡| 欧美日韩你懂的| 国产精品沙发午睡系列990531| 丝袜美腿亚洲一区二区图片| 99视频在线观看一区三区| 欧美一区二区三区白人| 亚洲精品ww久久久久久p站| 精品一区二区影视| 欧美日韩久久久一区| 中文幕一区二区三区久久蜜桃| 日韩精品成人一区二区在线| 91亚洲资源网| 欧美国产精品一区| 精油按摩中文字幕久久| 欧美老肥妇做.爰bbww视频| 亚洲日本在线视频观看| 国产成人鲁色资源国产91色综| 91精品国产综合久久精品图片| 亚洲欧美日本在线| 不卡在线视频中文字幕| 久久先锋影音av鲁色资源| 人妖欧美一区二区| 欧美夫妻性生活| 国产高清无密码一区二区三区| 欧美日韩视频第一区| 一区二区在线电影| 色婷婷综合久久久中文字幕| 国产精品福利电影一区二区三区四区| 久久精品国产精品亚洲精品| 欧美精品三级日韩久久| 午夜精品久久久久久| 欧美男男青年gay1069videost | 免费在线看一区| 欧美剧情片在线观看| 一区二区成人在线| 欧美吻胸吃奶大尺度电影| 一区二区三区视频在线看| 91国偷自产一区二区开放时间|