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

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

?? stl_rope.h

?? TSP問題的一個類庫 有源代碼和stl
?? H
?? 第 1 頁 / 共 5 頁
字號:
  typedef _Alloc allocator_type;
  static allocator_type get_allocator() { return allocator_type(); }
  _Rope_base(_RopeRep * __t, const allocator_type&) : _M_tree_ptr(__t) {}
  _Rope_base(const allocator_type&) {}

protected:
  // The only data member of a rope:
    _RopeRep* _M_tree_ptr;

# define __ROPE_DEFINE_ALLOC(_Tp, __name) \
        typedef simple_alloc<_Tp, _Alloc> __name##Alloc; \
        static _Tp* __name##_allocate(size_t __n) \
                { return __name##Alloc::allocate(__n); } \
        static void __name##_deallocate(_Tp *__p, size_t __n) \
                { __name##Alloc::deallocate(__p, __n); }
  __ROPE_DEFINE_ALLOCS(_Alloc)
# undef __ROPE_DEFINE_ALLOC
};

#endif /* __STL_USE_STD_ALLOCATORS */


template <class _CharT, class _Alloc>
class rope : public _Rope_base<_CharT,_Alloc> {
    public:
        typedef _CharT value_type;
        typedef ptrdiff_t difference_type;
        typedef size_t size_type;
        typedef _CharT const_reference;
        typedef const _CharT* const_pointer;
        typedef _Rope_iterator<_CharT,_Alloc> iterator;
        typedef _Rope_const_iterator<_CharT,_Alloc> const_iterator;
        typedef _Rope_char_ref_proxy<_CharT,_Alloc> reference;
        typedef _Rope_char_ptr_proxy<_CharT,_Alloc> pointer;

        friend class _Rope_iterator<_CharT,_Alloc>;
        friend class _Rope_const_iterator<_CharT,_Alloc>;
        friend struct _Rope_RopeRep<_CharT,_Alloc>;
        friend class _Rope_iterator_base<_CharT,_Alloc>;
        friend class _Rope_char_ptr_proxy<_CharT,_Alloc>;
        friend class _Rope_char_ref_proxy<_CharT,_Alloc>;
        friend struct _Rope_RopeSubstring<_CharT,_Alloc>;

    protected:
        typedef _Rope_base<_CharT,_Alloc> _Base;
        typedef typename _Base::allocator_type allocator_type;
#       ifdef __STL_USE_NAMESPACES
          using _Base::_M_tree_ptr;
#       endif
        typedef __GC_CONST _CharT* _Cstrptr;

        static _CharT _S_empty_c_str[1];

        static bool _S_is0(_CharT __c) { return __c == _S_eos((_CharT*)0); }
        enum { _S_copy_max = 23 };
                // For strings shorter than _S_copy_max, we copy to
                // concatenate.

        typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep;
        typedef _Rope_RopeConcatenation<_CharT,_Alloc> _RopeConcatenation;
        typedef _Rope_RopeLeaf<_CharT,_Alloc> _RopeLeaf;
        typedef _Rope_RopeFunction<_CharT,_Alloc> _RopeFunction;
        typedef _Rope_RopeSubstring<_CharT,_Alloc> _RopeSubstring;

        // Retrieve a character at the indicated position.
        static _CharT _S_fetch(_RopeRep* __r, size_type __pos);

#       ifndef __GC
            // Obtain a pointer to the character at the indicated position.
            // The pointer can be used to change the character.
            // If such a pointer cannot be produced, as is frequently the
            // case, 0 is returned instead.
            // (Returns nonzero only if all nodes in the path have a refcount
            // of 1.)
            static _CharT* _S_fetch_ptr(_RopeRep* __r, size_type __pos);
#       endif

        static bool _S_apply_to_pieces(
                                // should be template parameter
                                _Rope_char_consumer<_CharT>& __c,
                                const _RopeRep* __r,
                                size_t __begin, size_t __end);
                                // begin and end are assumed to be in range.

#       ifndef __GC
          static void _S_unref(_RopeRep* __t)
          {
              _RopeRep::_S_unref(__t);
          }
          static void _S_ref(_RopeRep* __t)
          {
              _RopeRep::_S_ref(__t);
          }
#       else /* __GC */
          static void _S_unref(_RopeRep*) {}
          static void _S_ref(_RopeRep*) {}
#       endif


#       ifdef __GC
            typedef _Rope_RopeRep<_CharT,_Alloc>* _Self_destruct_ptr;
#       else
            typedef _Rope_self_destruct_ptr<_CharT,_Alloc> _Self_destruct_ptr;
#       endif

        // _Result is counted in refcount.
        static _RopeRep* _S_substring(_RopeRep* __base,
                                    size_t __start, size_t __endp1);

        static _RopeRep* _S_concat_char_iter(_RopeRep* __r,
                                          const _CharT* __iter, size_t __slen);
                // Concatenate rope and char ptr, copying __s.
                // Should really take an arbitrary iterator.
                // Result is counted in refcount.
        static _RopeRep* _S_destr_concat_char_iter(_RopeRep* __r,
                                          const _CharT* __iter, size_t __slen)
                // As above, but one reference to __r is about to be
                // destroyed.  Thus the pieces may be recycled if all
                // relevent reference counts are 1.
#           ifdef __GC
                // We can't really do anything since refcounts are unavailable.
                { return _S_concat_char_iter(__r, __iter, __slen); }
#           else
                ;
#           endif

        static _RopeRep* _S_concat(_RopeRep* __left, _RopeRep* __right);
                // General concatenation on _RopeRep.  _Result
                // has refcount of 1.  Adjusts argument refcounts.

   public:
        void apply_to_pieces( size_t __begin, size_t __end,
                              _Rope_char_consumer<_CharT>& __c) const {
            _S_apply_to_pieces(__c, _M_tree_ptr, __begin, __end);
        }


   protected:

        static size_t _S_rounded_up_size(size_t __n) {
            return _RopeLeaf::_S_rounded_up_size(__n);
        }

        static size_t _S_allocated_capacity(size_t __n) {
            if (_S_is_basic_char_type((_CharT*)0)) {
                return _S_rounded_up_size(__n) - 1;
            } else {
                return _S_rounded_up_size(__n);
            }
        }
                
        // Allocate and construct a RopeLeaf using the supplied allocator
        // Takes ownership of s instead of copying.
        static _RopeLeaf* _S_new_RopeLeaf(__GC_CONST _CharT *__s,
                                          size_t __size, allocator_type __a)
        {
#           ifdef __STL_USE_STD_ALLOCATORS
              _RopeLeaf* __space = _LAllocator(__a).allocate(1);
#           else
              _RopeLeaf* __space = _L_allocate(1);
#           endif
            return new(__space) _RopeLeaf(__s, __size, __a);
        }

        static _RopeConcatenation* _S_new_RopeConcatenation(
                        _RopeRep* __left, _RopeRep* __right,
                        allocator_type __a)
        {
#           ifdef __STL_USE_STD_ALLOCATORS
              _RopeConcatenation* __space = _CAllocator(__a).allocate(1);
#           else
              _RopeConcatenation* __space = _C_allocate(1);
#           endif
            return new(__space) _RopeConcatenation(__left, __right, __a);
        }

        static _RopeFunction* _S_new_RopeFunction(char_producer<_CharT>* __f,
                size_t __size, bool __d, allocator_type __a)
        {
#           ifdef __STL_USE_STD_ALLOCATORS
              _RopeFunction* __space = _FAllocator(__a).allocate(1);
#           else
              _RopeFunction* __space = _F_allocate(1);
#           endif
            return new(__space) _RopeFunction(__f, __size, __d, __a);
        }

        static _RopeSubstring* _S_new_RopeSubstring(
                _Rope_RopeRep<_CharT,_Alloc>* __b, size_t __s,
                size_t __l, allocator_type __a)
        {
#           ifdef __STL_USE_STD_ALLOCATORS
              _RopeSubstring* __space = _SAllocator(__a).allocate(1);
#           else
              _RopeSubstring* __space = _S_allocate(1);
#           endif
            return new(__space) _RopeSubstring(__b, __s, __l, __a);
        }

#       ifdef __STL_USE_STD_ALLOCATORS
          static
          _RopeLeaf* _S_RopeLeaf_from_unowned_char_ptr(const _CharT *__s,
                       size_t __size, allocator_type __a)
#         define __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __size, __a) \
                _S_RopeLeaf_from_unowned_char_ptr(__s, __size, __a)     
#       else
          static
          _RopeLeaf* _S_RopeLeaf_from_unowned_char_ptr2(const _CharT* __s,
                                                        size_t __size)
#         define __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __size, __a) \
               _S_RopeLeaf_from_unowned_char_ptr2(__s, __size)
#       endif
        {
            if (0 == __size) return 0;
#           ifdef __STL_USE_STD_ALLOCATORS
              _CharT* __buf = __a.allocate(_S_rounded_up_size(__size));
#           else
              _CharT* __buf = _Data_allocate(_S_rounded_up_size(__size));
              allocator_type __a = allocator_type();
#           endif

            uninitialized_copy_n(__s, __size, __buf);
            _S_cond_store_eos(__buf[__size]);
            __STL_TRY {
              return _S_new_RopeLeaf(__buf, __size, __a);
            }
            __STL_UNWIND(_RopeRep::__STL_FREE_STRING(__buf, __size, __a))
        }
            

        // Concatenation of nonempty strings.
        // Always builds a concatenation node.
        // Rebalances if the result is too deep.
        // Result has refcount 1.
        // Does not increment left and right ref counts even though
        // they are referenced.
        static _RopeRep*
        _S_tree_concat(_RopeRep* __left, _RopeRep* __right);

        // Concatenation helper functions
        static _RopeLeaf*
        _S_leaf_concat_char_iter(_RopeLeaf* __r,
                                 const _CharT* __iter, size_t __slen);
                // Concatenate by copying leaf.
                // should take an arbitrary iterator
                // result has refcount 1.
#       ifndef __GC
          static _RopeLeaf* _S_destr_leaf_concat_char_iter
                        (_RopeLeaf* __r, const _CharT* __iter, size_t __slen);
          // A version that potentially clobbers __r if __r->_M_ref_count == 1.
#       endif

	private:

        static size_t _S_char_ptr_len(const _CharT* __s);
                        // slightly generalized strlen

        rope(_RopeRep* __t, const allocator_type& __a = allocator_type())
          : _Base(__t,__a) { }


        // Copy __r to the _CharT buffer.
        // Returns __buffer + __r->_M_size.
        // Assumes that buffer is uninitialized.
        static _CharT* _S_flatten(_RopeRep* __r, _CharT* __buffer);

        // Again, with explicit starting position and length.
        // Assumes that buffer is uninitialized.
        static _CharT* _S_flatten(_RopeRep* __r,
                                  size_t __start, size_t __len,
                                  _CharT* __buffer);

        static const unsigned long 
          _S_min_len[_RopeRep::_S_max_rope_depth + 1];

        static bool _S_is_balanced(_RopeRep* __r)
                { return (__r->_M_size >= _S_min_len[__r->_M_depth]); }

        static bool _S_is_almost_balanced(_RopeRep* __r)
                { return (__r->_M_depth == 0 ||
                          __r->_M_size >= _S_min_len[__r->_M_depth - 1]); }

        static bool _S_is_roughly_balanced(_RopeRep* __r)
                { return (__r->_M_depth <= 1 ||
                          __r->_M_size >= _S_min_len[__r->_M_depth - 2]); }

        // Assumes the result is not empty.
        static _RopeRep* _S_concat_and_set_balanced(_RopeRep* __left,
                                                     _RopeRep* __right)
        {
            _RopeRep* __result = _S_concat(__left, __right);
            if (_S_is_balanced(__result)) __result->_M_is_balanced = true;
            return __result;
        }

        // The basic rebalancing operation.  Logically copies the
        // rope.  The result has refcount of 1.  The client will
        // usually decrement the reference count of __r.
        // The result is within height 2 of balanced by the above
        // definition.
        static _RopeRep* _S_balance(_RopeRep* __r);

        // Add all unbalanced subtrees to the forest of balanceed trees.
        // Used only by balance.
        static void _S_add_to_forest(_RopeRep*__r, _RopeRep** __forest);
        
        // Add __r to forest, assuming __r is already balanced.
        static void _S_add_leaf_to_forest(_RopeRep* __r, _RopeRep** __forest);

        // Print to stdout, exposing structure
        static void _S_dump(_RopeRep* __r, int __indent = 0);

        // Return -1, 0, or 1 if __x < __y, __x == __y, or __x > __y resp.
        static int _S_compare(const _RopeRep* __x, const _RopeRep* __y);

   public:
        bool empty() const { return 0 == _M_tree_ptr; }

        // Comparison member function.  This is public only for those
        // clients that need a ternary comparison.  Others
        // should use the comparison operators below.
        int compare(const rope& __y) const {
            return _S_compare(_M_tree_ptr, __y._M_tree_ptr);
        }

        rope(const _CharT* __s, const allocator_type& __a = allocator_type())
        : _Base(__STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, _S_char_ptr_len(__s),
                                                 __a),__a)
        { }

        rope(const _CharT* __s, size_t __len,
   

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区欧美久久| 国产高清精品网站| 亚洲欧美日韩电影| 国产精品久久一级| 国产精品看片你懂得| 免费在线观看视频一区| 麻豆国产欧美日韩综合精品二区| 视频一区中文字幕国产| 日本欧美在线看| 精品一区二区三区的国产在线播放| 美女视频一区二区三区| 波多野结衣精品在线| 91官网在线观看| 91精品国产一区二区三区| 欧美大度的电影原声| 国产欧美一区二区在线观看| 最新日韩在线视频| 亚洲高清免费观看| 极品瑜伽女神91| 欧美日韩国产高清一区二区三区| 日韩欧美国产精品| 亚洲国产裸拍裸体视频在线观看乱了 | 国产精品88av| 国产成人av在线影院| 日韩一区二区在线看片| 欧美韩国一区二区| 亚洲午夜久久久久久久久电影院| 成人爽a毛片一区二区免费| 欧美视频一区二区在线观看| 精品理论电影在线| 亚洲欧美日韩在线| 91小宝寻花一区二区三区| 欧美一区三区四区| 首页国产欧美久久| 欧美福利视频导航| 国产精品―色哟哟| 美女视频黄频大全不卡视频在线播放| 欧美性做爰猛烈叫床潮| 亚洲网友自拍偷拍| 51午夜精品国产| 亚洲视频一区二区免费在线观看| 日本欧美一区二区三区乱码| 欧美中文字幕一区二区三区 | 国产精品12区| 久久久亚洲国产美女国产盗摄| 亚洲欧美另类小说视频| 91在线码无精品| 久久看人人爽人人| 国产91综合一区在线观看| 欧美精品99久久久**| 日韩av一级电影| 精品美女在线播放| 成人小视频在线| 亚洲男女一区二区三区| 欧美色综合网站| 日本vs亚洲vs韩国一区三区二区| 日韩一级二级三级| 国产成人精品免费网站| 亚洲精品免费播放| www.亚洲免费av| 亚洲在线观看免费| 91看片淫黄大片一级在线观看| 一区二区三区中文字幕精品精品 | 国产精品久久久久永久免费观看| 99re热视频精品| 午夜精品在线看| 欧美性高清videossexo| 日本视频免费一区| 国产精品美女久久久久久| 欧美色综合网站| 国产成人在线看| 午夜久久久久久电影| 国产欧美精品一区aⅴ影院| 在线一区二区观看| 国产呦萝稀缺另类资源| www国产精品av| 国产一二三精品| 一区二区免费看| 国产婷婷色一区二区三区四区 | 国产老女人精品毛片久久| 亚洲天天做日日做天天谢日日欢| 欧美久久久久久蜜桃| 国产99一区视频免费| 亚洲国产综合人成综合网站| 久久久精品黄色| 88在线观看91蜜桃国自产| 国产综合色精品一区二区三区| 日韩免费高清视频| 在线看日韩精品电影| 国产成人在线电影| 蜜桃久久av一区| 亚洲国产欧美在线| 亚洲日本丝袜连裤袜办公室| 337p粉嫩大胆色噜噜噜噜亚洲| 欧美视频一区在线观看| 99国产精品视频免费观看| 韩国视频一区二区| 视频精品一区二区| 一区二区三区不卡视频在线观看| 国产清纯在线一区二区www| 欧美军同video69gay| 日本精品视频一区二区三区| 成人在线综合网站| 国产精品影音先锋| 另类小说一区二区三区| 中文字幕电影一区| 久久久精品中文字幕麻豆发布| 欧美精品乱码久久久久久| 在线一区二区观看| 在线观看亚洲一区| 色噜噜狠狠一区二区三区果冻| av在线不卡免费看| 成人福利视频网站| 美腿丝袜一区二区三区| 日本午夜一区二区| 日本不卡一二三区黄网| 日韩黄色一级片| 日本欧美肥老太交大片| 视频一区二区欧美| 美女脱光内衣内裤视频久久影院| 日韩vs国产vs欧美| 麻豆极品一区二区三区| 狠狠色综合播放一区二区| 乱中年女人伦av一区二区| 久久国产免费看| 国产成人夜色高潮福利影视| 丁香桃色午夜亚洲一区二区三区| 高清国产一区二区三区| gogo大胆日本视频一区| 色综合色综合色综合 | 久久综合色鬼综合色| 91精品国产综合久久福利软件 | 国产成+人+日韩+欧美+亚洲| 成熟亚洲日本毛茸茸凸凹| 91亚洲午夜精品久久久久久| 在线观看日韩电影| 欧美一区二区精品| 久久综合久久鬼色中文字| 欧美国产日韩在线观看| 亚洲柠檬福利资源导航| 视频一区二区三区在线| 国内久久精品视频| 色综合视频一区二区三区高清| 欧美日韩精品一区二区三区 | 国产拍欧美日韩视频二区| 国产精品久久精品日日| 亚洲成人你懂的| 亚洲久本草在线中文字幕| 亚洲午夜免费福利视频| 精品一区二区三区在线播放视频 | 97精品久久久午夜一区二区三区| 欧美亚洲图片小说| 久久综合中文字幕| 亚洲欧美一区二区久久| 久久综合综合久久综合| www.久久久久久久久| 777奇米四色成人影色区| 国产亚洲一区二区在线观看| 一区二区三区四区av| 国产中文字幕一区| 日本高清视频一区二区| 久久久一区二区三区捆绑**| 亚洲精品伦理在线| 国产一区二区三区电影在线观看| 95精品视频在线| 精品国产免费久久| 亚洲精品一区二区精华| 亚洲图片欧美视频| 成人小视频在线| 精品久久一区二区| 亚洲国产欧美日韩另类综合| 国产91富婆露脸刺激对白| 欧美一级日韩不卡播放免费| 亚洲精选免费视频| 国产高清久久久久| 日韩一区二区三区在线观看| 亚洲精品老司机| 粉嫩av一区二区三区粉嫩| 欧美一级午夜免费电影| 亚洲成人资源在线| 91蜜桃视频在线| 国产精品素人视频| 精品一区二区国语对白| 欧美一区二区三区在线观看视频 | 色哟哟一区二区在线观看| 国产喷白浆一区二区三区| 狠狠久久亚洲欧美| 欧美日韩国产免费| 亚洲国产精品一区二区www在线| 不卡一区二区三区四区| 国产天堂亚洲国产碰碰| 国产主播一区二区三区| 精品国产乱码久久久久久老虎| 亚洲国产精品人人做人人爽| 91在线国产观看| 成人欧美一区二区三区视频网页 | 午夜伊人狠狠久久| 在线看日本不卡| 午夜日韩在线观看| 在线播放国产精品二区一二区四区|