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

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

?? treemap.java

?? linux下的gcc編譯器
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
    int overflow = count - rowsize;    Node parent = row;    int i;    for (i = 0; i < overflow; i += 2)      {        Node left = new Node(null, null, RED);        Node right = new Node(null, null, RED);        left.parent = parent;        right.parent = parent;        parent.left = left;        Node next = parent.right;        parent.right = right;        parent = next;      }    // Add a lone left node if necessary.    if (i - overflow == 0)      {        Node left = new Node(null, null, RED);        left.parent = parent;        parent.left = left;        parent = parent.right;        left.parent.right = nil;      }    // Unlink the remaining nodes of the previous row.    while (parent != nil)      {        Node next = parent.right;        parent.right = nil;        parent = next;      }  }  /**   * Returns the first sorted node in the map, or nil if empty. Package   * visible for use by nested classes.   *   * @return the first node   */  final Node firstNode()  {    // Exploit fact that nil.left == nil.    Node node = root;    while (node.left != nil)      node = node.left;    return node;  }  /**   * Return the TreeMap.Node associated with key, or the nil node if no such   * node exists in the tree. Package visible for use by nested classes.   *   * @param key the key to search for   * @return the node where the key is found, or nil   */  final Node getNode(Object key)  {    Node current = root;    while (current != nil)      {        int comparison = compare(key, current.key);        if (comparison > 0)          current = current.right;        else if (comparison < 0)          current = current.left;        else          return current;      }    return current;  }  /**   * Find the "highest" node which is &lt; key. If key is nil, return last   * node. Package visible for use by nested classes.   *   * @param key the upper bound, exclusive   * @return the previous node   */  final Node highestLessThan(Object key)  {    if (key == nil)      return lastNode();    Node last = nil;    Node current = root;    int comparison = 0;    while (current != nil)      {        last = current;        comparison = compare(key, current.key);        if (comparison > 0)          current = current.right;        else if (comparison < 0)          current = current.left;        else // Exact match.          return predecessor(last);      }    return comparison <= 0 ? predecessor(last) : last;  }  /**   * Maintain red-black balance after inserting a new node.   *   * @param n the newly inserted node   */  private void insertFixup(Node n)  {    // Only need to rebalance when parent is a RED node, and while at least    // 2 levels deep into the tree (ie: node has a grandparent). Remember    // that nil.color == BLACK.    while (n.parent.color == RED && n.parent.parent != nil)      {        if (n.parent == n.parent.parent.left)          {            Node uncle = n.parent.parent.right;            // Uncle may be nil, in which case it is BLACK.            if (uncle.color == RED)              {                // Case 1. Uncle is RED: Change colors of parent, uncle,                // and grandparent, and move n to grandparent.                n.parent.color = BLACK;                uncle.color = BLACK;                uncle.parent.color = RED;                n = uncle.parent;              }            else              {                if (n == n.parent.right)                  {                    // Case 2. Uncle is BLACK and x is right child.                    // Move n to parent, and rotate n left.                    n = n.parent;                    rotateLeft(n);                  }                // Case 3. Uncle is BLACK and x is left child.                // Recolor parent, grandparent, and rotate grandparent right.                n.parent.color = BLACK;                n.parent.parent.color = RED;                rotateRight(n.parent.parent);              }          }        else          {            // Mirror image of above code.            Node uncle = n.parent.parent.left;            // Uncle may be nil, in which case it is BLACK.            if (uncle.color == RED)              {                // Case 1. Uncle is RED: Change colors of parent, uncle,                // and grandparent, and move n to grandparent.                n.parent.color = BLACK;                uncle.color = BLACK;                uncle.parent.color = RED;                n = uncle.parent;              }            else              {                if (n == n.parent.left)                {                    // Case 2. Uncle is BLACK and x is left child.                    // Move n to parent, and rotate n right.                    n = n.parent;                    rotateRight(n);                  }                // Case 3. Uncle is BLACK and x is right child.                // Recolor parent, grandparent, and rotate grandparent left.                n.parent.color = BLACK;                n.parent.parent.color = RED;                rotateLeft(n.parent.parent);              }          }      }    root.color = BLACK;  }  /**   * Returns the last sorted node in the map, or nil if empty.   *   * @return the last node   */  private Node lastNode()  {    // Exploit fact that nil.right == nil.    Node node = root;    while (node.right != nil)      node = node.right;    return node;  }  /**   * Find the "lowest" node which is &gt;= key. If key is nil, return either   * nil or the first node, depending on the parameter first.   * Package visible for use by nested classes.   *   * @param key the lower bound, inclusive   * @param first true to return the first element instead of nil for nil key   * @return the next node   */  final Node lowestGreaterThan(Object key, boolean first)  {    if (key == nil)      return first ? firstNode() : nil;    Node last = nil;    Node current = root;    int comparison = 0;    while (current != nil)      {        last = current;        comparison = compare(key, current.key);        if (comparison > 0)          current = current.right;        else if (comparison < 0)          current = current.left;        else          return current;      }    return comparison > 0 ? successor(last) : last;  }  /**   * Return the node preceding the given one, or nil if there isn't one.   *   * @param node the current node, not nil   * @return the prior node in sorted order   */  private Node predecessor(Node node)  {    if (node.left != nil)      {        node = node.left;        while (node.right != nil)          node = node.right;        return node;      }    Node parent = node.parent;    // Exploit fact that nil.left == nil and node is non-nil.    while (node == parent.left)      {        node = parent;        parent = node.parent;      }    return parent;  }  /**   * Construct a tree from sorted keys in linear time. Package visible for   * use by TreeSet.   *   * @param s the stream to read from   * @param count the number of keys to read   * @param readValue true to read values, false to insert "" as the value   * @throws ClassNotFoundException if the underlying stream fails   * @throws IOException if the underlying stream fails   * @see #readObject(ObjectInputStream)   * @see TreeSet#readObject(ObjectInputStream)   */  final void putFromObjStream(ObjectInputStream s, int count,                              boolean readValues)    throws IOException, ClassNotFoundException  {    fabricateTree(count);    Node node = firstNode();    while (--count >= 0)      {        node.key = s.readObject();        node.value = readValues ? s.readObject() : "";        node = successor(node);      }  }  /**   * Construct a tree from sorted keys in linear time, with values of "".   * Package visible for use by TreeSet.   *   * @param keys the iterator over the sorted keys   * @param count the number of nodes to insert   * @see TreeSet#TreeSet(SortedSet)   */  final void putKeysLinear(Iterator keys, int count)  {    fabricateTree(count);    Node node = firstNode();    while (--count >= 0)      {        node.key = keys.next();        node.value = "";        node = successor(node);      }  }  /**   * Deserializes this object from the given stream.   *   * @param s the stream to read from   * @throws ClassNotFoundException if the underlying stream fails   * @throws IOException if the underlying stream fails   * @serialData the <i>size</i> (int), followed by key (Object) and value   *             (Object) pairs in sorted order   */  private void readObject(ObjectInputStream s)    throws IOException, ClassNotFoundException  {    s.defaultReadObject();    int size = s.readInt();    putFromObjStream(s, size, true);  }  /**   * Remove node from tree. This will increment modCount and decrement size.   * Node must exist in the tree. Package visible for use by nested classes.   *   * @param node the node to remove   */  final void removeNode(Node node)  {    Node splice;    Node child;    modCount++;    size--;    // Find splice, the node at the position to actually remove from the tree.    if (node.left == nil)      {        // Node to be deleted has 0 or 1 children.        splice = node;        child = node.right;      }    else if (node.right == nil)      {        // Node to be deleted has 1 child.        splice = node;        child = node.left;      }    else      {        // Node has 2 children. Splice is node's predecessor, and we swap        // its contents into node.        splice = node.left;        while (splice.right != nil)          splice = splice.right;        child = splice.left;        node.key = splice.key;        node.value = splice.value;      }    // Unlink splice from the tree.    Node parent = splice.parent;    if (child != nil)      child.parent = parent;    if (parent == nil)      {        // Special case for 0 or 1 node remaining.        root = child;        return;      }    if (splice == parent.left)      parent.left = child;    else      parent.right = child;    if (splice.color == BLACK)      deleteFixup(child, parent);  }  /**   * Rotate node n to the left.   *   * @param node the node to rotate   */  private void rotateLeft(Node node)  {    Node child = node.right;    // if (node == nil || child == nil)    //   throw new InternalError();    // Establish node.right link.    node.right = child.left;    if (child.left != nil)      child.left.parent = node;    // Establish child->parent link.    child.parent = node.parent;    if (node.parent != nil)      {        if (node == node.parent.left)          node.parent.left = child;        else          node.parent.right = child;      }    else      root = child;    // Link n and child.    child.left = node;    node.parent = child;  }  /**   * Rotate node n to the right.   *   * @param node the node to rotate   */  private void rotateRight(Node node)  {    Node child = node.left;    // if (node == nil || child == nil)    //   throw new InternalError();    // Establish node.left link.    node.left = child.right;    if (child.right != nil)      child.right.parent = node;    // Establish child->parent link.    child.parent = node.parent;    if (node.parent != nil)      {        if (node == node.parent.right)          node.parent.right = child;        else          node.parent.left = child;      }    else      root = child;    // Link n and child.    child.right = node;    node.parent = child;  }  /**   * Return the node following the given one, or nil if there isn't one.   * Package visible for use by nested classes.   *   * @param node the current node, not nil   * @return the next node in sorted order   */  final Node successor(Node node)  {

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品写真视频在线观看| 理论片日本一区| 91精品国产一区二区| 国产成人精品综合在线观看 | 韩国一区二区三区| 一区二区三区在线高清| 精品国产成人在线影院| 色狠狠桃花综合| 国产成人免费视频网站| 青青草原综合久久大伊人精品 | 欧美亚洲一区三区| 丁香啪啪综合成人亚洲小说| 天天做天天摸天天爽国产一区| 国产精品女主播在线观看| 日韩欧美一区二区视频| 日韩一级片网址| 日韩视频在线你懂得| 在线亚洲+欧美+日本专区| 风流少妇一区二区| 精品一区二区三区的国产在线播放| 一区二区三区影院| 1区2区3区国产精品| 国产午夜亚洲精品不卡| 日韩一区二区视频| 欧美裸体bbwbbwbbw| 欧洲亚洲国产日韩| 色婷婷久久久久swag精品| 国产成人综合视频| 国产黄色精品网站| 国产一区二区美女诱惑| 精品制服美女久久| 精品一区二区三区视频在线观看 | 亚洲免费成人av| 国产精品久久久久三级| 国产女主播视频一区二区| 欧美一区二区三区日韩视频| 欧美日韩一区二区三区在线看| 色拍拍在线精品视频8848| 99久久国产综合精品女不卡| 99国产欧美另类久久久精品| 成人av在线资源网站| 成人午夜激情片| 99久久伊人网影院| 91麻豆国产福利在线观看| 色悠悠久久综合| 色综合久久中文字幕| 一本到三区不卡视频| 91福利视频网站| 欧美日韩三级视频| 欧美精品成人一区二区三区四区| 欧美精品一卡二卡| 日韩免费看的电影| 国产亚洲欧洲997久久综合| 欧美高清在线一区| 亚洲美女一区二区三区| 亚洲第一会所有码转帖| 奇米精品一区二区三区四区| 久久精品72免费观看| 国产高清成人在线| 97久久精品人人澡人人爽| 欧美午夜精品久久久| 91精品婷婷国产综合久久| 精品国产免费久久| 国产精品无遮挡| 亚洲妇熟xx妇色黄| 激情综合色综合久久综合| 国产99久久久国产精品潘金| 91在线精品秘密一区二区| 精品婷婷伊人一区三区三| 精品少妇一区二区三区| 国产精品美女www爽爽爽| 一区二区三区在线视频免费观看| 婷婷夜色潮精品综合在线| 韩日精品视频一区| 91蝌蚪国产九色| 日韩精品最新网址| 亚洲欧洲精品天堂一级| 丝袜诱惑制服诱惑色一区在线观看 | 色呦呦国产精品| 欧美高清www午色夜在线视频| www久久精品| 亚洲综合在线免费观看| 精品一区二区三区香蕉蜜桃| 一本大道久久a久久综合| 欧美一卡2卡三卡4卡5免费| 国产女同互慰高潮91漫画| 亚洲aⅴ怡春院| 成人中文字幕在线| 91精品国产入口| 国产精品久久毛片av大全日韩| 天堂午夜影视日韩欧美一区二区| 国产成人精品1024| 欧美一区二区网站| 综合久久久久久久| 国产在线视频不卡二| 欧洲一区二区三区在线| 久久精品亚洲精品国产欧美kt∨| 尤物在线观看一区| 夫妻av一区二区| 精品人在线二区三区| 亚洲一区二区三区视频在线播放| 国产河南妇女毛片精品久久久| 7777精品伊人久久久大香线蕉| 国产精品久久久久9999吃药| 久久精品理论片| 日本道免费精品一区二区三区| 国产亚洲精品久| 伦理电影国产精品| 欧美日韩在线播放一区| 亚洲天堂2014| 成人丝袜18视频在线观看| 日韩美一区二区三区| 午夜精品视频在线观看| 色婷婷国产精品| 中文字幕一区二区日韩精品绯色| 国产乱码一区二区三区| 日韩亚洲欧美高清| 日韩国产精品久久久久久亚洲| 日本高清视频一区二区| 亚洲欧美色图小说| 99久久免费视频.com| 国产精品欧美久久久久无广告| 国产美女视频91| 26uuu亚洲婷婷狠狠天堂| 日本不卡123| 欧美一区二区久久久| 日韩和欧美一区二区三区| 欧美人狂配大交3d怪物一区| 亚洲影院在线观看| 欧美最新大片在线看| 一区二区三区四区激情 | 91国产成人在线| 依依成人精品视频| 91国产免费观看| 亚洲夂夂婷婷色拍ww47| 在线观看精品一区| 亚洲成人777| 91 com成人网| 老司机一区二区| 久久综合色播五月| 成人中文字幕合集| 亚洲欧洲精品一区二区精品久久久| av成人老司机| 亚洲最大成人网4388xx| 欧美三级在线看| 日日夜夜精品视频天天综合网| 91麻豆精品国产91久久久资源速度| 婷婷亚洲久悠悠色悠在线播放| 欧美一区二区三区不卡| 精品在线播放免费| 国产三级三级三级精品8ⅰ区| 国产一区二区精品久久99| 欧美国产一区二区在线观看| 波多野结衣亚洲一区| 一区二区在线观看免费视频播放| 色综合色综合色综合| 无码av免费一区二区三区试看| 日韩一级片在线观看| 处破女av一区二区| 亚洲精品免费在线| 337p亚洲精品色噜噜狠狠| 极品少妇xxxx精品少妇偷拍| 日本一区二区三区四区在线视频| 99精品国产一区二区三区不卡| 一区二区三区在线观看欧美| 欧美精品日韩精品| 国产成人午夜视频| 亚洲免费观看在线视频| 91精品欧美一区二区三区综合在| 国产一区激情在线| 亚洲男女毛片无遮挡| 日韩欧美区一区二| 99久久精品国产观看| 日韩精品久久久久久| 国产婷婷色一区二区三区| 91国偷自产一区二区开放时间| 日日夜夜免费精品| 中文字幕一区不卡| 欧美一区二区在线看| 成人动漫视频在线| 日韩av中文字幕一区二区| 欧美国产一区在线| 欧美一区二区精品久久911| 99久久综合99久久综合网站| 日本美女一区二区三区视频| 中文字幕欧美三区| 欧美一区二区久久久| 91丨九色丨尤物| 国内精品伊人久久久久av影院 | 午夜影院在线观看欧美| 国产亚洲女人久久久久毛片| 欧美色偷偷大香| 成人免费毛片a| 久久精品国产免费看久久精品| 《视频一区视频二区| 久久影院视频免费| 欧美高清视频不卡网| 91色乱码一区二区三区| 国产老女人精品毛片久久| 视频一区欧美日韩|