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

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

?? mutablebiginteger.java

?? java源代碼 請(qǐng)看看啊 提點(diǎn)寶貴的意見
?? JAVA
?? 第 1 頁 / 共 3 頁
字號(hào):
/* * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. *//* * @(#)MutableBigInteger.java	1.9 03/01/23 */package java.math;/** * A class used to represent multiprecision integers that makes efficient * use of allocated space by allowing a number to occupy only part of * an array so that the arrays do not have to be reallocated as often. * When performing an operation with many iterations the array used to * hold a number is only reallocated when necessary and does not have to * be the same size as the number it represents. A mutable number allows * calculations to occur on the same number without having to create * a new number for every step of the calculation as occurs with * BigIntegers. * * @see     BigInteger * @version 1.9, 01/23/03 * @author  Michael McCloskey * @since   1.3 */class MutableBigInteger {    /**     * Holds the magnitude of this MutableBigInteger in big endian order.     * The magnitude may start at an offset into the value array, and it may     * end before the length of the value array.     */    int[] value;    /**     * The number of ints of the value array that are currently used     * to hold the magnitude of this MutableBigInteger. The magnitude starts     * at an offset and offset + intLen may be less than value.length.     */    int intLen;    /**     * The offset into the value array where the magnitude of this     * MutableBigInteger begins.     */    int offset = 0;    /**     * This mask is used to obtain the value of an int as if it were unsigned.     */    private final static long LONG_MASK = 0xffffffffL;    // Constructors    /**     * The default constructor. An empty MutableBigInteger is created with     * a one word capacity.     */    MutableBigInteger() {        value = new int[1];        intLen = 0;    }    /**     * Construct a new MutableBigInteger with a magnitude specified by     * the int val.     */    MutableBigInteger(int val) {        value = new int[1];        intLen = 1;        value[0] = val;    }    /**     * Construct a new MutableBigInteger with the specified value array     * up to the specified length.     */    MutableBigInteger(int[] val, int len) {        value = val;        intLen = len;    }    /**     * Construct a new MutableBigInteger with the specified value array     * up to the length of the array supplied.     */    MutableBigInteger(int[] val) {        value = val;        intLen = val.length;    }    /**     * Construct a new MutableBigInteger with a magnitude equal to the     * specified BigInteger.     */    MutableBigInteger(BigInteger b) {        value = (int[]) b.mag.clone();        intLen = value.length;    }    /**     * Construct a new MutableBigInteger with a magnitude equal to the     * specified MutableBigInteger.     */    MutableBigInteger(MutableBigInteger val) {        intLen = val.intLen;        value = new int[intLen];        for(int i=0; i<intLen; i++)            value[i] = val.value[val.offset+i];    }    /**     * Clear out a MutableBigInteger for reuse.     */    void clear() {        offset = intLen = 0;        for (int index=0, n=value.length; index < n; index++)            value[index] = 0;    }    /**     * Set a MutableBigInteger to zero, removing its offset.     */    void reset() {        offset = intLen = 0;    }    /**     * Compare the magnitude of two MutableBigIntegers. Returns -1, 0 or 1     * as this MutableBigInteger is numerically less than, equal to, or     * greater than <tt>b</tt>.      */    final int compare(MutableBigInteger b) {        if (intLen < b.intLen)            return -1;        if (intLen > b.intLen)            return 1;        for (int i=0; i<intLen; i++) {            int b1 = value[offset+i]     + 0x80000000;            int b2 = b.value[b.offset+i] + 0x80000000;            if (b1 < b2)                return -1;            if (b1 > b2)                return 1;        }        return 0;    }    /**     * Return the index of the lowest set bit in this MutableBigInteger. If the     * magnitude of this MutableBigInteger is zero, -1 is returned.     */    private final int getLowestSetBit() {        if (intLen == 0)            return -1;        int j, b;        for (j=intLen-1; (j>0) && (value[j+offset]==0); j--)            ;        b = value[j+offset];        if (b==0)             return -1;        return ((intLen-1-j)<<5) + BigInteger.trailingZeroCnt(b);    }    /**     * Return the int in use in this MutableBigInteger at the specified     * index. This method is not used because it is not inlined on all     * platforms.     */    private final int getInt(int index) {        return value[offset+index];    }    /**     * Return a long which is equal to the unsigned value of the int in     * use in this MutableBigInteger at the specified index. This method is     * not used because it is not inlined on all platforms.     */    private final long getLong(int index) {        return value[offset+index] & LONG_MASK;    }    /**     * Ensure that the MutableBigInteger is in normal form, specifically     * making sure that there are no leading zeros, and that if the     * magnitude is zero, then intLen is zero.     */    final void normalize() {        if (intLen == 0) {            offset = 0;            return;        }        int index = offset;        if (value[index] != 0)            return;        int indexBound = index+intLen;        do {            index++;        } while(index < indexBound && value[index]==0);        int numZeros = index - offset;        intLen -= numZeros;        offset = (intLen==0 ?  0 : offset+numZeros);    }    /**     * If this MutableBigInteger cannot hold len words, increase the size     * of the value array to len words.     */    private final void ensureCapacity(int len) {        if (value.length < len) {            value = new int[len];            offset = 0;            intLen = len;        }    }    /**     * Convert this MutableBigInteger into an int array with no leading     * zeros, of a length that is equal to this MutableBigInteger's intLen.     */    int[] toIntArray() {        int[] result = new int[intLen];        for(int i=0; i<intLen; i++)            result[i] = value[offset+i];        return result;    }    /**     * Sets the int at index+offset in this MutableBigInteger to val.     * This does not get inlined on all platforms so it is not used     * as often as originally intended.     */    void setInt(int index, int val) {        value[offset + index] = val;    }    /**     * Sets this MutableBigInteger's value array to the specified array.     * The intLen is set to the specified length.     */    void setValue(int[] val, int length) {        value = val;        intLen = length;        offset = 0;    }    /**     * Sets this MutableBigInteger's value array to a copy of the specified     * array. The intLen is set to the length of the new array.     */    void copyValue(MutableBigInteger val) {        int len = val.intLen;        if (value.length < len)            value = new int[len];        for(int i=0; i<len; i++)            value[i] = val.value[val.offset+i];        intLen = len;        offset = 0;    }    /**     * Sets this MutableBigInteger's value array to a copy of the specified     * array. The intLen is set to the length of the specified array.     */    void copyValue(int[] val) {        int len = val.length;        if (value.length < len)            value = new int[len];        for(int i=0; i<len; i++)            value[i] = val[i];        intLen = len;        offset = 0;    }    /**     * Returns true iff this MutableBigInteger has a value of one.     */    boolean isOne() {        return (intLen == 1) && (value[offset] == 1);    }    /**     * Returns true iff this MutableBigInteger has a value of zero.     */    boolean isZero() {        return (intLen == 0);    }    /**     * Returns true iff this MutableBigInteger is even.     */    boolean isEven() {        return (intLen == 0) || ((value[offset + intLen - 1] & 1) == 0);    }    /**     * Returns true iff this MutableBigInteger is odd.     */    boolean isOdd() {        return ((value[offset + intLen - 1] & 1) == 1);    }    /**     * Returns true iff this MutableBigInteger is in normal form. A     * MutableBigInteger is in normal form if it has no leading zeros     * after the offset, and intLen + offset <= value.length.     */    boolean isNormal() {        if (intLen + offset > value.length)            return false;        if (intLen ==0)            return true;        return (value[offset] != 0);    }    /**     * Returns a String representation of this MutableBigInteger in radix 10.     */    public String toString() {        BigInteger b = new BigInteger(this, 1);        return b.toString();    }    /**     * Right shift this MutableBigInteger n bits. The MutableBigInteger is left     * in normal form.     */    void rightShift(int n) {        if (intLen == 0)            return;        int nInts = n >>> 5;        int nBits = n & 0x1F;        this.intLen -= nInts;        if (nBits == 0)            return;        int bitsInHighWord = BigInteger.bitLen(value[offset]);        if (nBits >= bitsInHighWord) {            this.primitiveLeftShift(32 - nBits);            this.intLen--;        } else {            primitiveRightShift(nBits);        }    }    /**     * Left shift this MutableBigInteger n bits.      */    void leftShift(int n) {        /*         * If there is enough storage space in this MutableBigInteger already         * the available space will be used. Space to the right of the used         * ints in the value array is faster to utilize, so the extra space         * will be taken from the right if possible.         */        if (intLen == 0)           return;        int nInts = n >>> 5;        int nBits = n&0x1F;        int bitsInHighWord = BigInteger.bitLen(value[offset]);                // If shift can be done without moving words, do so        if (n <= (32-bitsInHighWord)) {            primitiveLeftShift(nBits);            return;        }        int newLen = intLen + nInts +1;        if (nBits <= (32-bitsInHighWord))            newLen--;        if (value.length < newLen) {            // The array must grow            int[] result = new int[newLen];            for (int i=0; i<intLen; i++)                result[i] = value[offset+i];            setValue(result, newLen);        } else if (value.length - offset >= newLen) {            // Use space on right            for(int i=0; i<newLen - intLen; i++)                value[offset+intLen+i] = 0;        } else {            // Must use space on left            for (int i=0; i<intLen; i++)                value[i] = value[offset+i];            for (int i=intLen; i<newLen; i++)                value[i] = 0;            offset = 0;        }        intLen = newLen;        if (nBits == 0)            return;        if (nBits <= (32-bitsInHighWord))            primitiveLeftShift(nBits);        else            primitiveRightShift(32 -nBits);    }    /**     * A primitive used for division. This method adds in one multiple of the     * divisor a back to the dividend result at a specified offset. It is used     * when qhat was estimated too large, and must be adjusted.     */    private int divadd(int[] a, int[] result, int offset) {        long carry = 0;        for (int j=a.length-1; j >= 0; j--) {            long sum = (a[j] & LONG_MASK) +                        (result[j+offset] & LONG_MASK) + carry;            result[j+offset] = (int)sum;            carry = sum >>> 32;        }        return (int)carry;    }    /**     * This method is used for division. It multiplies an n word input a by one     * word input x, and subtracts the n word product from q. This is needed     * when subtracting qhat*divisor from dividend.     */    private int mulsub(int[] q, int[] a, int x, int len, int offset) {        long xLong = x & LONG_MASK;        long carry = 0;        offset += len;        for (int j=len-1; j >= 0; j--) {            long product = (a[j] & LONG_MASK) * xLong + carry;            long difference = q[offset] - product;            q[offset--] = (int)difference;            carry = (product >>> 32)                     + (((difference & LONG_MASK) >                         (((~(int)product) & LONG_MASK))) ? 1:0);        }        return (int)carry;    }    /**     * Right shift this MutableBigInteger n bits, where n is     * less than 32.     * Assumes that intLen > 0, n > 0 for speed     */    private final void primitiveRightShift(int n) {        int[] val = value;        int n2 = 32 - n;        for (int i=offset+intLen-1, c=val[i]; i>offset; i--) {            int b = c;            c = val[i-1];

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本va欧美va精品| 亚洲成av人综合在线观看| 欧美日韩一级片在线观看| 国内精品第一页| 亚洲蜜臀av乱码久久精品| 亚洲最大的成人av| 久久综合视频网| 欧美中文字幕久久| 成人福利视频在线| 国内国产精品久久| 蜜臀久久99精品久久久久久9| 国产精品久久久久久久第一福利 | 日韩有码一区二区三区| 欧美国产国产综合| 日韩小视频在线观看专区| 91久久线看在观草草青青| 国产91丝袜在线播放0| 免播放器亚洲一区| 丝袜美腿一区二区三区| 一区二区三区在线观看视频| 中文乱码免费一区二区| 久久综合狠狠综合| 日韩精品最新网址| 91精品国产全国免费观看| 在线视频中文字幕一区二区| 97精品超碰一区二区三区| 日韩视频永久免费| 欧美一区二区黄色| 欧美精品一卡二卡| 欧美日韩一区二区三区在线| 91蜜桃网址入口| 99精品视频在线免费观看| 成人av动漫网站| 成人免费高清在线观看| 成人自拍视频在线| 成人av电影在线播放| 不卡的av网站| 91麻豆视频网站| 色悠久久久久综合欧美99| 色综合久久天天| 日本道色综合久久| 欧洲一区二区三区免费视频| 在线视频欧美精品| 欧美日韩黄色一区二区| 欧美久久久久中文字幕| 3atv在线一区二区三区| 日韩一区二区电影网| 欧美一区二区三区喷汁尤物| 日韩欧美一区中文| 精品国内片67194| 欧美mv日韩mv国产网站| 久久久影视传媒| 亚洲国产精品av| 亚洲天堂精品在线观看| 亚洲一区自拍偷拍| 日韩va亚洲va欧美va久久| 美女视频一区二区| 国产aⅴ综合色| 国产.欧美.日韩| 一本色道**综合亚洲精品蜜桃冫| 在线一区二区三区| 欧美精品123区| wwwwww.欧美系列| 国产精品蜜臀在线观看| 亚洲一二三四久久| 久久精品国产**网站演员| 国产一区二区在线看| 成人精品视频一区| 色94色欧美sute亚洲线路一ni| 欧美色网一区二区| 精品对白一区国产伦| 欧美国产日本视频| 亚洲gay无套男同| 欧美电影一区二区| 精品成人私密视频| 日韩一区欧美小说| 蜜臀久久99精品久久久画质超高清| 精东粉嫩av免费一区二区三区| 成人动漫精品一区二区| 欧美女孩性生活视频| 精品日韩一区二区三区| 亚洲欧洲中文日韩久久av乱码| 婷婷丁香激情综合| 成人污视频在线观看| 欧美日韩免费视频| 欧美激情综合网| 丝袜美腿一区二区三区| 高清成人免费视频| 欧美卡1卡2卡| 亚洲欧美综合另类在线卡通| 奇米影视一区二区三区| 91视视频在线观看入口直接观看www | 国产在线一区二区| 欧美综合色免费| 久久美女艺术照精彩视频福利播放 | 精品国产一区二区三区久久影院| 国产精品视频在线看| 午夜精品影院在线观看| caoporn国产精品| 精品日韩av一区二区| 久久久久久久综合日本| 亚洲三级免费观看| 国产大陆亚洲精品国产| 欧美日韩一卡二卡| 亚洲天堂久久久久久久| 国产伦精品一区二区三区免费迷| 欧美亚洲免费在线一区| 国产精品久线在线观看| 久久国产人妖系列| 欧美日韩视频第一区| 亚洲精品中文字幕乱码三区| 国产精品自拍在线| 欧美成人aa大片| 亚洲国产一区二区三区青草影视| 成人福利视频在线| 国产亚洲精品aa午夜观看| 美女性感视频久久| 欧美日韩国产一区| 亚洲线精品一区二区三区八戒| 91在线视频观看| 欧美激情一区三区| 精品亚洲成a人在线观看| 国产精品久久久久永久免费观看 | 欧美做爰猛烈大尺度电影无法无天| 国产亚洲欧美色| 精品一区二区三区在线播放| 欧美三日本三级三级在线播放| 亚洲视频在线一区二区| 成人av网站在线观看| 国产精品女人毛片| 成人自拍视频在线| 中文字幕在线不卡一区二区三区| 国产成+人+日韩+欧美+亚洲| 2020国产精品久久精品美国| 激情综合色综合久久| 欧美成人乱码一区二区三区| 麻豆精品国产91久久久久久| 在线播放亚洲一区| 蜜桃视频免费观看一区| 日韩午夜在线影院| 极品少妇xxxx精品少妇偷拍| 欧美一级搡bbbb搡bbbb| 蜜桃一区二区三区在线观看| 日韩欧美亚洲国产另类| 精品亚洲成a人在线观看| 久久新电视剧免费观看| 国产成人精品免费在线| 中文子幕无线码一区tr| 色伊人久久综合中文字幕| 日本91福利区| 国产精品一区二区果冻传媒| 精品久久久网站| 成人午夜视频网站| 亚洲免费在线播放| 7777精品伊人久久久大香线蕉| 美女看a上一区| 久久这里只精品最新地址| 成人精品视频.| 亚洲国产中文字幕| 日韩欧美国产午夜精品| 粉嫩一区二区三区性色av| 亚洲精品久久嫩草网站秘色| 欧美日韩国产高清一区二区 | 国产三级欧美三级| 99麻豆久久久国产精品免费| 亚洲最大成人网4388xx| 日韩欧美一区二区久久婷婷| 成人性生交大片免费看视频在线 | 亚洲va韩国va欧美va精品| 欧美一级高清大全免费观看| 国产很黄免费观看久久| 亚洲欧美成aⅴ人在线观看 | 日韩视频国产视频| 成人小视频免费观看| 亚洲电影视频在线| 2019国产精品| 欧美色爱综合网| 国产99精品国产| 天天av天天翘天天综合网色鬼国产| 欧美va亚洲va香蕉在线| 99久久综合国产精品| 亚洲伊人伊色伊影伊综合网| 久久久久国产精品麻豆ai换脸| 日本乱人伦一区| 国产一区二区毛片| 午夜精品久久久久久久久| 国产亚洲一二三区| 欧美日韩国产首页在线观看| 国产成人无遮挡在线视频| 午夜视频一区二区三区| 国产精品免费看片| 日韩小视频在线观看专区| 色成人在线视频| 成人在线综合网站| 精品一区二区免费看| 亚洲成人免费视频| 亚洲视频在线观看三级| 久久久夜色精品亚洲| 337p亚洲精品色噜噜| 色丁香久综合在线久综合在线观看|