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

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

?? bits.h

?? 粗慥集成算法集合 ,并有詳細(xì)的文檔資料和測(cè)試數(shù)據(jù)處
?? H
字號(hào):
//-------------------------------------------------------------------
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Revisions.....:
//===================================================================

#ifndef __BITS_H__
#define __BITS_H__

#include <copyright.h>

#include <kernel/basic/types.h>
#include <kernel/basic/string.h>
#include <kernel/basic/vector.h>

#include <kernel/system/stdlib.h>
#include <kernel/system/limits.h>
#include <kernel/system/iostream.h>

//-------------------------------------------------------------------
// Class.........: Bits
// Author........: Aleksander 豩rn
// Date..........:
// Description...: A vector of bits.
//
// Comments......: Consider introducing "memory pooling" techniques
//                 to reduce memory fragmentation.
// Revisions.....:
//===================================================================

class Bits {
public:

	//- Helper class...................................................
  class BitReference {
	private:

		//- Physical representation......................................
		Bits         *bits_;  // Bit vector that contains the bit this structure refers to.
    int           index_; // Logical index of bit.

		//- Constructors.................................................
    BitReference() {bits_ = NULL; index_ = 0;}

	public:

		//- Constructors/destructor......................................
		BitReference(Bits *bits, int index) {bits_ = bits; index_ = index;}
		~BitReference() {}

		//- Conversion operators.........................................
		operator bool() const {return bits_->GetState(index_);}

		//- Assignment operators.........................................
		bool          operator=(bool state) {bits_->SetState(index_, state); return state;}
		bool          operator=(const BitReference &in) {bool state = (bool) in; *this = state; return state;}

	};

	//- Type definitions...............................................
	typedef unsigned int Block;

	//- Platform specific constants....................................
#if defined(WIN32)
	enum {BYTES_PER_BLOCK = 4,   // sizeof(Block)
				BITS_PER_BLOCK  = 32}; // CHAR_BIT * sizeof(Block)
#else
	#if defined(_MSC_VER)        // Microsoft Visual C++.
		#pragma message("Not 32-bit Windows, incurring slight overhead in Bits class.")
	#endif
	#define BYTES_PER_BLOCK sizeof(Block)
	#define BITS_PER_BLOCK  CHAR_BIT * sizeof(Block)
#endif

private:

	//- Internal representation........................................
  Block          *blocks_;     // Array of blocks that contain bits.
	int             no_blocks_;  // Length of block buffer.
	int             no_bits_;    // Logical length of bit vector.

private:

	//- Helper methods.................................................
	int             GetBlock(int i) const {return i / BITS_PER_BLOCK;}
	int             GetOffset(int i) const {return i % BITS_PER_BLOCK;}

	bool            Resize(int no_bits, bool preserve);
	bool            UpdateLastBlock();

public:

	//- Constructors/destructor........................................
  Bits();
  Bits(int no_bits, bool state);
	Bits(const String &text, char on = '1', const String &delimiters = ", \t\n");
  Bits(const Bits &bits);
	Bits(const Vector(bool) &v);
	Bits(const Vector(int) &v, int size);
  ~Bits();

	//- Dimensional methods............................................
  int             GetSize() const {return no_bits_;}
  bool            IsEmpty() const {return (GetSize() == 0);}

	//- Access methods.................................................
	bool            GetState(int i) const {return ((blocks_[GetBlock(i)] & (((Block) 1) << GetOffset(i))) != 0);}
	bool            SetState(int i, bool state);

	//- Creation methods...............................................
	bool            Create(const String &text, char on = '1', const String &delimiters = ", \t\n");
	bool            Create(const Vector(bool) &v);

	//- Assignment operators...........................................
  Bits           &operator=(const Bits &in);
  Bits           &operator=(bool state);

	//- Bracket operators..............................................
  bool            operator[](int i) const {return GetState(i);}
  BitReference    operator[](int i) {return BitReference(this, i);}

	//- Set operators..................................................
  Bits            operator|(const Bits &x) const;
  Bits            operator&(const Bits &x) const;
  Bits            operator-(const Bits &x) const;
  Bits            operator^(const Bits &x) const;

  friend Bits     operator~(const Bits &x);

	//- Equality and subset operators..................................
  bool            operator==(const Bits &x) const;
  bool            operator!=(const Bits &x) const;
  bool            operator< (const Bits &x) const;
  bool            operator<=(const Bits &x) const;
  bool            operator> (const Bits &x) const;
  bool            operator>=(const Bits &x) const;

  bool            operator==(bool state);
  bool            operator!=(bool state);

	//- Stream operators...............................................
  friend ostream &operator<<(ostream &stream, const Bits &x);
  friend istream &operator>>(istream &stream, Bits &x);

	//- Operations on self.............................................
  Bits           &operator|=(const Bits &x);
  Bits           &operator&=(const Bits &x);
  Bits           &operator-=(const Bits &x);
  Bits           &operator^=(const Bits &x);

	bool            Invert();
	bool            Invert(int i);

	bool            Reverse();

	//- Status methods.................................................
	int             Count(bool state) const;

	//- Query methods .................................................
	bool            Intersects(const Bits &in) const;
	int             Compare(const Bits &in) const;

	//- Formatting.....................................................
	bool            Format(String &formatted, char on = '1', char off = '0', const String &delimiter = "") const;
	String          Format(char on = '1', char off = '0', const String &delimiter = "") const;

	//- Miscellaneous..................................................
	bool            GetVector(Vector(int) &v) const;

};

//-------------------------------------------------------------------
// Global operators.
//===================================================================

//-------------------------------------------------------------------
// Method........: operator ~
// Author........: Aleksander 豩rn
// Date..........:
// Description...: Complement
// Comments......:
// Revisions.....:
//===================================================================

inline Bits
operator~(const Bits &x) {
	Bits z(x);
	z.Invert();
	return z;
}

#endif

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本一区二区电影| 中文av一区二区| 国产成人av一区| 亚洲一区二区三区小说| 精品久久国产老人久久综合| 色综合久久88色综合天天免费| 奇米影视在线99精品| 亚洲人成精品久久久久久| 2020国产精品久久精品美国| 欧美天天综合网| av中文字幕一区| 国产一区二区三区精品欧美日韩一区二区三区| 亚洲青青青在线视频| 国产欧美日韩久久| 日韩欧美一级特黄在线播放| 欧美中文字幕一二三区视频| 成人免费观看视频| 国内精品国产成人| 日本va欧美va瓶| 亚洲超碰97人人做人人爱| 成人欧美一区二区三区| 国产欧美在线观看一区| 久久综合九色综合97婷婷| 欧美日本一道本在线视频| 一本一道综合狠狠老| 国产大陆a不卡| 国产呦精品一区二区三区网站| 日韩成人免费电影| 三级影片在线观看欧美日韩一区二区| 亚洲毛片av在线| 国产精品久久看| 国产精品久久久久久久午夜片| 久久久久久久久久久电影| 欧美tk丨vk视频| 精品国产一二三| 日韩欧美综合在线| 日韩女优电影在线观看| 日韩欧美区一区二| 日韩女优av电影| 精品国产一区二区亚洲人成毛片| 日韩欧美精品三级| 久久亚洲综合色一区二区三区| 精品国产一区二区三区四区四 | 国产亚洲精品bt天堂精选| 精品国产99国产精品| 精品国产91洋老外米糕| 久久久不卡影院| 国产精品视频免费看| 一区在线观看免费| 亚洲三级免费观看| 亚洲一卡二卡三卡四卡五卡| 成人av影视在线观看| 成人午夜又粗又硬又大| 99久久婷婷国产综合精品 | 亚洲精品一区二区精华| 精品国产不卡一区二区三区| 久久综合久久综合久久| 欧美经典一区二区| 亚洲欧洲99久久| 亚洲图片欧美一区| 日韩不卡一二三区| 韩国精品久久久| 99久久亚洲一区二区三区青草| 色综合久久久久网| 欧美一区二区三区婷婷月色| 精品卡一卡二卡三卡四在线| 国产精品久久影院| 亚洲一区二区精品视频| 美女视频一区在线观看| 国产成人日日夜夜| 一本色道久久综合亚洲aⅴ蜜桃| 欧美性色欧美a在线播放| 欧美一区二区三区免费视频 | 免费看黄色91| 国产激情一区二区三区四区| 色视频一区二区| 日韩精品中文字幕一区二区三区| 国产欧美日本一区二区三区| 一区二区三区国产豹纹内裤在线| 蜜芽一区二区三区| 成人18精品视频| 制服丝袜亚洲色图| 久久久蜜桃精品| 亚洲一区二区三区在线| 国内精品自线一区二区三区视频| 97久久精品人人做人人爽| 欧美日韩国产一区二区三区地区| 26uuuu精品一区二区| 亚洲欧美日韩人成在线播放| 久久99精品久久久久婷婷| 97se亚洲国产综合自在线| 日韩一区二区三区视频在线观看| 中文字幕一区二区三区四区 | 久久久久国产精品麻豆| 亚洲五码中文字幕| 成人黄色小视频在线观看| 欧美日本韩国一区| 中文字幕电影一区| 日韩vs国产vs欧美| 日本乱码高清不卡字幕| 久久综合网色—综合色88| 亚洲电影第三页| 91在线一区二区| 久久你懂得1024| 奇米在线7777在线精品 | 91啪亚洲精品| www久久久久| 日韩成人免费看| 欧美亚洲国产怡红院影院| 国产精品久久久一区麻豆最新章节| 麻豆国产欧美日韩综合精品二区| 欧美性一二三区| 日韩毛片高清在线播放| 东方aⅴ免费观看久久av| 精品蜜桃在线看| 日韩成人一区二区| 在线观看亚洲一区| 国产中文字幕精品| 欧美大白屁股肥臀xxxxxx| 午夜欧美视频在线观看| 欧美自拍丝袜亚洲| 自拍av一区二区三区| 福利电影一区二区| 久久九九99视频| 国产一区二区三区精品视频| 日韩欧美一卡二卡| 久久精品av麻豆的观看方式| 欧美一级一区二区| 日本中文一区二区三区| 欧美日韩第一区日日骚| 亚洲444eee在线观看| 欧美日韩在线直播| 亚洲国产视频一区二区| 欧美三区在线观看| 亚洲一级在线观看| 欧美日本国产视频| 午夜不卡av免费| 91精品久久久久久蜜臀| 日韩一区精品字幕| 欧美电影精品一区二区| 精品一区二区久久久| 久久综合色天天久久综合图片| 国产最新精品精品你懂的| 久久免费午夜影院| 国v精品久久久网| 中文字幕日韩精品一区| 91免费看`日韩一区二区| 尤物视频一区二区| 欧美猛男男办公室激情| 久久综合综合久久综合| 久久夜色精品国产噜噜av| 国产高清成人在线| 亚洲欧美一区二区不卡| 欧美喷潮久久久xxxxx| 日韩不卡一二三区| 久久精品综合网| 91网站视频在线观看| 亚洲一区二区美女| 日韩午夜在线观看| 成人深夜在线观看| 一区二区三区在线免费播放| 在线电影国产精品| 国内久久精品视频| 亚洲女爱视频在线| 欧美美女一区二区三区| 理论电影国产精品| 中文字幕一区二区三区不卡在线| 色狠狠色狠狠综合| 热久久国产精品| 国产精品人妖ts系列视频| 欧美影院一区二区| 国产一区在线视频| 一区二区三区在线视频观看58| 欧美一区二区成人6969| 成人午夜短视频| 午夜免费久久看| 国产日产欧美一区二区视频| 在线视频欧美精品| 老司机精品视频导航| 亚洲色图都市小说| 精品国产免费久久| 色综合天天综合在线视频| 九色porny丨国产精品| 亚洲色欲色欲www在线观看| 欧美一区二区三区免费在线看| fc2成人免费人成在线观看播放| 日韩福利电影在线| 成人免费在线播放视频| 欧美一级搡bbbb搡bbbb| 一本高清dvd不卡在线观看| 韩国视频一区二区| 亚洲国产精品久久人人爱| 国产精品网站导航| 欧美mv日韩mv亚洲| 在线一区二区视频| 成人激情综合网站| 国产一区在线视频| 欧美日韩一区高清| 99久久久无码国产精品| 韩国一区二区在线观看|