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

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

?? vec_gf2.txt

?? 大數運算類
?? TXT
字號:

/**************************************************************************\

MODULE: vec_GF2

SUMMARY:

a vec_GF2 is a vector of GF2s that behaves much like generic NTL vectors
(see vector.txt), but there are some differences.

For efficiency, elements of a vec_GF2 are "packed" into a word.
One may use subscript notation v[i] or v(i) as an r-value
in an expression, and as an l-value in the following contexts:
   * on the left-hand side of an assignment operator,  
   * on the left-hand side of +=, -=, *=, /=, 
   * and as an argument to ++ and --.

One may not use the expression v[i] or v(i) to initialize 
a non-const reference parameter.  

For example, if v, w are vec_GF2's, you can write:

   v[i] = 0;
   v[i] = v[j] + w[k];
   v[i] += 1;
   v[i]++;
   v[i] += w[i];

It is perhaps helpful to describe how this is implemented,
without going into all the details.
The type of a subscript-expression is "subscript_GF2" or
"const_subscript_GF2", the latter chosen if the vector is read-only.
Both of these "helper" types have automatic conversions 
operators to GF2.  Moreover, assignment and increment operators
are defined for "subscript_GF2" (but not for "const_subscript_GF2").
These operators return references to themselves, so one can
iterate assignment operators as usual (as usual in NTL, 
the return type of post-increment/decrement is void).

As an alternative, one can use the get and put methods below to access
vector elements.

There is one subtle but important difference in the semantics
of vec_GF2 and that of generic NTL vectors.  With a vec_GF2, whenever its
length is increased (via SetLength), the "new" bits are always 0.
For example, if v.length() == 20, then 

   v.SetLength(10); v.setLength(20);

will effectively clear bits 10..19 of v.
This is quite different from the semantics of generic NTL vectors, where
the above sequence would not change the value of v at all.
One has to be aware of this difference, but it will not matter
in most ordinary circumstances.


\**************************************************************************/



class vec_GF2 {

public:

   vec_GF2(); // 0 length vector
   vec_GF2(INIT_SIZE_TYPE, long n); // initialize to length n
                                      // usage: vec_GF2(INIT_SIZE, n)

   vec_GF2(const vec_GF2& a); // copy constructor
   vec_GF2& operator=(const vec_GF2& a); // assignment
   ~vec_GF2(); // destructor

   void SetLength(long n); // set length to n bits
   void SetMaxLength(long n); // allocate space for n bits

   long length() const; // current length, in bits

   long MaxLength() const; // maximum length, i.e., the maximum
                           // value passed to either SetLength or SetMaxLength
                           // since creation or last kill

   long allocated() const; // number of bits for which space is allocated;
                           // if n <= v.allocated(), then v.SetLength(n)
                           // will not result in any memory re-allocation.

   // INVARIANT: 
   //    length() <= MaxLength() <= allocated() < 2^(NTL_BITS_PER_LONG-4)

   

   void FixLength(long n); // fix length to n bits
      // can only be applied after default initialization or kill

   long fixed() const; // test if length has been fixed

   void kill(); // free space and make length 0

   GF2 get(long i) const; // fetch value at index i (indexing from 0)

   void put(long i, GF2 a); // write value a to index i (indexing from 0)
   void put(long i, long a); 

   // Here are the subscripting operators, defined using the
   // "helper" classes subscript_GF2 and const_subscript_GF2.

   subscript_GF2 operator[](long i);

   subscript_GF2 operator()(long i);

   const_subscript_GF2 operator[](long i) const;

   const_subscript_GF2 operator()(long i) const;

};


void swap(vec_GF2& x, vec_GF2& y);
// swap x and y (fast pointer swap)

void append(vec_GF2& v, GF2 a);
// append a to v

void append(vec_GF2& v, const vec_GF2& a);
// append a to v

// equality operators:

long operator==(const vec_GF2& a, const vec_GF2& b);
long operator!=(const vec_GF2& a, const vec_GF2& b);


// I/O operators:

ostream& operator<<(ostream& s, const vec_GF2& a);
istream& operator>>(istream& s, vec_GF2& a);

// The I/O format is [a_0 a_1 ... a_{n-1}], where each a_i is "0" or "1".
// On input, the a_i may be arbitrary integers, which are reduced mod 2.

// utility routines:

void clear(vec_GF2& x); // clear all bits--length unchanged
long IsZero(const vec_GF2& a); // test if all bits are zero

void shift(vec_GF2& x, const vec_GF2& a, long n);
vec_GF2 shift(const vec_GF2& a, long n);
// x = a shifted n places, where n may be positive or negative.
// Generally, x[i] = a[i-n], so positive n shifts to a higher index.
// The length of x is set to the length of a, and bits 
// are zero-filled or discarded as necessary.

void reverse(vec_GF2& x, const vec_GF2& a); // c = a reversed
vec_GF2 reverse(const vec_GF2& a);

long weight(const vec_GF2& a); // return number of 1 bits in a

void random(vec_GF2& x, long n);  // x = random vector of length n
vec_GF2 random_vec_GF2(long n);


// arithmetic operations over GF(2):

void add(vec_GF2& x, const vec_GF2& a, const vec_GF2& b);
void sub(vec_GF2& x, const vec_GF2& a, const vec_GF2& b);
void negate(vec_GF2& x, const vec_GF2& a);

void mul(vec_GF2& x, const vec_GF2& a, GF2 b);
void mul(vec_GF2& x, const vec_GF2& a, long b);

void mul(vec_GF2& x, GF2 a, const vec_GF2& b);
void mul(vec_GF2& x, long a, const vec_GF2& b);
// x = a * b

void InnerProduct(GF2& x, const vec_GF2& a, const vec_GF2& b);
// vectors may differ in length

void VectorCopy(vec_GF2& x, const vec_GF2& a, long n);
vec_GF2 VectorCopy(const vec_GF2& a, long n);
// x = a copy of a of length exactly n.
// The input is truncated or padded with zeroes, as necessary.



// arithmetic operator notation:

vec_GF2 operator+(const vec_GF2& a, const vec_GF2& b);
vec_GF2 operator-(const vec_GF2& a, const vec_GF2& b);
vec_GF2 operator-(const vec_GF2& a);

// scalar mul:

vec_GF2 operator*(const vec_GF2& a, GF2 b);
vec_GF2 operator*(const vec_GF2& a, long b);

vec_GF2 operator*(GF2 a, const vec_GF2& b); 
vec_GF2 operator*(long a, const vec_GF2& b); 

// inner product: 

inline GF2 operator*(const vec_GF2& a, const vec_GF2& b); 

// assignment operator notation:

vec_GF2& operator+=(vec_GF2& x, const vec_GF2& a);
vec_GF2& operator-=(vec_GF2& x, const vec_GF2& a);

vec_GF2& operator*=(vec_GF2& x, GF2 a);
vec_GF2& operator*=(vec_GF2& x, long a);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久毛片高清国产| 欧美日韩精品是欧美日韩精品| 国产亚洲欧美日韩在线一区| 狠狠色综合日日| 国产色婷婷亚洲99精品小说| av一区二区三区黑人| 亚洲三级电影全部在线观看高清| 91成人国产精品| 亚洲va欧美va天堂v国产综合| 91精品国产一区二区| 久久国产夜色精品鲁鲁99| 国产调教视频一区| 色一情一乱一乱一91av| 亚洲成人tv网| 久久亚洲捆绑美女| 91一区一区三区| 天堂成人国产精品一区| 精品国产sm最大网站免费看| 成人激情电影免费在线观看| 一区二区欧美视频| 91精品国产综合久久久久| 国产乱码精品一区二区三区五月婷| 国产精品国产三级国产普通话99 | 91精品国产手机| 国产精品一区二区三区四区| 亚洲视频一区二区在线| 欧美日韩国产美| 国模套图日韩精品一区二区| 亚洲人成精品久久久久久| 91精品国产91久久久久久最新毛片| 国产精品羞羞答答xxdd| 亚洲综合在线视频| 精品福利一区二区三区免费视频| 成人av免费在线观看| 婷婷一区二区三区| 欧美国产一区二区| 欧美性感一类影片在线播放| 国产一区二区调教| 亚洲主播在线观看| 久久先锋影音av鲁色资源| 色偷偷88欧美精品久久久| xvideos.蜜桃一区二区| 一本一道久久a久久精品| 日韩电影在线免费| 亚洲欧洲在线观看av| 欧美一卡二卡在线观看| a级精品国产片在线观看| 日韩中文字幕区一区有砖一区 | 亚洲欧洲国产专区| 欧美一区二区视频网站| 白白色 亚洲乱淫| 日本不卡一二三| 亚洲精品国产成人久久av盗摄| 欧美电影精品一区二区 | 不卡区在线中文字幕| 日韩国产欧美在线播放| 国产精品护士白丝一区av| 日韩免费视频一区二区| 在线观看亚洲精品视频| 成熟亚洲日本毛茸茸凸凹| 蜜桃av一区二区| 一区二区三区成人在线视频| 国产日产欧美一区二区视频| 久久国产精品露脸对白| 亚洲一区二区三区四区在线观看| 国产亚洲一区二区在线观看| 欧美久久一二三四区| 91亚洲精华国产精华精华液| 国产在线日韩欧美| 免费精品视频在线| 午夜精品久久久久久| 日韩理论电影院| 国产欧美精品一区aⅴ影院| 日韩视频一区二区| 欧美人xxxx| 91传媒视频在线播放| 不卡一卡二卡三乱码免费网站| 国产在线国偷精品免费看| 日韩精品午夜视频| 亚洲资源在线观看| 亚洲免费三区一区二区| 中文一区二区完整视频在线观看| 欧美成人aa大片| 制服视频三区第一页精品| 欧美性高清videossexo| 在线视频一区二区三| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 91麻豆swag| eeuss鲁片一区二区三区在线看| 国产自产v一区二区三区c| 日本视频在线一区| 日韩黄色在线观看| 亚洲国产成人av网| 亚洲与欧洲av电影| 亚洲精品国产高清久久伦理二区| 中文字幕在线免费不卡| 国产精品久久久久久久久图文区| 久久亚洲综合色一区二区三区| 日韩欧美一二三区| 日韩女同互慰一区二区| 日韩视频在线你懂得| 日韩欧美电影在线| 日韩欧美中文字幕公布| 欧美一激情一区二区三区| 欧美精品在线观看播放| 欧美电影一区二区| 欧美放荡的少妇| 日韩精品一区二区三区swag| 欧美电视剧在线看免费| 懂色av一区二区三区免费观看| 国产在线精品一区二区夜色| 国产中文字幕一区| 国产精品一区在线观看乱码 | 国产一区视频在线看| 韩国午夜理伦三级不卡影院| 久久国产精品色婷婷| 国产麻豆午夜三级精品| 国产精品一区专区| 成人黄色一级视频| 97久久精品人人做人人爽50路| 色综合久久久网| 欧美性猛交xxxxxxxx| 7777精品伊人久久久大香线蕉完整版 | 国产亚洲成年网址在线观看| 欧美激情一区二区| 国产精品久久久久久久久图文区 | 国产欧美综合在线| 中文字幕中文在线不卡住| 日韩美女精品在线| 亚洲综合免费观看高清在线观看| 亚洲一区二区三区四区在线| 日韩经典一区二区| 国产在线一区观看| av午夜一区麻豆| 欧美最猛性xxxxx直播| 91精品国产一区二区三区香蕉| 日韩视频免费观看高清完整版 | 91猫先生在线| 欧美日韩在线一区二区| 日韩一级片在线播放| 久久久无码精品亚洲日韩按摩| 国产精品三级视频| 一区二区三区色| 蜜臀av性久久久久蜜臀aⅴ| 韩国视频一区二区| 91在线精品一区二区| 欧美区一区二区三区| 精品国产免费视频| 亚洲色图20p| 日韩精品久久久久久| 国产精品电影一区二区| 一区二区三区四区不卡在线| 日韩电影一区二区三区四区| 国产精品自产自拍| 日本乱人伦aⅴ精品| 欧美一区二区三区免费大片| 国产日韩高清在线| 亚洲香肠在线观看| 国产精品自在在线| 色久综合一二码| 日韩精品一区二| 一区二区中文视频| 美女视频一区二区| 9人人澡人人爽人人精品| 欧美人伦禁忌dvd放荡欲情| 久久精品视频免费观看| 亚洲一二三四久久| 国产一区二区不卡老阿姨| 色美美综合视频| 精品国精品自拍自在线| 亚洲美女免费视频| 久久狠狠亚洲综合| 在线亚洲免费视频| 国产无一区二区| 午夜欧美视频在线观看| 成人精品视频一区二区三区尤物| 欧美手机在线视频| 欧美激情在线一区二区| 婷婷久久综合九色综合伊人色| 亚洲视频一区在线| 久久精品72免费观看| 色婷婷久久久亚洲一区二区三区| 欧美成人性战久久| 亚洲影视资源网| 处破女av一区二区| 日韩三级.com| 一区二区成人在线| 懂色中文一区二区在线播放| 欧美一级专区免费大片| 亚洲欧美日韩综合aⅴ视频| 精一区二区三区| 欧美三级中文字幕| 国产精品的网站| 精品一区二区精品| 欧美日韩免费观看一区二区三区| 国产人成一区二区三区影院| 日本成人在线网站| 欧美羞羞免费网站| 国产精品对白交换视频| 国产乱码精品一区二区三 |