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

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

?? stl_tree.c

?? 粗慥集成算法集合 ,并有詳細(xì)的文檔資料和測(cè)試數(shù)據(jù)處
?? C
?? 第 1 頁 / 共 2 頁
字號(hào):
  _Rb_global_inst::_Rebalance(__z, _M_header._M_data->_M_parent);
  ++_M_node_count;
  return _Make_iterator(__z);
}

template <class _Key, class _Value, class _KeyOfValue, 
          class _Compare, class _Alloc>
__iterator__
_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>
  ::insert_equal(const __Value__& __v)
{
  _Link_type __y = _M_header._M_data;
  _Link_type __x = _M_root();
  while (__x != 0) {
    __y = __x;
    __x = _M_key_compare(_KeyOfValue()(__v), _S_key(__x)) ? 
            _S_left(__x) : _S_right(__x);
  }
  return _M_insert(__x, __y, __v);
}


template <class _Key, class _Value, class _KeyOfValue, 
          class _Compare, class _Alloc>
pair<__iterator__, bool>
_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>
  ::insert_unique(const __Value__& __v)
{
  _Link_type __y = _M_header._M_data;
  _Link_type __x = _M_root();
  bool __comp = true;
  while (__x != 0) {
    __y = __x;
    __comp = _M_key_compare(_KeyOfValue()(__v), _S_key(__x));
    __x = __comp ? _S_left(__x) : _S_right(__x);
  }
  iterator __j = _Make_iterator(__y);   
  if (__comp)
    if (__j == begin())     
      return pair<iterator,bool>(_M_insert(__x, __y, __v), true);
    else
      --__j;
  if (_M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v)))
    return pair<iterator,bool>(_M_insert(__x, __y, __v), true);
  return pair<iterator,bool>(__j, false);
}


template <class _Key, class _Value, class _KeyOfValue, 
          class _Compare, class _Alloc>
__iterator__ 
_Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>
  ::insert_unique(__iterator__ __position, const __Value__& __v)
{
    __stl_debug_check(__check_if_owner(&_M_iter_list,__position));
  if (__position._M_node == _M_header._M_data->_M_left) { // begin()
    if (size() > 0 && 
        _M_key_compare(_KeyOfValue()(__v), _S_key(__position._M_node)))
      return _M_insert(__position._M_node, __position._M_node, __v);
    // first argument just needs to be non-null 
    else
      return insert_unique(__v).first;
  } else if (__position._M_node == _M_header._M_data) { // end()
    if (_M_key_compare(_S_key(_M_rightmost()), _KeyOfValue()(__v)))
      return _M_insert(0, _M_rightmost(), __v);
    else
      return insert_unique(__v).first;
  } else {
    iterator __before = __position;
    --__before;
    if (_M_key_compare(_S_key(__before._M_node), _KeyOfValue()(__v)) 
        && _M_key_compare(_KeyOfValue()(__v), _S_key(__position._M_node))) {
      if (_S_right(__before._M_node) == 0)
        return _M_insert(0, __before._M_node, __v); 
      else
        return _M_insert(__position._M_node, __position._M_node, __v);
    // first argument just needs to be non-null 
    } else
      return insert_unique(__v).first;
  }
}

template <class _Key, class _Value, class _KeyOfValue, 
          class _Compare, class _Alloc>
__iterator__ 
_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>
  ::insert_equal(__iterator__ __position, const __Value__& __v)
{
    __stl_debug_check(__check_if_owner(&_M_iter_list,__position));
  if (__position._M_node == _M_header._M_data->_M_left) { // begin()
    if (size() > 0 && 
        _M_key_compare(_KeyOfValue()(__v), _S_key(__position._M_node)))
      return _M_insert(__position._M_node, __position._M_node, __v);
    // first argument just needs to be non-null 
    else
      return insert_equal(__v);
  } else if (__position._M_node == _M_header._M_data) {// end()
    if (!_M_key_compare(_KeyOfValue()(__v), _S_key(_M_rightmost())))
      return _M_insert(0, _M_rightmost(), __v);
    else
      return insert_equal(__v);
  } else {
    iterator __before = __position;
    --__before;
    if (!_M_key_compare(_KeyOfValue()(__v), _S_key(__before._M_node))
        && !_M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__v))) {
      if (_S_right(__before._M_node) == 0)
        return _M_insert(0, __before._M_node, __v); 
      else
        return _M_insert(__position._M_node, __position._M_node, __v);
    // first argument just needs to be non-null 
    } else
      return insert_equal(__v);
  }
}

template <class _Key, class _Value, class _KeyOfValue, 
          class _Compare, class _Alloc>
__size_type__ 
_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>::erase(const __Key__& __x)
{
  pair<iterator,iterator> __p = equal_range(__x);
  size_type __n = 0;
  distance(__p.first, __p.second, __n);
  erase(__p.first, __p.second);
  return __n;
}

template <class _Key, class _Value, class _KeyOfValue, class _Compare, class _Alloc>
__Link_type__ 
_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>
  ::_M_copy(__Link_type__ __x, __Link_type__ __p)
{
                        // structural copy.  __x and __p must be non-null.
  _Link_type __top = _M_clone_node(__x);
  __top->_M_parent = __p;
 
  __STL_TRY {
    if (__x->_M_right)
      __top->_M_right = _M_copy(_S_right(__x), __top);
    __p = __top;
    __x = _S_left(__x);

    while (__x != 0) {
      _Link_type __y = _M_clone_node(__x);
      __p->_M_left = __y;
      __y->_M_parent = __p;
      if (__x->_M_right)
        __y->_M_right = _M_copy(_S_right(__x), __y);
      __p = __y;
      __x = _S_left(__x);
    }
  }
  __STL_UNWIND(_M_erase(__top));

  return __top;
}

template <class _Key, class _Value, class _KeyOfValue, 
          class _Compare, class _Alloc>
void 
_Rb_tree<_Key,_Value,_KeyOfValue,
  _Compare,_Alloc>::_M_erase(__Link_type__ __x)
{
                                // erase without rebalancing
  while (__x != 0) {
    _M_erase(_S_right(__x));
    _Link_type __y = _S_left(__x);
    destroy_node(__x);
    __x = __y;
  }
}

template <class _Key, class _Value, class _KeyOfValue, 
          class _Compare, class _Alloc>
void _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>
  ::erase(__iterator__ __first, __iterator__ __last)
{
  if (__first == begin() && __last == end())
    clear();
  else
    while (__first != __last) erase(__first++);
}

template <class _Key, class _Value, class _KeyOfValue, 
          class _Compare, class _Alloc>
void _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>
  ::erase(const __Key__* __first, const __Key__* __last) 
{
  while (__first != __last) erase(*__first++);
}

template <class _Key, class _Value, class _KeyOfValue, 
          class _Compare, class _Alloc>
__iterator__ 
_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>::find(const __Key__& __k)
{
  _Link_type __y = _M_header._M_data;      // Last node which is not less than __k. 
  _Link_type __x = _M_root();      // Current node. 

  while (__x != 0) 
    if (!_M_key_compare(_S_key(__x), __k))
      __y = __x, __x = _S_left(__x);
    else
      __x = _S_right(__x);

  iterator __j = _Make_iterator(__y);   
  return (__j == end() || _M_key_compare(__k, _S_key(__j._M_node))) ? 
     end() : __j;

  // FBP ; may need this   return make_iterator((y == header || key_compare(k, key(y))) ? header : y);
}

template <class _Key, class _Value, class _KeyOfValue, 
          class _Compare, class _Alloc>
__const_iterator__ 
_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>::find(const __Key__& __k) const
{
  _Link_type __y = _M_header._M_data; /* Last node which is not less than __k. */
  _Link_type __x = _M_root(); /* Current node. */

  while (__x != 0) {
    if (!_M_key_compare(_S_key(__x), __k))
      __y = __x, __x = _S_left(__x);
    else
      __x = _S_right(__x);
  }
  const_iterator __j = _Make_const_iterator(__y);   
  return (__j == end() || _M_key_compare(__k, _S_key(__j._M_node))) ?
    end() : __j;
  // FBP : may need this   return make_const_iterator((y == header || key_compare(k, key(y))) ? header : y);
}

template <class _Key, class _Value, class _KeyOfValue, 
          class _Compare, class _Alloc>
__size_type__ 
_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>
  ::count(const __Key__& __k) const
{
  pair<const_iterator, const_iterator> __p = equal_range(__k);
  size_type __n = 0;
  distance(__p.first, __p.second, __n);
  return __n;
}

template <class _Key, class _Value, class _KeyOfValue, 
          class _Compare, class _Alloc>
__iterator__ 
_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>
  ::lower_bound(const __Key__& __k)
{
  _Link_type __y = _M_header._M_data; /* Last node which is not less than __k. */
  _Link_type __x = _M_root(); /* Current node. */

  while (__x != 0) 
    if (!_M_key_compare(_S_key(__x), __k))
      __y = __x, __x = _S_left(__x);
    else
      __x = _S_right(__x);

  return _Make_iterator(__y);
}

template <class _Key, class _Value, class _KeyOfValue, 
          class _Compare, class _Alloc>
__const_iterator__ 
_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>
  ::lower_bound(const __Key__& __k) const
{
  _Link_type __y = _M_header._M_data; /* Last node which is not less than __k. */
  _Link_type __x = _M_root(); /* Current node. */

  while (__x != 0) 
    if (!_M_key_compare(_S_key(__x), __k))
      __y = __x, __x = _S_left(__x);
    else
      __x = _S_right(__x);

  return _Make_const_iterator(__y);
}

template <class _Key, class _Value, class _KeyOfValue, 
          class _Compare, class _Alloc>
__iterator__
_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>
  ::upper_bound(const __Key__& __k)
{
  _Link_type __y = _M_header._M_data; /* Last node which is greater than __k. */
  _Link_type __x = _M_root(); /* Current node. */

   while (__x != 0) 
     if (_M_key_compare(__k, _S_key(__x)))
       __y = __x, __x = _S_left(__x);
     else
       __x = _S_right(__x);

   return _Make_iterator(__y);
}

template <class _Key, class _Value, class _KeyOfValue, 
          class _Compare, class _Alloc>
__const_iterator__ 
_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>
  ::upper_bound(const __Key__& __k) const
{
  _Link_type __y = _M_header._M_data; /* Last node which is greater than __k. */
  _Link_type __x = _M_root(); /* Current node. */

   while (__x != 0) 
     if (_M_key_compare(__k, _S_key(__x)))
       __y = __x, __x = _S_left(__x);
     else
       __x = _S_right(__x);

   return _Make_const_iterator(__y);
}

inline int 
__black_count(_Rb_tree_node_base* __node, _Rb_tree_node_base* __root)
{
  if (__node == 0)
    return 0;
  else {
    int __bc = __node->_M_color == _S_rb_tree_black ? 1 : 0;
    if (__node == __root)
      return __bc;
    else
      return __bc + __black_count(__node->_M_parent, __root);
  }
}

template <class _Key, class _Value, class _KeyOfValue, 
          class _Compare, class _Alloc>
bool _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>::__rb_verify() const
{
  if (_M_node_count == 0 || begin() == end())
    return _M_node_count == 0 && begin() == end() &&
      _M_header._M_data->_M_left == _M_header._M_data && _M_header._M_data->_M_right == _M_header._M_data;
  
  int __len = __black_count(_M_leftmost(), _M_root());
  for (const_iterator __it = begin(); __it != end(); ++__it) {
    _Link_type __x = (_Link_type) __it._M_node;
    _Link_type __L = _S_left(__x);
    _Link_type __R = _S_right(__x);

    if (__x->_M_color == _S_rb_tree_red)
      if ((__L && __L->_M_color == _S_rb_tree_red) ||
          (__R && __R->_M_color == _S_rb_tree_red))
        return false;

    if (__L && _M_key_compare(_S_key(__x), _S_key(__L)))
      return false;
    if (__R && _M_key_compare(_S_key(__R), _S_key(__x)))
      return false;

    if (!__L && !__R && __black_count(__x, _M_root()) != __len)
      return false;
  }

  if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root()))
    return false;
  if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root()))
    return false;

  return true;
}
__STL_END_NAMESPACE

# undef _Make_iterator
# undef _Make_const_iterator
# undef __iterator__        
# undef __const_iterator__  
# undef __size_type__  
# undef __Link_type__  
# undef __Base_ptr__        
# undef __Value__
# undef __Key__  

#if defined(__sgi) && !defined(__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32)
#pragma reset woff 1375
#endif

#endif /*  __STL_TREE_C */

// Local Variables:
// mode:C++
// End:

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产伦精品一区二区三区视频青涩 | 国产精品福利一区二区| 欧美在线视频你懂得| 国产一区二区三区黄视频| 亚洲激情中文1区| 中文一区在线播放| 欧美成人一区二区三区片免费| 色综合久久中文综合久久牛| 国产精品自拍毛片| 三级一区在线视频先锋 | 一卡二卡三卡日韩欧美| 久久亚洲欧美国产精品乐播| 欧美精品18+| 色偷偷88欧美精品久久久| 国产精品自产自拍| 九九国产精品视频| 日本成人在线电影网| 亚洲一区在线观看免费观看电影高清| 国产欧美日韩视频在线观看| 91精品综合久久久久久| 欧美手机在线视频| 在线观看免费一区| 一本大道久久a久久综合| 国产91在线观看丝袜| 韩国精品在线观看| 蜜桃一区二区三区在线| 日韩av在线播放中文字幕| 亚洲国产欧美另类丝袜| 一区二区三区四区视频精品免费| 欧美极品另类videosde| 欧美高清在线精品一区| 国产色爱av资源综合区| 久久午夜色播影院免费高清| 日韩精品专区在线影院重磅| 欧美电影一区二区三区| 欧美一区二区成人6969| 欧美一区二区三区小说| 欧美一区二区视频在线观看 | 亚洲视频一区二区在线| 国产精品久久久久久久蜜臀| 中文字幕精品—区二区四季| 中文字幕精品一区二区三区精品| 欧美激情中文字幕| 亚洲私人影院在线观看| 亚洲欧美日韩一区二区| 亚洲自拍偷拍网站| 午夜精品久久久久久久久| 日韩国产欧美视频| 久久激情综合网| 国产原创一区二区三区| 国产91露脸合集magnet| 97国产精品videossex| 欧美优质美女网站| 91精品在线麻豆| 精品国产亚洲在线| 国产精品久久久久婷婷二区次| 日韩美女视频一区二区 | 九九视频精品免费| 国产精品亚洲一区二区三区妖精 | 欧美精品一区二区三区久久久| 精品国产欧美一区二区| 国产精品天干天干在观线| 亚洲欧美一区二区三区极速播放| 亚洲天堂免费看| 五月婷婷久久丁香| 国产精品香蕉一区二区三区| 91香蕉国产在线观看软件| 精品污污网站免费看| 日韩一区二区免费高清| 国产日韩亚洲欧美综合| 亚洲综合在线视频| 久久99这里只有精品| 99久久国产免费看| 在线不卡中文字幕| 日本一区二区三区在线观看| 亚洲黄色尤物视频| 久久精品国产99久久6| 成人国产精品免费网站| 欧美巨大另类极品videosbest| 久久综合九色综合97_久久久 | 精品在线播放午夜| 99在线精品观看| 日韩一区二区三区三四区视频在线观看 | 国产麻豆91精品| 欧美视频一区二区三区四区| 久久综合色综合88| 亚洲综合在线电影| 国产一区二区在线观看免费| 欧美在线啊v一区| 久久久精品蜜桃| 婷婷国产v国产偷v亚洲高清| 成人免费黄色大片| 日韩欧美专区在线| 亚洲精品免费在线播放| 国产精品乡下勾搭老头1| 欧美日本在线播放| 亚洲人成人一区二区在线观看| 美女脱光内衣内裤视频久久网站| 一本到高清视频免费精品| 久久精品亚洲精品国产欧美kt∨| 亚洲第一av色| 色综合激情五月| 久久丝袜美腿综合| 免费欧美高清视频| 欧美性大战久久久| 中文字幕中文在线不卡住| 狠狠色综合播放一区二区| 欧美乱熟臀69xxxxxx| 一区二区三区中文字幕在线观看| 国产精品99久久久| 精品日韩成人av| 日韩精品成人一区二区在线| av电影在线观看一区| 国产三级欧美三级日产三级99| 秋霞午夜鲁丝一区二区老狼| 日本道免费精品一区二区三区| 国产精品久久久久久久久图文区| 经典三级一区二区| 欧美电视剧免费全集观看| 奇米四色…亚洲| 91精品国产色综合久久不卡蜜臀| 亚洲一区电影777| 91在线观看一区二区| 国产精品久久久久久久久免费相片| 国内精品免费在线观看| 精品国免费一区二区三区| 免费人成在线不卡| 欧美成人猛片aaaaaaa| 免费的国产精品| 欧美大胆一级视频| 久久精品国产亚洲一区二区三区| 在线91免费看| 日韩—二三区免费观看av| 91.麻豆视频| 久久国内精品视频| 久久综合五月天婷婷伊人| 国产精品亚洲午夜一区二区三区 | 91麻豆精品国产91久久久久| 午夜精品久久久久久久久久| 5566中文字幕一区二区电影| 午夜欧美2019年伦理| 欧美一级高清大全免费观看| 免费在线欧美视频| 欧美mv和日韩mv国产网站| 国产在线精品一区二区三区不卡| 久久久亚洲午夜电影| 成人黄色电影在线| 亚洲欧美区自拍先锋| 91蝌蚪国产九色| 亚洲va欧美va国产va天堂影院| 69久久99精品久久久久婷婷| 精品一区二区三区av| 国产午夜精品久久久久久久| 成人夜色视频网站在线观看| 亚洲免费av观看| 欧美剧情片在线观看| 久久精品国产久精国产爱| 国产色综合一区| 在线一区二区三区做爰视频网站| 亚洲第一二三四区| 久久亚洲一区二区三区四区| 成人免费观看视频| 亚洲第一二三四区| 2021国产精品久久精品| 97精品国产露脸对白| 日韩中文字幕91| 国产亚洲综合性久久久影院| 色噜噜狠狠一区二区三区果冻| 日日夜夜精品视频天天综合网| 精品国产凹凸成av人网站| 成人性生交大片免费看中文| 亚洲制服丝袜在线| 亚洲精品一线二线三线| 一本一本大道香蕉久在线精品 | 奇米精品一区二区三区四区| 国产清纯美女被跳蛋高潮一区二区久久w| 9l国产精品久久久久麻豆| 日韩国产欧美在线播放| 国产精品日韩精品欧美在线| 在线观看一区日韩| 国产精品99久久久久| 亚洲妇熟xx妇色黄| 国产香蕉久久精品综合网| 欧美日韩一级二级| 福利视频网站一区二区三区| 日韩国产在线一| 成人欧美一区二区三区白人| 欧美一区二区三区免费视频| 91免费看`日韩一区二区| 九九九久久久精品| 亚洲国产一区视频| 国产精品视频在线看| 日韩精品一区二区在线| 日本精品视频一区二区| 国产suv精品一区二区三区| 日韩成人免费电影| 亚洲激情欧美激情| 国产精品久久久久7777按摩 | 亚洲影院理伦片| 日本一区二区高清|