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

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

?? stl_tree.h

?? 粗慥集成算法集合 ,并有詳細的文檔資料和測試數據處
?? H
?? 第 1 頁 / 共 2 頁
字號:
/*
 *
 * Copyright (c) 1994
 * Hewlett-Packard Company
 *
 * Copyright (c) 1996,1997
 * Silicon Graphics Computer Systems, Inc.
 *
 * Copyright (c) 1997
 * Moscow Center for SPARC Technology
 *
 * Copyright (c) 1999 
 * Boris Fomitchev
 *
 * This material is provided "as is", with absolutely no warranty expressed
 * or implied. Any use is at your own risk.
 *
 * Permission to use or copy this software for any purpose is hereby granted 
 * without fee, provided the above notices are retained on all copies.
 * Permission to modify the code and to distribute modified code is granted,
 * provided the above notices are retained, and a notice that the code was
 * modified is included with the above copyright notice.
 *
 */

/* NOTE: This is an internal header file, included by other STL headers.
 *   You should not attempt to use it directly.
 */

#ifndef __SGI_STL_INTERNAL_TREE_H
#define __SGI_STL_INTERNAL_TREE_H

/*

Red-black tree class, designed for use in implementing STL
associative containers (set, multiset, map, and multimap). The
insertion and deletion algorithms are based on those in Cormen,
Leiserson, and Rivest, Introduction to Algorithms (MIT Press, 1990),
except that

(1) the header cell is maintained with links not only to the root
but also to the leftmost node of the tree, to enable constant time
begin(), and to the rightmost node of the tree, to enable linear time
performance when used with the generic set algorithms (set_union,
etc.);

(2) when a node being deleted has two children its successor node is
relinked into its place, rather than copied, so that the only
iterators invalidated are those referring to the deleted node.

*/

# ifndef __SGI_STL_INTERNAL_ALGOBASE_H
#  include <stl_algobase.h>
# endif

# ifndef __SGI_STL_INTERNAL_ALLOC_H
#  include <stl_alloc.h>
# endif

# ifndef __SGI_STL_INTERNAL_ITERATOR_H
#  include <stl_iterator.h>
# endif

# ifndef __SGI_STL_INTERNAL_CONSTRUCT_H
#  include <stl_construct.h>
# endif

# ifndef __SGI_STL_INTERNAL_FUNSTION_H
#  include <stl_function.h>
# endif

# if defined ( __STL_USE_ABBREVS )
// ugliness is intentional - to reduce conflicts possibility
#  define _Rb_tree_node_base       _rbT__NB
#  define _Rb_tree_node            _rbT__N
#  define _Rb_base_iterator        _rbTB__It
#  define _Rb_tree_base_iterator   _rbT__It
#  define _Rb_tree_base            _rbT__B
# endif

__STL_BEGIN_NAMESPACE

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

# if defined (__STL_DEBUG)
#   define _Make_iterator(__l) iterator(&_M_iter_list,__l) 
#   define _Make_const_iterator(__l) const_iterator(&_M_iter_list,__l)
# else
#   define _Make_iterator iterator
#   define _Make_const_iterator const_iterator
# endif

typedef bool _Rb_tree_Color_type;
const _Rb_tree_Color_type _S_rb_tree_red = false;
const _Rb_tree_Color_type _S_rb_tree_black = true;

struct _Rb_tree_node_base
{
  typedef _Rb_tree_Color_type _Color_type;
  typedef _Rb_tree_node_base* _Base_ptr;

  _Color_type _M_color; 
  _Base_ptr _M_parent;
  _Base_ptr _M_left;
  _Base_ptr _M_right;

  static _Base_ptr _S_minimum(_Base_ptr __x)
  {
    while (__x->_M_left != 0) __x = __x->_M_left;
    return __x;
  }

  static _Base_ptr _S_maximum(_Base_ptr __x)
  {
    while (__x->_M_right != 0) __x = __x->_M_right;
    return __x;
  }
};

template <class _Value>
struct _Rb_tree_node : public _Rb_tree_node_base
{
  _Value _M_value_field;
  __TRIVIAL_STUFF(_Rb_tree_node)
};

struct _Rb_tree_base_iterator;

template <class _Dummy>
struct _Rb_global {
  typedef _Rb_tree_node_base* _Base_ptr;
  // those used to be global functions 
  static void _Rebalance(_Rb_tree_node_base* __x, _Rb_tree_node_base*& __root);
  static _Rb_tree_node_base* _Rebalance_for_erase(_Rb_tree_node_base* __z,
						  _Rb_tree_node_base*& __root,
						  _Rb_tree_node_base*& __leftmost,
						  _Rb_tree_node_base*& __rightmost);
  // those are from _Rb_tree_base_iterator - moved here to reduce code bloat
  // moved here to reduce code bloat without templatizing _Rb_tree_base_iterator
  static void _M_increment(_Rb_tree_base_iterator*);
  static void _M_decrement(_Rb_tree_base_iterator*);
};

typedef _Rb_global<bool> _Rb_global_inst;

struct _Rb_tree_base_iterator
# if defined ( __STL_DEBUG )
    : public __owned_link 
# endif
{
  typedef _Rb_tree_node_base::_Base_ptr _Base_ptr;
  typedef bidirectional_iterator_tag iterator_category;
  typedef ptrdiff_t difference_type;
  _Base_ptr _M_node;
# if defined ( __STL_DEBUG )
  _Base_ptr _Owner_node() const {
      const __owned_list* __ptr = _Owner();
      return __ptr ? _Base_ptr(__ptr->_Owner()) : _Base_ptr(0); 
  }
  _Rb_tree_base_iterator() : __owned_link(0) {}
  _Rb_tree_base_iterator(const __owned_list* __root, _Base_ptr __p) : 
      __owned_link(__root), _M_node(__p) {}
# endif

};

inline bool operator==(const _Rb_tree_base_iterator& __x,
                       const _Rb_tree_base_iterator& __y) {
  return __x._M_node == __y._M_node;
}

inline bool operator!=(const _Rb_tree_base_iterator& __x,
                       const _Rb_tree_base_iterator& __y) {
  return __x._M_node != __y._M_node;
}


template <class _Value, class _Traits>
struct _Rb_tree_iterator : public _Rb_tree_base_iterator
{
  typedef _Value value_type;
  typedef typename _Traits::reference  reference;
  typedef typename _Traits::pointer    pointer;
  
  typedef _Rb_tree_iterator<_Value, _Nonconst_traits<_Value> >  iterator;
  typedef _Rb_tree_iterator<_Value, _Const_traits<_Value> > const_iterator;
  typedef _Rb_tree_iterator<_Value, _Traits> _Self;
  typedef _Rb_tree_node<_Value>* _Link_type;

  //  operator const const_iterator& () const { return *(const const_iterator*)this; } 

  _Rb_tree_iterator() {}
# if defined ( __STL_DEBUG )
  _Rb_tree_iterator(const __owned_list* __root, _Link_type __x) :
    _Rb_tree_base_iterator(__root,__x) {}
  _Rb_tree_iterator(const iterator& __it) : 
    _Rb_tree_base_iterator(__it._Owner(),__it._M_node) {}
# else
  _Rb_tree_iterator(_Link_type __x) { _M_node = __x; }
  _Rb_tree_iterator(const iterator& __it) { _M_node = __it._M_node; }
# endif

  reference operator*() const { 
    __stl_verbose_assert(_M_node!=_Owner_node(), _StlMsg_NOT_DEREFERENCEABLE); 
    return _Link_type(_M_node)->_M_value_field; 
  }
  
  __STL_DEFINE_ARROW_OPERATOR

  _Self& operator++() { _Rb_global_inst::_M_increment(this); return *this; }
  _Self operator++(int) {
    _Self __tmp = *this;
    _Rb_global_inst::_M_increment(this);
    return __tmp;
  }
    
  _Self& operator--() { _Rb_global_inst::_M_decrement(this); return *this; }
  _Self operator--(int) {
    _Self __tmp = *this;
    _Rb_global_inst::_M_decrement(this);
    return __tmp;
  }
};

# ifndef __STL_CLASS_PARTIAL_SPECIALIZATION


template <class _Value, class _Traits>
inline _Value*
value_type(const _Rb_tree_iterator<_Value, _Traits>&) {
  return (_Value*)0;
}


inline bidirectional_iterator_tag
iterator_category(const _Rb_tree_base_iterator&) {
  return bidirectional_iterator_tag();
}

inline ptrdiff_t*
distance_type(const _Rb_tree_base_iterator&) {
  return (ptrdiff_t*) 0;
}

#endif /* __STL_CLASS_PARTIAL_SPECIALIZATION */

// Base class to help EH

template <class _Tp, class _Alloc>
struct _Rb_tree_base
{
  typedef _Rb_tree_node<_Tp> _Node;
  typedef typename _Alloc_traits<_Tp, _Alloc>::allocator_type allocator_type;

  _Rb_tree_base(const allocator_type& __a) : 
    _M_header(__STL_CONVERT_ALLOCATOR(__a, _Node), (_Node*)0) { 
      _M_header._M_data = _M_header.allocate(1); 
      __stl_debug_do(_M_iter_list._Safe_init(_M_header._M_data));
  }
  ~_Rb_tree_base() { 
    __stl_debug_do(_M_iter_list._Invalidate());
    _M_header.deallocate(_M_header._M_data,1); 
  }
  allocator_type get_allocator() const { 
    return __STL_CONVERT_ALLOCATOR(_M_header, _Tp); 
  }
protected:
  typedef typename _Alloc_traits<_Node, _Alloc>::allocator_type _M_node_allocator_type;
  _STL_alloc_proxy<_Node*, _Node, _M_node_allocator_type> _M_header;
  
# if defined (__STL_DEBUG)
protected:
    friend class __owned_link;
    mutable __owned_list _M_iter_list;
public:
    void _Invalidate_all() {_M_iter_list._Invalidate_all();}
# endif
};


template <class _Key, class _Value, class _KeyOfValue, class _Compare,
          __STL_DEFAULT_ALLOCATOR_SELECT(_Value) >
class _Rb_tree : protected _Rb_tree_base<_Value, _Alloc> {
  typedef _Rb_tree_base<_Value, _Alloc> _Base;
protected:
  typedef _Rb_tree_node_base* _Base_ptr;
  typedef _Rb_tree_node<_Value> _Node;
  typedef _Rb_tree_Color_type _Color_type;
public:
  typedef _Key key_type;
  typedef _Value value_type;
  typedef value_type* pointer;
  typedef const value_type* const_pointer;
  typedef value_type& reference;
  typedef const value_type& const_reference;
  typedef _Rb_tree_node<_Value>* _Link_type;
  typedef size_t size_type;
  typedef ptrdiff_t difference_type;

  typedef typename _Base::allocator_type allocator_type;
  __STL_USING_BASE_MEMBER _Rb_tree_base<_Value, _Alloc>::get_allocator;

protected:
#if defined( __STL_HAS_NAMESPACES )
  __STL_USING_BASE_MEMBER _Rb_tree_base<_Value, _Alloc>::_M_header;
#endif /* __STL_USE_NAMESPACES */

protected:

  _Link_type _M_create_node(const value_type& __x)
  {
    _Link_type __tmp = _M_header.allocate(1);
    __STL_TRY {
      construct(&__tmp->_M_value_field, __x);
    }
    __STL_UNWIND(_M_header.deallocate(__tmp,1));
    return __tmp;
  }

  _Link_type _M_clone_node(_Link_type __x)
  {
    _Link_type __tmp = _M_create_node(__x->_M_value_field);
    __tmp->_M_color = __x->_M_color;
    __tmp->_M_left = 0;
    __tmp->_M_right = 0;
    return __tmp;
  }

  void destroy_node(_Link_type __p)
  {
    destroy(&__p->_M_value_field);
    _M_header.deallocate(__p,1);
  }

protected:
  size_type _M_node_count; // keeps track of size of tree
  _Compare _M_key_compare;

  _Link_type& _M_root() const 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av色综合久久天堂av综合| 欧美大片拔萝卜| 欧美一级在线免费| 国产精品国产精品国产专区不蜜 | 欧美日产国产精品| 中文在线一区二区| 麻豆91精品视频| 欧美精品xxxxbbbb| 一区二区三区在线免费观看| 国产精品69毛片高清亚洲| 欧美一区欧美二区| 亚洲影院免费观看| 99精品在线免费| 国产欧美一区二区三区在线看蜜臀| 日本在线播放一区二区三区| 日本道在线观看一区二区| 欧美国产国产综合| 成人污污视频在线观看| 久久嫩草精品久久久精品一| 日韩av网站在线观看| 精品视频在线免费| 亚洲综合图片区| 在线观看免费视频综合| 一区二区在线电影| 99精品久久久久久| 亚洲欧美激情在线| 一本大道av一区二区在线播放| 国产精品精品国产色婷婷| 国产精品一区二区在线看| 久久久欧美精品sm网站| 国产成人午夜视频| 国产精品视频免费| 91色婷婷久久久久合中文| 中文字幕亚洲区| 色偷偷一区二区三区| 亚洲黄色小说网站| 在线观看成人免费视频| 亚洲成年人影院| 69久久99精品久久久久婷婷| 蜜桃91丨九色丨蝌蚪91桃色| 欧美成人福利视频| 国产超碰在线一区| 中文字幕一区av| 欧美主播一区二区三区| 日本三级韩国三级欧美三级| 日韩一区二区在线播放| 久久69国产一区二区蜜臀| 国产日韩精品一区二区三区在线| 成人一区在线观看| 亚洲电影在线播放| 日韩女优电影在线观看| 国产98色在线|日韩| 亚洲精品亚洲人成人网在线播放| 欧美色中文字幕| 久久se精品一区精品二区| 国产亚洲制服色| 在线观看一区二区视频| 捆绑变态av一区二区三区| 国产亚洲精品7777| 色婷婷精品久久二区二区蜜臀av| 日本午夜一区二区| 中文一区一区三区高中清不卡| 一本一道久久a久久精品综合蜜臀| 亚洲国产综合91精品麻豆| 久久欧美中文字幕| 在线精品视频小说1| 裸体健美xxxx欧美裸体表演| 国产精品拍天天在线| 欧美精品99久久久**| 成人免费观看男女羞羞视频| 亚洲成人av福利| 中文av一区特黄| 欧美日韩视频专区在线播放| 国产成人自拍网| 日韩高清在线一区| 中文字幕日韩精品一区| 欧美成va人片在线观看| 欧美在线看片a免费观看| 国产一区999| 五月天精品一区二区三区| 国产精品区一区二区三| 日韩午夜激情视频| 欧美在线你懂的| 成人99免费视频| 激情文学综合网| 视频在线在亚洲| 亚洲在线观看免费视频| 亚洲国产激情av| 久久久久久麻豆| 精品国产一区二区三区av性色| 欧美性受xxxx黑人xyx性爽| av电影一区二区| 粉嫩av亚洲一区二区图片| 另类小说图片综合网| 天天综合日日夜夜精品| 亚洲综合精品久久| 亚洲蜜臀av乱码久久精品蜜桃| 欧美国产精品专区| 久久久久久久久久看片| 久久在线观看免费| 精品国产成人在线影院| 日韩欧美综合在线| 欧美一区三区四区| 日韩午夜激情视频| 日韩午夜在线观看视频| 欧美一区二区三区公司| 欧美情侣在线播放| 69堂亚洲精品首页| 7799精品视频| 日韩精品中文字幕一区二区三区 | 国产香蕉久久精品综合网| 亚洲精品一线二线三线| 日韩欧美一级二级| 精品国产sm最大网站| 久久嫩草精品久久久精品| 久久久久国产精品麻豆| 国产欧美日韩一区二区三区在线观看 | 亚洲第一福利一区| 亚洲成人在线网站| 热久久一区二区| 精品中文字幕一区二区小辣椒| 精品一区二区在线免费观看| 国产在线一区二区| 波多野结衣中文一区| 91亚洲永久精品| 欧美日韩美少妇| 日韩精品一区在线观看| 久久久91精品国产一区二区精品| 久久久久久久久蜜桃| 综合久久久久久久| 日韩精品一卡二卡三卡四卡无卡| 蜜桃视频第一区免费观看| 国产91精品精华液一区二区三区| 99re66热这里只有精品3直播| 欧美性猛交xxxx乱大交退制版| 欧美精品国产精品| 国产日韩高清在线| 亚洲一区二区美女| 国内精品伊人久久久久av一坑| www.欧美日韩国产在线| 欧美日韩一区 二区 三区 久久精品| 欧美一级片在线看| 国产偷v国产偷v亚洲高清| 亚洲欧美日韩国产综合| 日韩激情视频在线观看| 高清不卡一区二区| 欧美日韩一区二区三区视频| 久久久久国产成人精品亚洲午夜| 亚洲黄色小视频| 国内精品国产成人| 欧美四级电影网| 久久久五月婷婷| 五月婷婷另类国产| av一二三不卡影片| 日韩精品一区二区三区三区免费 | 久久免费电影网| 亚洲国产欧美日韩另类综合| 激情久久五月天| 777xxx欧美| 一区二区三区在线看| 国产成人综合亚洲91猫咪| 欧美日本视频在线| 亚洲精品午夜久久久| 国产激情一区二区三区四区| 欧美精品vⅰdeose4hd| 亚洲三级电影网站| 国产成人免费av在线| 日韩情涩欧美日韩视频| 亚洲第一精品在线| 一本一本久久a久久精品综合麻豆| 久久午夜老司机| 青青草91视频| 欧美日韩视频专区在线播放| 中文字幕一区在线| 成人在线综合网| 国产亚洲一二三区| 久久 天天综合| 欧美一区二区三区电影| 性做久久久久久免费观看| 一本到不卡免费一区二区| 国产精品久久久久婷婷| 国产在线一区观看| 亚洲精品一区二区三区精华液| 日本视频中文字幕一区二区三区| 欧美日韩一区小说| 亚洲图片欧美色图| 欧美日免费三级在线| 亚洲激情av在线| 在线观看日韩一区| 一区二区三区在线观看国产| 成a人片亚洲日本久久| 国产精品久久久久永久免费观看 | 欧美福利一区二区| 三级成人在线视频| 欧美老人xxxx18| 日韩国产欧美在线播放| 日韩免费观看高清完整版| 久久精品国产在热久久| 久久午夜色播影院免费高清| 国产成人免费av在线|