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

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

?? gf2x.txt

?? NTL is a high-performance, portable C++ library providing data structures and algorithms for manipul
?? TXT
?? 第 1 頁 / 共 2 頁
字號(hào):

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

MODULE: GF2X

SUMMARY:

The class GF2X implements polynomial arithmetic modulo 2.

Polynomial arithmetic is implemented using a combination of classical
routines and Karatsuba.

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

#include <NTL/GF2.h>
#include <NTL/vec_GF2.h>

class GF2X {
public:

   GF2X(); // initial value 0

   GF2X(const GF2X& a); // copy

   GF2X& operator=(const GF2X& a); // assignment
   GF2X& operator=(GF2 a); 
   GF2X& operator=(long a); 

   ~GF2X(); // destructor

   GF2X(long i, GF2 c); // initialize to X^i*c
   GF2X(long i, long c); 
   
};


// SIZE INVARIANT: for any f in GF2X, def(f)+1 < 2^(NTL_BITS_PER_LONG-4).



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

                                  Comparison

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


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

long IsZero(const GF2X& a); // test for 0
long IsOne(const GF2X& a); // test for 1

// PROMOTIONS: operators ==, != promote {long, GF2} to GF2X on (a, b)


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

                                   Addition

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

// operator notation:

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

GF2X operator-(const GF2X& a); // unary -

GF2X& operator+=(GF2X& x, const GF2X& a);
GF2X& operator+=(GF2X& x, GF2 a);
GF2X& operator+=(GF2X& x, long a);

GF2X& operator-=(GF2X& x, const GF2X& a);
GF2X& operator-=(GF2X& x, GF2 a);
GF2X& operator-=(GF2X& x, long a);

GF2X& operator++(GF2X& x);  // prefix
void operator++(GF2X& x, int);  // postfix

GF2X& operator--(GF2X& x);  // prefix
void operator--(GF2X& x, int);  // postfix

// procedural versions:


void add(GF2X& x, const GF2X& a, const GF2X& b); // x = a + b
void sub(GF2X& x, const GF2X& a, const GF2X& b); // x = a - b
void negate(GF2X& x, const GF2X& a); // x = -a

// PROMOTIONS: binary +, - and procedures add, sub promote {long, GF2}
// to GF2X on (a, b).


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

                               Multiplication

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

// operator notation:

GF2X operator*(const GF2X& a, const GF2X& b);

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

// procedural versions:

void mul(GF2X& x, const GF2X& a, const GF2X& b); // x = a * b

void sqr(GF2X& x, const GF2X& a); // x = a^2
GF2X sqr(const GF2X& a);

// PROMOTIONS: operator * and procedure mul promote {long, GF2} to GF2X
// on (a, b).


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

                               Shift Operations

LeftShift by n means multiplication by X^n
RightShift by n means division by X^n

A negative shift amount reverses the direction of the shift.

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

// operator notation:

GF2X operator<<(const GF2X& a, long n);
GF2X operator>>(const GF2X& a, long n);

GF2X& operator<<=(GF2X& x, long n);
GF2X& operator>>=(GF2X& x, long n);

// procedural versions:

void LeftShift(GF2X& x, const GF2X& a, long n); 
GF2X LeftShift(const GF2X& a, long n);

void RightShift(GF2X& x, const GF2X& a, long n); 
GF2X RightShift(const GF2X& a, long n); 

void MulByX(GF2X& x, const GF2X& a); 
GF2X MulByX(const GF2X& a); 


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

                                  Division

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

// operator notation:

GF2X operator/(const GF2X& a, const GF2X& b);
GF2X operator%(const GF2X& a, const GF2X& b);

GF2X& operator/=(GF2X& x, const GF2X& a);
GF2X& operator/=(GF2X& x, GF2 a);
GF2X& operator/=(GF2X& x, long a);

GF2X& operator%=(GF2X& x, const GF2X& b);


// procedural versions:


void DivRem(GF2X& q, GF2X& r, const GF2X& a, const GF2X& b);
// q = a/b, r = a%b

void div(GF2X& q, const GF2X& a, const GF2X& b);
// q = a/b

void rem(GF2X& r, const GF2X& a, const GF2X& b);
// r = a%b

long divide(GF2X& q, const GF2X& a, const GF2X& b);
// if b | a, sets q = a/b and returns 1; otherwise returns 0

long divide(const GF2X& a, const GF2X& b);
// if b | a, sets q = a/b and returns 1; otherwise returns 0

// PROMOTIONS: operator / and procedure div promote {long, GF2} to GF2X
// on (a, b).


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

                                   GCD's

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


void GCD(GF2X& x, const GF2X& a, const GF2X& b);
GF2X GCD(const GF2X& a, const GF2X& b); 
// x = GCD(a, b) (zero if a==b==0).


void XGCD(GF2X& d, GF2X& s, GF2X& t, const GF2X& a, const GF2X& b);
// d = gcd(a,b), a s + b t = d 


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

                                  Input/Output

I/O format:

   [a_0 a_1 ... a_n],

represents the polynomial a_0 + a_1*X + ... + a_n*X^n.

On output, all coefficients will be 0 or 1, and
a_n not zero (the zero polynomial is [ ]).  On input, the coefficients
may be arbitrary integers which are reduced modulo 2, and leading zeros
stripped.

There is also a more compact hex I/O format.  To output in this
format, set GF2X::HexOutput to a nonzero value.  On input, if the first
non-blank character read is 'x' or 'X', then a hex format is assumed.


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

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


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

                              Some utility routines

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

long deg(const GF2X& a);  // return deg(a); deg(0) == -1.

GF2 coeff(const GF2X& a, long i);
// returns the coefficient of X^i, or zero if i not in range

GF2 LeadCoeff(const GF2X& a);
// returns leading term of a, or zero if a == 0

GF2 ConstTerm(const GF2X& a);
// returns constant term of a, or zero if a == 0

void SetCoeff(GF2X& x, long i, GF2 a);
void SetCoeff(GF2X& x, long i, long a);
// makes coefficient of X^i equal to a; error is raised if i < 0

void SetCoeff(GF2X& x, long i);
// makes coefficient of X^i equal to 1;  error is raised if i < 0

void SetX(GF2X& x); // x is set to the monomial X

long IsX(const GF2X& a); // test if x = X

void diff(GF2X& x, const GF2X& a);
GF2X diff(const GF2X& a); 
// x = derivative of a


void reverse(GF2X& x, const GF2X& a, long hi);
GF2X reverse(const GF2X& a, long hi);

void reverse(GF2X& x, const GF2X& a);
GF2X reverse(const GF2X& a);

// x = reverse of a[0]..a[hi] (hi >= -1);
// hi defaults to deg(a) in second version


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

// Note that there is also a conversion routine from GF2X to vec_GF2
// that makes the length of the vector match the number of coefficients
// of the polynomial.

long weight(const GF2X& a);
// returns the # of nonzero coefficients in a

void GF2XFromBytes(GF2X& x, const unsigned char *p, long n);
GF2X GF2XFromBytes(const unsigned char *p, long n);
// conversion from byte vector to polynomial.
// x = sum(p[i]*X^(8*i), i = 0..n-1), where the bits of p[i] are interpretted
// as a polynomial in the natural way (i.e., p[i] = 1 is interpretted as 1,
// p[i] = 2 is interpretted as X, p[i] = 3 is interpretted as X+1, etc.).
// In the unusual event that characters are wider than 8 bits,
// only the low-order 8 bits of p[i] are used.

void BytesFromGF2X(unsigned char *p, const GF2X& a, long n);
// conversion from polynomial to byte vector.
// p[0..n-1] are computed so that 
//     a = sum(p[i]*X^(8*i), i = 0..n-1) mod X^(8*n),
// where the values p[i] are interpretted as polynomials as in GF2XFromBytes
// above.

long NumBits(const GF2X& a);
// returns number of bits of a, i.e., deg(a) + 1.

long NumBytes(const GF2X& a);
// returns number of bytes of a, i.e., floor((NumBits(a)+7)/8)




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

                             Random Polynomials

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

void random(GF2X& x, long n);
GF2X random_GF2X(long n);
// x = random polynomial of degree < n 



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

                       Arithmetic mod X^n

Required: n >= 0; otherwise, an error is raised.

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

void trunc(GF2X& x, const GF2X& a, long n); // x = a % X^n
GF2X trunc(const GF2X& a, long n); 

void MulTrunc(GF2X& x, const GF2X& a, const GF2X& b, long n);
GF2X MulTrunc(const GF2X& a, const GF2X& b, long n);
// x = a * b % X^n

void SqrTrunc(GF2X& x, const GF2X& a, long n);
GF2X SqrTrunc(const GF2X& a, long n);
// x = a^2 % X^n

void InvTrunc(GF2X& x, const GF2X& a, long n);
GF2X InvTrunc(const GF2X& a, long n);
// computes x = a^{-1} % X^n.  Must have ConstTerm(a) invertible.

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

                Modular Arithmetic (without pre-conditioning)

Arithmetic mod f.

All inputs and outputs are polynomials of degree less than deg(f), and
deg(f) > 0.

NOTE: if you want to do many computations with a fixed f, use the
GF2XModulus data structure and associated routines below for better
performance.

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

void MulMod(GF2X& x, const GF2X& a, const GF2X& b, const GF2X& f);
GF2X MulMod(const GF2X& a, const GF2X& b, const GF2X& f);
// x = (a * b) % f

void SqrMod(GF2X& x, const GF2X& a, const GF2X& f);
GF2X SqrMod(const GF2X& a, const GF2X& f);
// x = a^2 % f

void MulByXMod(GF2X& x, const GF2X& a, const GF2X& f);
GF2X MulByXMod(const GF2X& a, const GF2X& f);
// x = (a * X) mod f

void InvMod(GF2X& x, const GF2X& a, const GF2X& f);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美女脱光内衣内裤视频久久网站| 97久久精品人人做人人爽| 一片黄亚洲嫩模| 国产精品国产三级国产| 亚洲精品中文在线| 日韩国产在线观看一区| 婷婷综合久久一区二区三区| 亚洲国产日韩在线一区模特| 看电视剧不卡顿的网站| 经典三级视频一区| 床上的激情91.| 久久亚洲综合色| 午夜精品久久久久久| 美女一区二区在线观看| 国产91对白在线观看九色| 欧美视频自拍偷拍| 国产精品毛片久久久久久| 亚洲精品乱码久久久久久久久| 精品一区二区三区在线观看国产| 波多野结衣中文字幕一区| 欧美视频精品在线观看| 亚洲精品中文在线观看| 成人18视频在线播放| 欧美日韩日日骚| 午夜精品影院在线观看| 日本黄色一区二区| 国产精品乱码久久久久久 | 奇米影视一区二区三区| www.亚洲国产| 国产精品久线观看视频| 成人app在线观看| 久久久久久久久一| 亚洲一区二区三区四区五区黄| 国产自产视频一区二区三区| 日韩午夜精品电影| 国产高清成人在线| 欧美国产日韩a欧美在线观看| 丁香婷婷深情五月亚洲| 国产精品毛片大码女人| 欧美在线观看视频一区二区| 洋洋av久久久久久久一区| 97精品国产露脸对白| 午夜视频在线观看一区| 欧美二区乱c少妇| 国产伦精品一区二区三区免费迷 | 99久久精品免费看| 午夜婷婷国产麻豆精品| 日韩精品最新网址| 99精品视频在线免费观看| 一区二区高清在线| 久久色在线视频| 欧美日韩一区二区三区在线看| 精东粉嫩av免费一区二区三区| 亚洲欧美日韩国产综合在线| 久久女同互慰一区二区三区| 一本大道av伊人久久综合| 国产综合久久久久影院| 欧美aaaaaa午夜精品| 亚洲国产视频一区二区| 亚洲欧美综合另类在线卡通| 欧美不卡视频一区| 9191久久久久久久久久久| 91在线国产福利| 国产成人在线免费观看| 美女www一区二区| 久久福利视频一区二区| 首页欧美精品中文字幕| 亚洲精品久久嫩草网站秘色| 国产欧美一二三区| 国产精品视频观看| 中文字幕欧美一| 亚洲日本中文字幕区| 亚洲乱码中文字幕| 天天操天天干天天综合网| 亚洲一区二区成人在线观看| 热久久国产精品| 国产精品99久| 99视频精品免费视频| 欧美精品在线视频| 国产无人区一区二区三区| 久久久不卡网国产精品一区| 久久久午夜精品| 亚洲天堂av一区| 视频一区二区不卡| 一本大道av伊人久久综合| 日韩一级精品视频在线观看| 久久综合丝袜日本网| 亚洲国产aⅴ天堂久久| 国产宾馆实践打屁股91| 91色.com| 中文字幕成人av| 极品瑜伽女神91| 欧美综合视频在线观看| 国产精品高潮呻吟| 国产精品88888| 欧美日韩精品综合在线| 一区精品在线播放| 国产精一品亚洲二区在线视频| 欧美二区三区的天堂| 午夜精品一区二区三区电影天堂| 99久久精品国产精品久久| 日本一区二区综合亚洲| 国产伦精品一区二区三区免费 | 久久精品一区蜜桃臀影院| 亚洲国产欧美日韩另类综合| 国产成人一区在线| 国产日产欧美一区| 经典三级视频一区| 欧美绝品在线观看成人午夜影视| 亚洲精品乱码久久久久| 色乱码一区二区三区88 | 91麻豆蜜桃一区二区三区| 国产精品久久免费看| 成人性生交大片| 欧美www视频| 色琪琪一区二区三区亚洲区| 国产精品乱码久久久久久 | 亚洲成人免费视| 国产校园另类小说区| 国产69精品久久99不卡| 一区二区三区免费观看| 欧美一区二区三区在线看| 精品一区二区在线免费观看| 亚洲国产高清不卡| 精品视频1区2区| 激情文学综合丁香| 亚洲精品乱码久久久久久久久| 久久综合一区二区| 欧美福利一区二区| 日本精品裸体写真集在线观看 | 亚洲综合在线观看视频| 777欧美精品| 91豆麻精品91久久久久久| 久久99热这里只有精品| 亚洲美女免费在线| 国产偷国产偷精品高清尤物| 欧美日韩午夜精品| 91亚洲精品乱码久久久久久蜜桃| 免费精品99久久国产综合精品| 亚洲丝袜制服诱惑| 国产欧美一区在线| 国产欧美日韩在线观看| 日韩欧美一级二级三级| 日韩精品一区二区三区视频在线观看 | 欧美一区二区视频在线观看2020| 成人免费观看男女羞羞视频| 国产成人精品影视| 国产精品1区二区.| 国产v日产∨综合v精品视频| 日本网站在线观看一区二区三区 | 国产精品一级黄| 成年人国产精品| 欧美性猛片xxxx免费看久爱 | 日韩不卡手机在线v区| 精品午夜一区二区三区在线观看| 麻豆精品新av中文字幕| 美女脱光内衣内裤视频久久网站 | 国产一区二区精品久久99| 色94色欧美sute亚洲线路一ni | 欧美精品日韩精品| 2021中文字幕一区亚洲| 亚洲另类一区二区| 亚洲人精品一区| 一区二区三区久久| 日本电影欧美片| 美女一区二区三区在线观看| 日韩精品在线看片z| 日韩高清不卡在线| 91麻豆精品国产无毒不卡在线观看| 最新国产の精品合集bt伙计| 91污在线观看| 日本一二三不卡| 国产白丝精品91爽爽久久| 精品久久久影院| 国产不卡在线播放| 国产精品无码永久免费888| 成人性生交大片免费看在线播放| 精品国产一区a| 成人综合婷婷国产精品久久蜜臀| 日韩久久一区二区| 欧美视频一二三区| 男女男精品网站| 中国色在线观看另类| 欧美在线啊v一区| 精品亚洲成a人在线观看| 一区二区三区四区精品在线视频| 欧美日韩一卡二卡三卡| 国内外成人在线视频| 欧美激情中文字幕| 一本大道久久a久久精品综合| 午夜视频一区二区三区| 欧美大片在线观看一区| 91视频xxxx| 成人黄色777网| 午夜不卡av免费| 亚洲激情一二三区| 欧美v日韩v国产v| 欧美va亚洲va香蕉在线| 精品婷婷伊人一区三区三| 成人国产精品免费网站|