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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? bigregister.java

?? jpeg2000編解碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
// $Id: BigRegister.java,v 1.1.1.1 2002/08/27 12:32:15 grosbois Exp $//// $Log: BigRegister.java,v $// Revision 1.1.1.1  2002/08/27 12:32:15  grosbois// Add cryptix 3.2//// Revision 1.2  1999/06/30 22:44:36  edwin// synchronized classes are evil//// Revision 1.1.1.1  1997/11/20 22:05:46  hopwood// + Moved BigRegister and TrinomialLFSR here from the cryptix.util package.//// Revision 1.1.1  1997/11/20  David Hopwood// + Renamed equals to isSameValue.// + Moved to cryptix.util.math package.//// Revision 1.1  1997/11/07 05:53:26  raif// *** empty log message ***//// Revision 0.1.3  1997/10/01 09:04:24  raif// *** empty log message ***//// Revision 0.1.1  1997/09/25  R. Naffah// + Original version.//// $Endlog$/* * Copyright (c) 1997 Systemics Ltd * on behalf of the Cryptix Development Team. All rights reserved. */package cryptix.util.math;import cryptix.util.core.ArrayUtil;import java.io.Serializable;import java.security.SecureRandom;/** * Utility class to manage a large bit-register of a given size as a * <b>mutable</b> object. * <p> * The bits are indexed from <i>0</i> (rightmost) to <i><code>size</code> * - 1</i>, (leftmost) where <code>size</code> is this register's * designated (at instantiation time) bit capacity. * <p> * <b>Copyright</b> &copy; 1995-1997 * <a href="http://www.systemics.com/">Systemics Ltd</a> on behalf of the * <a href="http://www.systemics.com/docs/cryptix/">Cryptix Development Team</a>. * <br>All rights reserved. * <p> * <b>$Revision: 1.1.1.1 $</b> * @author  Raif S. Naffah */public class BigRegisterimplements Cloneable, Serializable{// Constants and variables//.....................................................................    /** Maximum allowed number of bits in a <code>BigRegister</code> object. */    public static final int MAXIMUM_SIZE = 4096;    // Number of bits in the binary representaion of x, 0 <= x <= 127    private static final byte[] log2x = {        0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,        5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,        6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,        6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,        7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,        7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,        7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,        7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7};    // index of highest set bit in a 4-bit value    private static final byte[] high = {        0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3};    // index of lowest set bit in a 4-bit value    private static final byte[] low = {        0, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0};    private static final String[] binaryDigits = {        "0000", "0001", "0010", "0011", "0100", "0101", "0110", "0111",        "1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111"};    private static final String m_1 = "size < 2";    private static final String m_2 = "size > MAXIMUM_SIZE";    private static final SecureRandom prng = new SecureRandom();    private byte[] bits;    private int size;    private static final long serialVersionUID = 2535877383275048954L;// Constructors//.....................................................................    /**     * Instantiate a <code>BigRegister</code> of a given <code>size</code>     * with all its bits set to zeroes.     *     * @param  size  Number of meaningful bits in <code>this</code> object.     * @exception  IllegalArgumentException  If the argument is less than     *         2 or greater than the maximum allowed value.     * @see    #MAXIMUM_SIZE     */    public BigRegister (int size) {        if (size < 2) throw new IllegalArgumentException(m_1);        if (size > MAXIMUM_SIZE) throw new IllegalArgumentException(m_2);        this.size = size;        bits = new byte[(size + 7) / 8];    // multiple of 8    }    // Constructor to implement cloneability    private BigRegister (BigRegister r) {        this.size = r.size;        this.bits = (byte[]) (r.bits.clone());    }// Cloneable method implementation//...........................................................................    /** Return a reference to a duplicate of <code>this</code>. */    public synchronized Object clone() { return new BigRegister(this); }// Bit logical operators//.....................................................................    /**     * Compute <code>this &amp;= source</code>.     *     * @exception  IllegalArgumentException  If the argument is of     *     different <code>size</code> than <code>this</code>.     */    public synchronized void and (BigRegister source) {        if (size != source.size) throw new IllegalArgumentException();        for (int i = 0; i < bits.length; i++)            bits[i] &= source.bits[i];    }    /**     * Compute <code>this &amp;= ~source</code>.     *     * @exception  IllegalArgumentException  If the argument is of     *     different <code>size</code> than <code>this</code>.     */    public synchronized void andNot (BigRegister source) {        if (size != source.size) throw new IllegalArgumentException();        for (int i = 0; i < bits.length; i++)            bits[i] &= ~source.bits[i];    }    /**     * Compute <code>this |= source</code>.     *     * @exception  IllegalArgumentException  If the argument is of     *     different <code>size</code> than <code>this</code>.     */    public synchronized void or (BigRegister source) {        if (size != source.size) throw new IllegalArgumentException();        for (int i = 0; i < bits.length; i++)            bits[i] |= source.bits[i];        pad();    }    /**     * Compute <code>this = ~this</code>.     */    public synchronized void not () {        for (int i = 0; i < bits.length; i++)            bits[i] = (byte) ~bits[i];        pad();    }    /**     * Compute <code>this ^= source</code>.     *     * @exception  IllegalArgumentException  If the argument is of     *     different <code>size</code> than <code>this</code>.     */    public synchronized void xor (BigRegister source) {        if (size != source.size) throw new IllegalArgumentException();        for (int i = 0; i < bits.length; i++)            bits[i] ^= source.bits[i];        pad();    }// Shift operators//.....................................................................    /**     * Execute a left shift of <code>this BigRegister</code>'s contents     * by a given number of bit positions. If the number is negative, a     * right shift is executed.     *     * @param  n  Number of bit positions to shift by. If this value     *         is negative then a shift in the opposite direction is     *         executed.     */    public synchronized void shiftLeft (int n) {        if (n == 0) return;        if (n < 0) {            shiftRight(-n);            return;        }        if (n >= size) {            reset();            return;        }        int start = lowestSetBit();        if (start == -1) return;                // all zeroes        if (start >= size - n) {                // all 1s will disappear            reset();            return;        }        start = n / 8;        int offset = n % 8;        int length = bits.length;        byte[] result = new byte[length];        if (offset == 0)            System.arraycopy(bits, 0, result, start, length - start);        else {            int offsetBar = 8 - offset;            for (int i = start, j = 0; i < length; i++, j++)                result[i] = (byte) (                    bits[j] << offset |                    (j == 0 ? 0 : (bits[j - 1] & 0xFF) >>> offsetBar)                );        }        bits = result;        pad();    }    /**     * Execute a right shift of <code>this BigRegister</code>'s contents     * by a given number of bit positions. If the number is negative, a     * left shift is executed.     *     * @param  n  Number of bit positions to shift by. If this value     *         is negative then a shift in the opposite direction is     *         executed.     */    public synchronized void shiftRight (int n) {        if (n == 0) return;        if (n < 0) {            shiftLeft(-n);            return;        }        if (n >= size) {            reset();            return;        }        int start = highestSetBit();            // index of last bit to move        if (start < 0) return;                    // all zeroes anyway        if (start < n) {                        // all 1s will go            reset();            return;        }        start = n / 8;        int offset = n % 8;        int length = bits.length;        byte[] result = new byte[length];        if (offset == 0)            System.arraycopy(bits, start, result, 0, length - start);        else            for (int i = 0, j = start; i < length && j < length; i++, j++)                result[i] = (byte) (                    ((j == length - 1 ? 0 : bits[j + 1] << 8) | (bits[j] & 0xFF)) >>> offset                );        bits = result;        pad();    }// Rotation operators//.....................................................................    /**     * Circular left shift over the <code>size</code> of <code>this</code>     * register.     * <p>     * Effectively compute <code>this = this << n | this >> (size - n)</code>.     * <p>     * If the number of positions to rotate by is negative, then a     * right instead of left rotation is executed.     */    public synchronized void rotateLeft (int n) {        n = n % size;        if (n == 0) return;        if (n < 0)            rotateRight(-n);        else {            BigRegister same = (BigRegister) clone();            same.shiftRight(size - n);            shiftLeft(n);            or(same);        }    }    /**     * Circular right shift over the <code>size</code> of <code>this</code>     * register.     * <p>     * Effectively compute <code>this = this >> n | this << (size - n)</code>.     * <p>     * If the number of positions to rotate by is negative, then a     * left instead of right rotation is executed.     */    public synchronized void rotateRight (int n) {        n = n % size;        if (n == 0) return;        if (n < 0)            rotateLeft(-n);        else {            BigRegister same = (BigRegister) clone();            same.shiftLeft(size - n);            shiftRight(n);            or(same);        }    }    /** Invert the bit order of the current contents of <code>this</code>. */    public synchronized void invertOrder () {        byte[] result = new byte[bits.length];        for (int i = 0, j = size - 1; i < size; i++, j--)            if (testBit(i)) result[j / 8] |= 1 << (j % 8);        bits = result;    }// Test and comparison operators//.....................................................................    /**     * Return true if the designated bit is set or false otherwise.     *     * @param  n  Index of the bit to test.     * @return true if the designated bit is set or false otherwise.     */    public synchronized boolean testBit (int n) {        if (n < 0 || n > size) throw new IllegalArgumentException();        return (bits[n / 8] & (1 << (n % 8))) != 0;    }    /**     * Return true if the parameters of the BigRegister <i>x</i>     * (<code>size</code> and <code>bits</code>) are equal to this one;     * false otherwise.     * <p>     * NOTE: the <code>equals</code> method is not used, because this is     * a mutable object (see the requirements for equals in the Java Language     * Spec).     *     * @param  x  BigRegister to test for equality.     * @return true iff x has equal <code>size</code> and contents.     */    public synchronized boolean isSameValue (BigRegister x) {        if (x.size != size) return false;        return ArrayUtil.areEqual(bits, x.bits);    }    /**     * Compare <code>this BigRegister</code>'s contents to that of the

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久99久久精品国产片果冻| 精品国产sm最大网站| 欧美久久久一区| 国产亚洲一区字幕| 亚洲成人动漫精品| 99久久精品国产网站| 久久亚洲二区三区| 亚洲午夜精品网| 成人av资源站| 久久久www成人免费无遮挡大片| 亚洲午夜久久久久久久久电影院 | 国产在线看一区| 在线免费观看日本欧美| 国产精品三级视频| 国模无码大尺度一区二区三区| 欧美亚洲精品一区| 亚洲精品视频观看| 91碰在线视频| 1000精品久久久久久久久| 国产一区二区三区四区在线观看| 欧美日韩国产一级| 亚洲大片在线观看| 欧美视频日韩视频| 一区二区三区加勒比av| 91在线观看成人| 国产精品国产三级国产专播品爱网 | 精品国产sm最大网站免费看| 日韩激情视频网站| 在线播放日韩导航| 激情伊人五月天久久综合| 欧美日韩成人在线一区| 亚洲国产精品久久久男人的天堂| 色婷婷激情综合| 亚洲一区二区视频在线观看| 色94色欧美sute亚洲13| 一片黄亚洲嫩模| 欧美偷拍一区二区| 偷偷要91色婷婷| 欧美一级精品大片| 国内精品视频666| 久久精品人人做人人综合 | 国产精品色哟哟网站| bt欧美亚洲午夜电影天堂| 国产精品久久精品日日| 9久草视频在线视频精品| 国产精品国产三级国产三级人妇| 波多野结衣在线aⅴ中文字幕不卡| 国产日韩欧美a| 91视频国产观看| 亚洲电影欧美电影有声小说| 日韩欧美一区二区在线视频| 黄色日韩三级电影| 国产精品久久久久久亚洲伦| 91成人网在线| 另类小说一区二区三区| 国产人成亚洲第一网站在线播放 | 亚洲高清免费视频| 日韩一区二区免费电影| 狠狠狠色丁香婷婷综合久久五月| 亚洲国产高清在线| 欧美日韩视频在线观看一区二区三区| 日韩激情在线观看| 日本一区二区综合亚洲| 欧美优质美女网站| 国产一区二区三区免费在线观看| 成人免费在线视频| 欧美裸体一区二区三区| 国产高清不卡一区| 亚洲综合色区另类av| 久久亚洲一区二区三区四区| 91麻豆国产福利在线观看| 捆绑紧缚一区二区三区视频| 国产精品成人在线观看| 欧美成人在线直播| 一本色道**综合亚洲精品蜜桃冫| 蜜臀av一区二区在线免费观看| 国产精品私人影院| 欧美一区二区三区小说| 成人av资源在线观看| 日本va欧美va精品| 亚洲精品国产成人久久av盗摄| 精品少妇一区二区三区日产乱码| 97久久超碰精品国产| 国产中文一区二区三区| 亚洲香蕉伊在人在线观| 亚洲国产岛国毛片在线| 欧美电影精品一区二区| 91国偷自产一区二区开放时间| 国产精品一区二区x88av| 亚洲成av人片在www色猫咪| 国产精品免费免费| 久久视频一区二区| 欧美一区三区四区| 欧美性视频一区二区三区| 国产成人午夜片在线观看高清观看| 午夜国产不卡在线观看视频| 国产精品久久久久久久浪潮网站 | 在线免费亚洲电影| 成人app软件下载大全免费| 精东粉嫩av免费一区二区三区| 亚洲国产视频直播| 亚洲色欲色欲www| 中文字幕中文字幕一区二区| 精品电影一区二区| 日韩女优av电影| 欧美一区二区三区四区在线观看 | 国产呦萝稀缺另类资源| 青草av.久久免费一区| 午夜久久久久久久久| 亚洲高清久久久| 亚洲一区视频在线| 亚洲综合色在线| 一区二区三区四区在线播放 | 精品久久久久久综合日本欧美 | 亚洲精品国产a久久久久久| 中文字幕一区二区三区精华液| 中文字幕精品一区二区精品绿巨人| 久久久久久久久一| 久久久久99精品一区| 久久精品亚洲精品国产欧美| www国产亚洲精品久久麻豆| www久久久久| 久久久国产精品不卡| 国产精品欧美久久久久无广告 | 亚洲欧美另类小说| 亚洲男人天堂av网| 亚洲一区二区成人在线观看| 亚洲二区视频在线| 日韩黄色在线观看| 极品美女销魂一区二区三区 | 国产欧美中文在线| 国产色91在线| 自拍偷在线精品自拍偷无码专区| 亚洲视频你懂的| 亚洲va中文字幕| 久草在线在线精品观看| 国产不卡视频一区二区三区| 91亚洲资源网| 欧美日韩国产a| 2020国产成人综合网| 国产欧美日韩精品一区| 亚洲人成人一区二区在线观看 | 美女脱光内衣内裤视频久久网站| 午夜精品一区二区三区免费视频| 日韩国产高清在线| 久久成人免费网| 成人丝袜18视频在线观看| av成人老司机| 69久久夜色精品国产69蝌蚪网| 欧美tickle裸体挠脚心vk| 国产精品高潮久久久久无| 午夜精品久久久久久不卡8050| 美国三级日本三级久久99| 不卡的看片网站| 日韩午夜三级在线| 欧美激情在线一区二区| 亚洲国产成人av网| 国产福利一区二区三区在线视频| 在线观看一区二区视频| 精品盗摄一区二区三区| 亚洲精品久久嫩草网站秘色| 美腿丝袜在线亚洲一区 | 日韩一区二区三区观看| 国产精品久久三| 免费国产亚洲视频| 91蜜桃在线免费视频| 精品日韩欧美一区二区| 一区二区在线看| 成人一级黄色片| 欧美精品 日韩| 亚洲免费观看高清完整版在线| 精品亚洲成a人| 欧美群妇大交群中文字幕| 欧美国产精品久久| 麻豆精品一区二区| 欧美中文字幕久久| 国产精品久久久久久久久搜平片| 美女性感视频久久| 在线观看免费亚洲| 亚洲欧洲日本在线| 欧美日韩情趣电影| 国产精品福利一区| 丁香啪啪综合成人亚洲小说 | 色综合视频一区二区三区高清| 久久综合色8888| 美国欧美日韩国产在线播放| 色天使色偷偷av一区二区| 国产精品乱人伦| 国产成人亚洲综合a∨猫咪| 亚洲精品在线免费观看视频| 日韩av一级片| 91.成人天堂一区| 亚洲超碰97人人做人人爱| 91猫先生在线| 亚洲视频一区二区免费在线观看| 成人一级片网址| 欧美激情一二三区| 成人小视频免费在线观看| 欧美激情一区三区| 成人一区二区三区视频在线观看|