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

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

?? hash_set

?? C語言庫函數的原型,有用的拿去
??
?? 第 1 頁 / 共 3 頁
字號:
// hash_set stl/clr header
#ifndef _CLI_HASH_SET_
 #define _CLI_HASH_SET_
#include <cliext/xhash>

namespace cliext {
	namespace impl {
//
// TEMPLATE CLASS hash_set_traits
//
template<typename _Key_t,	// key type
	bool _Mflag>			// true if multiple equivalent keys are permitted
	ref class hash_set_traits
	{	// traits required to make hash table behave like a set
public:
	typedef hash_set_traits<_Key_t, _Mflag> _Mytype_t;

	typedef _Key_t key_type;
	typedef _Key_t value_type;
	typedef _STLCLR BinaryDelegate<key_type, key_type, bool>
		key_compare;
	typedef key_compare value_compare;
	typedef _STLCLR UnaryDelegate<key_type, int> hasher;

	typedef _Key_t generic_key;

	hash_set_traits()
		:	comp(gcnew key_compare(&_Hash_key_compare)),
			hash_fun(gcnew hasher(&_Hasher)),
			_Multi(_Mflag)
		{	// construct with default comparator and hash function
		}

	hash_set_traits(key_compare^ _Pred)
		:	comp(_Pred),
			hash_fun(gcnew hasher(&_Hasher)),
			_Multi(_Mflag)
		{	// construct with specified comparator and default hash function
		}

	hash_set_traits(key_compare^ _Pred, hasher^ _Hashfn)
		:	comp(_Pred), hash_fun(_Hashfn),
			_Multi(_Mflag)
		{	// construct with specified comparator and default hash function
		}

	key_compare^ key_comp()
		{	// return object for comparing keys
		return (comp);
		}

	value_compare^ value_comp()
		{	// return object for comparing keys
		return (comp);
		}

	hasher^ hash_delegate()
		{	// return object for hashing key
		return (gcnew hasher(this, &hash_set_traits::get_hash));
		}

	int get_hash(key_type _Key)
		{	// rehash hashed _Key to int value by pseudorandomizing transform
		int _Hashval = hash_fun(_Key);
		int _Quot = _Hashval / 127773;
		int _Rem = _Hashval % 127773;

		_Rem = 16807 * _Rem - 2836 * _Quot;
		if (_Rem < 0)
			_Rem += 2147483647;
		return (_Rem);
		}

	static key_type get_key(value_type% _Val)
		{	// extract key from element value
		return (_Val);
		}

_STLCLR_FIELD_ACCESS:
	static int _Hasher(key_type _Key)
		{	// hash _Key to int value using template function hash_value
		return (hash_value(_Key));
		}

	// data members
	key_compare^ comp;	// the comparator predicate for keys: ==, <=, or >=
	hasher^ hash_fun;	// the hash function
	bool _Multi;		// true if multiple equivalents keys are permitted
	};

//
// TEMPLATE CLASS hash_set_base
//
template<typename _Key_t>
	ref class hash_set_base
	:	public hash<
			hash_set_traits<_Key_t, false> >,
			System::Collections::Generic::ICollection<_Key_t>,
			System::Collections::Generic::IEnumerable<_Key_t>
	{	// hash table of unique key values
public:
	// types
	typedef hash_set_base<_Key_t> _Mytype_t;
	typedef _Key_t _Value_t;
	typedef hash<hash_set_traits<_Key_t, false> > _Mybase_t;

	typedef typename _Mybase_t::key_type key_type;
//	typedef typename _Mybase_t::value_type value_type;
//	typedef typename _Mybase_t::key_compare key_compare;
//	typedef typename _Traits_t::value_compare value_compare;
//	typedef typename _Mybase_t::hasher hasher;

//	typedef int size_type;
//	typedef int difference_type;
//	typedef _Value_t value_type;
//	typedef value_type% reference;
//	typedef value_type% const_reference;

//	typedef _Mycont_it generic_container;
//	typedef value_type generic_value;

//	typedef _STLCLR GenericPair<iterator^, bool> pair_iter_bool;
//	typedef _STLCLR GenericPair<iterator^, iterator^> pair_iter_iter;

	// basics
	hash_set_base()
		:	_Mybase_t()
		{	// construct empty hash_set from defaults
		}

	hash_set_base(hash_set_base% _Right)
		:	_Mybase_t(_Right)
		{	// construct by copying a hash_set
		}

	hash_set_base% operator=(hash_set_base% _Right)
		{	// assign
		_Mybase_t::operator=(_Right);
		return (*this);
		}

	// constructors
	explicit hash_set_base(key_compare^ _Pred)
		:	_Mybase_t(_Pred)
		{	// construct empty hash_set from compare
		}

	hash_set_base(key_compare^ _Pred, hasher^ _Hasher)
		:	_Mybase_t(_Pred, _Hasher)
		{	// construct with specified compare and hash
		}

	template<typename _Iter_t>
		hash_set_base(_Iter_t _First, _Iter_t _Last)
		:	_Mybase_t()
		{	// construct hash_set from [_First, _Last), defaults
		for (; _First != _Last; ++_First)
			insert((value_type)*_First);
		}

	template<typename _Iter_t>
		hash_set_base(_Iter_t _First, _Iter_t _Last,
			key_compare^ _Pred)
		:	_Mybase_t(_Pred)
		{	// construct hash_set from [_First, _Last), compare
		for (; _First != _Last; ++_First)
			insert((value_type)*_First);
		}

	template<typename _Iter_t>
		hash_set_base(_Iter_t _First, _Iter_t _Last,
			key_compare^ _Pred, hasher^ _Hasher)
		:	_Mybase_t(_Pred, _Hasher)
		{	// construct hash_set from [_First, _Last), compare and hash
		for (; _First != _Last; ++_First)
			insert((value_type)*_First);
		}

	// interfaces
private:
	property size_type Count_generic
		{	// element count
		virtual size_type get() sealed
			= System::Collections::Generic::ICollection<_Value_t>::Count::get
			{	// get element count
			return (size());
			}
		};

	property bool IsReadOnly
		{	// test if read only
		virtual bool get() sealed
			= System::Collections::Generic::ICollection<_Value_t>
				::IsReadOnly::get
			{	// test if read only
			return (false);
			}
		};

	// converters
	virtual void CopyTo(_Myarray_t^ _Dest, int _First) sealed
		= System::Collections::Generic::ICollection<_Value_t>::CopyTo
		{	// copy to _Dest, beginning at _First
		node_type^ _Node = head_node();

		for (int _Idx = size(); 0 <= --_Idx; )
			{	// copy back to front
			_Node = _Node->prev_node();
			_Dest[_First + _Idx] = _Node->_Value;
			}
		}

	// iterator generators
	virtual System::Collections::Generic::IEnumerator<_Value_t>^
		GetEnumerator() sealed
		= System::Collections::Generic::IEnumerable<_Value_t>::GetEnumerator
		{	// get enumerator for the container
		return (gcnew _STLCLR HashEnumerator<_Key_t, _Value_t>(
			front_node()));
		}

	// mutators
	virtual void Add(value_type _Val) sealed
		= System::Collections::Generic::ICollection<_Value_t>::Add
		{	// add element with value _Val
		insert_node(_Val, nullptr);
		}

	virtual void Clear() sealed
		= System::Collections::Generic::ICollection<_Value_t>::Clear
		{	// erase all elements
		clear();
		}

	virtual bool Contains(value_type _Val) sealed
		= System::Collections::Generic::ICollection<_Value_t>::Contains
		{	// search for element matching value _Val
		for (node_type^ _Node = front_node(); _Node != head_node();
			_Node = _Node->next_node())
			if (((System::Object^)_Val)->Equals(
				(System::Object^)_Node->_Value))
				return (true);
		return (false);
		}

	virtual bool Remove(value_type _Val) sealed
		= System::Collections::Generic::ICollection<_Value_t>::Remove
		{	// remove first element matching value _Val
		for (node_type^ _Node = front_node(); _Node != head_node();
			_Node = _Node->next_node())
			if (((System::Object^)_Val)->Equals(
				(System::Object^)_Node->_Value))
				{	// found a match, remove it
				erase_node(_Node);
				return (true);
				}
		return (false);
		}
	};

//
// TEMPLATE CLASS hash_set_select
//
template<typename _Key1_t,
	bool _Is_ref_key>
	ref class hash_set_select
	:	public hash_set_base<_Key1_t>
	{	// ordered red-black tree of unique keys
public:
	// types
	typedef _Key1_t _Gkey_t;

	typedef hash_set_select<_Key1_t, _Is_ref_key> _Mytype_t;
	typedef hash_set_base<_Gkey_t> _Mybase_t;
//	typedef System::Collections::Generic::IEnumerable<_Value_t> _Myenum_it;

	typedef _Key1_t key_type;
//	typedef typename _Mybase_t::value_type value_type;
//	typedef typename _Mybase_t::key_compare key_compare;
//	typedef typename _Traits_t::value_compare value_compare;
//	typedef typename _Mybase_t::hasher hasher;

//	typedef int size_type;
//	typedef int difference_type;
//	typedef _Value_t value_type;
//	typedef value_type% reference;
//	typedef value_type% const_reference;

//	typedef _Mycont_it generic_container;
//	typedef key_type generic_value;

//	typedef _STLCLR GenericPair<iterator^, bool> pair_iter_bool;
//	typedef _STLCLR GenericPair<iterator^, iterator^> pair_iter_iter;

	// basics
	hash_set_select()
		:	_Mybase_t()
		{	// construct empty hash_set from defaults
		}

	hash_set_select(hash_set_select% _Right)
		:	_Mybase_t((_Mybase_t%)_Right)
		{	// construct by copying a list
		}

	hash_set_select% operator=(hash_set_select% _Right)
		{	// assign
		_Mybase_t::operator=(_Right);
		return (*this);
		}

	// constructors
	explicit hash_set_select(key_compare^ _Pred)
		:	_Mybase_t(_Pred)
		{	// construct empty hash_set from comparator
		}

	hash_set_select(key_compare^ _Pred, hasher^ _Hasher)
		:	_Mybase_t(_Pred, _Hasher)
		{	// construct with specified compare and hash
		}

	template<typename _Iter_t>
		hash_set_select(_Iter_t _First, _Iter_t _Last)
		:	_Mybase_t()
		{	// construct hash_set from [_First, _Last), default comparator
		for (; _First != _Last; ++_First)
			insert((value_type)*_First);
		}

	template<typename _Iter_t>
		hash_set_select(_Iter_t _First, _Iter_t _Last, key_compare^ _Pred)
		:	_Mybase_t(_Pred)
		{	// construct hash_set from [_First, _Last), comparator
		for (; _First != _Last; ++_First)
			insert((value_type)*_First);
		}

	template<typename _Iter_t>
		hash_set_select(_Iter_t _First, _Iter_t _Last,
			key_compare^ _Pred, hasher^ _Hasher)
		:	_Mybase_t(_Pred, _Hasher)
		{	// construct hash_map from [_First, _Last), compare and hash
		for (; _First != _Last; ++_First)
			insert((value_type)*_First);
		}

	// converters
	static generic_value make_value(key_type _Key)
		{	// make a generic_value
		return (_Key);
		}

	// mutators
//	virtual size_type erase(key_type _Keyval);

	// searches
//	virtual iterator find(key_type _Keyval);
//	virtual size_type count(key_type _Keyval);
//	virtual iterator lower_bound(key_type _Keyval);
//	virtual iterator upper_bound(key_type _Keyval);
//	virtual pair_iter_iter equal_range(key_type _Keyval);
	};

//
// TEMPLATE CLASS hash_set_select: _Key1_t REF SPECIALIZATION
//
template<typename _Key1_t>
	ref class hash_set_select<_Key1_t, true>
	:	public hash_set_base<_Key1_t^>
	{	// ordered red-black tree of unique keys
public:
	// types
	typedef _Key1_t^ _Gkey_t;

	typedef hash_set_select<_Key1_t, true> _Mytype_t;
	typedef hash_set_base<_Gkey_t> _Mybase_t;
//	typedef System::Collections::Generic::IEnumerable<_Value_t> _Myenum_it;

	typedef _Key1_t key_type;
//	typedef typename _Mybase_t::value_type value_type;
//	typedef typename _Mybase_t::key_compare key_compare;
//	typedef typename _Traits_t::value_compare value_compare;
//	typedef typename _Mybase_t::hasher hasher;

//	typedef int size_type;
//	typedef int difference_type;
//	typedef _Value_t value_type;
//	typedef value_type% reference;
//	typedef value_type% const_reference;

//	typedef _Mycont_it generic_container;
//	typedef key_type generic_value;

//	typedef _STLCLR GenericPair<iterator^, bool> pair_iter_bool;
//	typedef _STLCLR GenericPair<iterator^, iterator^> pair_iter_iter;

	// basics
	hash_set_select()
		:	_Mybase_t()
		{	// construct empty hash_set from defaults
		}

	hash_set_select(hash_set_select% _Right)
		:	_Mybase_t((_Mybase_t%)_Right)
		{	// construct by copying a list
		}

	hash_set_select% operator=(hash_set_select% _Right)
		{	// assign
		_Mybase_t::operator=(_Right);
		return (*this);
		}

	// constructors
	explicit hash_set_select(key_compare^ _Pred)
		:	_Mybase_t(_Pred)
		{	// construct empty hash_set from comparator
		}

	hash_set_select(key_compare^ _Pred, hasher^ _Hasher)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
不卡一区在线观看| 性做久久久久久免费观看| 国产精品香蕉一区二区三区| 久久综合九色欧美综合狠狠| 国产乱人伦偷精品视频不卡| 国产精品日韩成人| 色呦呦网站一区| 亚洲成精国产精品女| 日韩三区在线观看| 国产毛片精品视频| 国产精品久久三| 欧美色中文字幕| 免费成人深夜小野草| 国产亚洲人成网站| 91无套直看片红桃| 婷婷久久综合九色综合伊人色| 制服丝袜在线91| 国内精品免费在线观看| 一区免费观看视频| 欧美日本一道本在线视频| 经典三级一区二区| ㊣最新国产の精品bt伙计久久| 欧美色视频一区| 韩日av一区二区| 亚洲欧洲制服丝袜| 日韩一区二区三区视频在线观看| 成人手机在线视频| 亚洲夂夂婷婷色拍ww47| 欧美r级在线观看| 色综合天天视频在线观看| 日韩不卡免费视频| 亚洲人成网站影音先锋播放| 日韩限制级电影在线观看| 北条麻妃一区二区三区| 日韩vs国产vs欧美| 一区二区不卡在线播放 | 亚洲欧美日韩成人高清在线一区| 欧美午夜电影网| 粉嫩高潮美女一区二区三区| 天堂在线一区二区| 成人欧美一区二区三区小说| 欧美一区二区在线播放| 97se亚洲国产综合自在线观| 美国一区二区三区在线播放| 一区二区三区精密机械公司| 国产情人综合久久777777| 欧美日产在线观看| 91亚洲精品一区二区乱码| 国产美女久久久久| 毛片av一区二区| 午夜久久久久久| 亚洲精选视频在线| 国产精品成人一区二区三区夜夜夜| 欧美成人精品3d动漫h| 欧美日韩一区二区三区视频| 99久久er热在这里只有精品66| 久久99精品久久久久| 亚欧色一区w666天堂| 亚洲一区二区中文在线| 最新日韩在线视频| 国产精品国产三级国产有无不卡 | 亚洲美女少妇撒尿| 国产精品成人一区二区三区夜夜夜 | 国产调教视频一区| 精品国产污网站| 91精品国产综合久久婷婷香蕉| 91国产福利在线| 色综合色综合色综合| 色综合天天综合给合国产| 成人激情小说网站| 成人黄色片在线观看| 国产米奇在线777精品观看| 韩国欧美一区二区| 国产在线播放一区二区三区| 日韩国产欧美一区二区三区| 亚洲成a人片综合在线| 午夜不卡在线视频| 天堂在线亚洲视频| 日本欧美一区二区三区| 日本色综合中文字幕| 奇米影视7777精品一区二区| 日韩—二三区免费观看av| 日日夜夜免费精品| 免费看欧美美女黄的网站| 热久久国产精品| 久久激情五月激情| 国产美女娇喘av呻吟久久| 国产成人福利片| 不卡视频在线观看| 在线观看日韩电影| 欧美一区二区三区在线电影| 91精品国产品国语在线不卡| 欧美岛国在线观看| 欧美激情一区三区| 亚洲欧美电影一区二区| 亚洲一二三专区| 久久99精品久久只有精品| 国产精品中文有码| 一本一道综合狠狠老| 欧美日韩国产电影| 久久综合狠狠综合| 亚洲图片你懂的| 午夜精品久久久久久久99水蜜桃| 免费观看一级欧美片| 成人精品亚洲人成在线| 91福利小视频| 日韩免费视频一区二区| 欧美经典一区二区三区| 一区二区三区在线观看动漫| 奇米影视7777精品一区二区| 成人一级黄色片| 欧美日韩在线直播| 久久久精品综合| 一区二区不卡在线播放 | 精品1区2区在线观看| 国产精品久久久久久久久久久免费看 | 欧美日韩国产综合一区二区三区| 日韩一区二区电影网| 中文在线资源观看网站视频免费不卡| 亚洲欧洲韩国日本视频| 日韩综合一区二区| 国产91精品露脸国语对白| 欧美日本国产一区| 国产精品伦一区| 免费观看一级欧美片| 91久久精品一区二区| 久久影音资源网| 亚洲第一激情av| av一区二区三区| 精品国产乱码久久久久久浪潮| 亚洲中国最大av网站| 岛国一区二区在线观看| 欧美一区二区不卡视频| 亚洲精品伦理在线| 国产v综合v亚洲欧| 欧美一区二区三区播放老司机| 亚洲欧洲三级电影| 国产综合久久久久影院| 欧美久久久久久久久| 亚洲视频每日更新| 国产黄色精品网站| 欧美一区二区三区免费大片| 亚洲午夜一区二区| 97久久精品人人澡人人爽| 久久综合九色综合97婷婷女人 | 欧美国产精品一区二区三区| 日av在线不卡| 欧美日本一区二区三区四区| 夜夜亚洲天天久久| 91香蕉视频在线| 中文字幕一区二区视频| 国产精品一级二级三级| 精品国产三级a在线观看| 免费不卡在线视频| 4438x成人网最大色成网站| 亚洲va天堂va国产va久| 日本韩国一区二区三区| 亚洲欧美日韩一区| 99久久99久久综合| |精品福利一区二区三区| av中文字幕亚洲| 国产精品欧美经典| 成人涩涩免费视频| 中文在线资源观看网站视频免费不卡| 国产精品一区一区| 中文字幕精品在线不卡| 成人av电影观看| 日韩美女视频一区二区| 91在线丨porny丨国产| 亚洲三级视频在线观看| 97精品超碰一区二区三区| 国产精品久久久久久久久搜平片 | 26uuu另类欧美| 国产精品综合一区二区| 久久精品亚洲精品国产欧美| 国产91在线|亚洲| 国产精品美女久久久久久久| 波多野结衣中文字幕一区 | 亚洲一区二区美女| 欧美日韩免费电影| 日韩电影在线免费| 精品卡一卡二卡三卡四在线| 国产成人在线色| 亚洲欧洲成人精品av97| 91成人免费在线| 日韩国产精品91| 欧美α欧美αv大片| 国产精品一区专区| 亚洲激情第一区| 宅男噜噜噜66一区二区66| 久久 天天综合| 国产免费观看久久| 色香蕉久久蜜桃| 日韩国产在线观看一区| 久久综合色婷婷| 一本色道久久综合精品竹菊| 天天av天天翘天天综合网色鬼国产| 日韩一卡二卡三卡国产欧美| 国产99精品国产| 亚洲成av人影院在线观看网|