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

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

?? zz_px.h

?? 密碼大家Shoup寫的數論算法c語言實現
?? H
?? 第 1 頁 / 共 3 頁
字號:
#ifndef NTL_ZZ_pX__H#define NTL_ZZ_pX__H#include <NTL/vector.h>#include <NTL/ZZ_p.h>#include <NTL/vec_ZZ.h>#include <NTL/vec_ZZ_p.h>#include <NTL/FFT.h>NTL_OPEN_NNS// some cross-over points// macros are used so as to be consistent with zz_pX #define NTL_ZZ_pX_FFT_CROSSOVER (20)  #define NTL_ZZ_pX_NEWTON_CROSSOVER (45)#define NTL_ZZ_pX_DIV_CROSSOVER (90)#define NTL_ZZ_pX_HalfGCD_CROSSOVER (25)#define NTL_ZZ_pX_GCD_CROSSOVER (180)#define NTL_ZZ_pX_BERMASS_CROSSOVER (90)#define NTL_ZZ_pX_TRACE_CROSSOVER (90)/************************************************************                         ZZ_pXThe class ZZ_pX implements polynomial arithmetic modulo p.Polynomials are represented as vec_ZZ_p's.If f is a ZZ_pX, then f.rep is a vec_ZZ_p.The zero polynomial is represented as a zero length vector.Otherwise. f.rep[0] is the constant-term, and f.rep[f.rep.length()-1]is the leading coefficient, which is always non-zero.The member f.rep is public, so the vector representation is fullyaccessible.Use the member function normalize() to strip leading zeros.**************************************************************/class ZZ_pX {public:typedef vec_ZZ_p VectorBaseType; vec_ZZ_p rep;/***************************************************************          Constructors, Destructors, and Assignment****************************************************************/ZZ_pX()//  initial value 0   { }ZZ_pX(INIT_SIZE_TYPE, long n) { rep.SetMaxLength(n); }ZZ_pX(const ZZ_pX& a) : rep(a.rep) { }// initial value is aZZ_pX& operator=(const ZZ_pX& a)    { rep = a.rep; return *this; }~ZZ_pX() { }void normalize();// strip leading zerosvoid SetMaxLength(long n) // pre-allocate space for n coefficients.// Value is unchanged   { rep.SetMaxLength(n); }void kill() // free space held by this polynomial.  Value becomes 0.   { rep.kill(); }static const ZZ_pX& zero();ZZ_pX(ZZ_pX& x, INIT_TRANS_TYPE) : rep(x.rep, INIT_TRANS) { }inline ZZ_pX(long i, const ZZ_p& c);inline ZZ_pX(long i, long c);ZZ_pX& operator=(long a);ZZ_pX& operator=(const ZZ_p& a);};/********************************************************************                           input and outputI/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 integers between 0 and p-1,amd a_n not zero (the zero polynomial is [ ]).On input, the coefficients are arbitrary integers which arethen reduced modulo p, and leading zeros stripped.*********************************************************************/NTL_SNS istream& operator>>(NTL_SNS istream& s, ZZ_pX& x);NTL_SNS ostream& operator<<(NTL_SNS ostream& s, const ZZ_pX& a);/**********************************************************                   Some utility routines***********************************************************/inline long deg(const ZZ_pX& a) { return a.rep.length() - 1; }// degree of a polynomial.// note that the zero polynomial has degree -1.const ZZ_p& coeff(const ZZ_pX& a, long i);// zero if i not in rangevoid GetCoeff(ZZ_p& x, const ZZ_pX& a, long i);// x = a[i], or zero if i not in rangeconst ZZ_p& LeadCoeff(const ZZ_pX& a);// zero if a == 0const ZZ_p& ConstTerm(const ZZ_pX& a);// zero if a == 0void SetCoeff(ZZ_pX& x, long i, const ZZ_p& a);// x[i] = a, error is raised if i < 0void SetCoeff(ZZ_pX& x, long i, long a);void SetCoeff(ZZ_pX& x, long i);// x[i] = 1, error is raised if i < 0inline ZZ_pX::ZZ_pX(long i, const ZZ_p& a)   { SetCoeff(*this, i, a); } inline ZZ_pX::ZZ_pX(long i, long a)   { SetCoeff(*this, i, a); } void SetX(ZZ_pX& x);// x is set to the monomial Xlong IsX(const ZZ_pX& a);// test if x = Xinline void clear(ZZ_pX& x) // x = 0   { x.rep.SetLength(0); }inline void set(ZZ_pX& x)// x = 1   { x.rep.SetLength(1); set(x.rep[0]); }inline void swap(ZZ_pX& x, ZZ_pX& y)// swap x & y (only pointers are swapped)   { swap(x.rep, y.rep); }void random(ZZ_pX& x, long n);inline ZZ_pX random_ZZ_pX(long n)   { ZZ_pX x; random(x, n); NTL_OPT_RETURN(ZZ_pX, x); }// generate a random polynomial of degree < n void trunc(ZZ_pX& x, const ZZ_pX& a, long m);// x = a % X^minline ZZ_pX trunc(const ZZ_pX& a, long m)   { ZZ_pX x; trunc(x, a, m); NTL_OPT_RETURN(ZZ_pX, x); }void RightShift(ZZ_pX& x, const ZZ_pX& a, long n);// x = a/X^ninline ZZ_pX RightShift(const ZZ_pX& a, long n)   { ZZ_pX x; RightShift(x, a, n); NTL_OPT_RETURN(ZZ_pX, x); }void LeftShift(ZZ_pX& x, const ZZ_pX& a, long n);// x = a*X^ninline ZZ_pX LeftShift(const ZZ_pX& a, long n)   { ZZ_pX x; LeftShift(x, a, n); NTL_OPT_RETURN(ZZ_pX, x); }#ifndef NTL_TRANSITIONinline ZZ_pX operator>>(const ZZ_pX& a, long n)   { ZZ_pX x; RightShift(x, a, n); NTL_OPT_RETURN(ZZ_pX, x); }inline ZZ_pX operator<<(const ZZ_pX& a, long n)   { ZZ_pX x; LeftShift(x, a, n); NTL_OPT_RETURN(ZZ_pX, x); }inline ZZ_pX& operator<<=(ZZ_pX& x, long n)   { LeftShift(x, x, n); return x; }inline ZZ_pX& operator>>=(ZZ_pX& x, long n)   { RightShift(x, x, n); return x; }#endifvoid diff(ZZ_pX& x, const ZZ_pX& a);// x = derivative of ainline ZZ_pX diff(const ZZ_pX& a)   { ZZ_pX x; diff(x, a); NTL_OPT_RETURN(ZZ_pX, x); }void MakeMonic(ZZ_pX& x);void reverse(ZZ_pX& c, const ZZ_pX& a, long hi);inline ZZ_pX reverse(const ZZ_pX& a, long hi)   { ZZ_pX x; reverse(x, a, hi); NTL_OPT_RETURN(ZZ_pX, x); }inline void reverse(ZZ_pX& c, const ZZ_pX& a){  reverse(c, a, deg(a)); }inline ZZ_pX reverse(const ZZ_pX& a)   { ZZ_pX x; reverse(x, a); NTL_OPT_RETURN(ZZ_pX, x); }inline void VectorCopy(vec_ZZ_p& x, const ZZ_pX& a, long n)   { VectorCopy(x, a.rep, n); }inline vec_ZZ_p VectorCopy(const ZZ_pX& a, long n)   { return VectorCopy(a.rep, n); }/*******************************************************************                        conversion routines********************************************************************/void conv(ZZ_pX& x, long a);void conv(ZZ_pX& x, const ZZ& a);void conv(ZZ_pX& x, const ZZ_p& a);void conv(ZZ_pX& x, const vec_ZZ_p& a);inline ZZ_pX to_ZZ_pX(long a)   { ZZ_pX x; conv(x, a); NTL_OPT_RETURN(ZZ_pX, x); }inline ZZ_pX to_ZZ_pX(const ZZ& a)   { ZZ_pX x; conv(x, a); NTL_OPT_RETURN(ZZ_pX, x); }inline ZZ_pX to_ZZ_pX(const ZZ_p& a)   { ZZ_pX x; conv(x, a); NTL_OPT_RETURN(ZZ_pX, x); }inline ZZ_pX to_ZZ_pX(const vec_ZZ_p& a)   { ZZ_pX x; conv(x, a); NTL_OPT_RETURN(ZZ_pX, x); }/*************************************************************                        Comparison**************************************************************/long IsZero(const ZZ_pX& a); long IsOne(const ZZ_pX& a);inline long operator==(const ZZ_pX& a, const ZZ_pX& b){   return a.rep == b.rep;}inline long operator!=(const ZZ_pX& a, const ZZ_pX& b){   return !(a == b);}long operator==(const ZZ_pX& a, long b);long operator==(const ZZ_pX& a, const ZZ_p& b);inline long operator==(long a, const ZZ_pX& b) { return b == a; }inline long operator==(const ZZ_p& a, const ZZ_pX& b) { return b == a; }inline long operator!=(const ZZ_pX& a, long b) { return !(a == b); }inline long operator!=(const ZZ_pX& a, const ZZ_p& b) { return !(a == b); }inline long operator!=(long a, const ZZ_pX& b) { return !(a == b); }inline long operator!=(const ZZ_p& a, const ZZ_pX& b) { return !(a == b); }/***************************************************************                         Addition****************************************************************/void add(ZZ_pX& x, const ZZ_pX& a, const ZZ_pX& b);// x = a + bvoid sub(ZZ_pX& x, const ZZ_pX& a, const ZZ_pX& b);// x = a - bvoid negate(ZZ_pX& x, const ZZ_pX& a);// x = -a// scalar versionsvoid add(ZZ_pX& x, const ZZ_pX& a, const ZZ_p& b); // x = a + bvoid add(ZZ_pX& x, const ZZ_pX& a, long b);inline void add(ZZ_pX& x, const ZZ_p& a, const ZZ_pX& b) { add(x, b, a); }inline void add(ZZ_pX& x, long a, const ZZ_pX& b) { add(x, b, a); }void sub(ZZ_pX & x, const ZZ_pX& a, const ZZ_p& b); // x = a - bvoid sub(ZZ_pX& x, const ZZ_pX& a, long b);void sub(ZZ_pX& x, const ZZ_pX& a, const ZZ_p& b);void sub(ZZ_pX& x, long a, const ZZ_pX& b);void sub(ZZ_pX& x, const ZZ_p& a, const ZZ_pX& b);inline ZZ_pX operator+(const ZZ_pX& a, const ZZ_pX& b)   { ZZ_pX x; add(x, a, b); NTL_OPT_RETURN(ZZ_pX, x); }inline ZZ_pX operator+(const ZZ_pX& a, const ZZ_p& b)   { ZZ_pX x; add(x, a, b); NTL_OPT_RETURN(ZZ_pX, x); }inline ZZ_pX operator+(const ZZ_pX& a, long b)   { ZZ_pX x; add(x, a, b); NTL_OPT_RETURN(ZZ_pX, x); }inline ZZ_pX operator+(const ZZ_p& a, const ZZ_pX& b)   { ZZ_pX x; add(x, a, b); NTL_OPT_RETURN(ZZ_pX, x); }inline ZZ_pX operator+(long a, const ZZ_pX& b)   { ZZ_pX x; add(x, a, b); NTL_OPT_RETURN(ZZ_pX, x); }inline ZZ_pX operator-(const ZZ_pX& a, const ZZ_pX& b)   { ZZ_pX x; sub(x, a, b); NTL_OPT_RETURN(ZZ_pX, x); }inline ZZ_pX operator-(const ZZ_pX& a, const ZZ_p& b)   { ZZ_pX x; sub(x, a, b); NTL_OPT_RETURN(ZZ_pX, x); }inline ZZ_pX operator-(const ZZ_pX& a, long b)   { ZZ_pX x; sub(x, a, b); NTL_OPT_RETURN(ZZ_pX, x); }inline ZZ_pX operator-(const ZZ_p& a, const ZZ_pX& b)   { ZZ_pX x; sub(x, a, b); NTL_OPT_RETURN(ZZ_pX, x); }inline ZZ_pX operator-(long a, const ZZ_pX& b)   { ZZ_pX x; sub(x, a, b); NTL_OPT_RETURN(ZZ_pX, x); }inline ZZ_pX& operator+=(ZZ_pX& x, const ZZ_pX& b)   { add(x, x, b); return x; }inline ZZ_pX& operator+=(ZZ_pX& x, const ZZ_p& b)   { add(x, x, b); return x; }inline ZZ_pX& operator+=(ZZ_pX& x, long b)   { add(x, x, b); return x; }inline ZZ_pX& operator-=(ZZ_pX& x, const ZZ_pX& b)   { sub(x, x, b); return x; }inline ZZ_pX& operator-=(ZZ_pX& x, const ZZ_p& b)   { sub(x, x, b); return x; }inline ZZ_pX& operator-=(ZZ_pX& x, long b)   { sub(x, x, b); return x; }inline ZZ_pX operator-(const ZZ_pX& a)    { ZZ_pX x; negate(x, a); NTL_OPT_RETURN(ZZ_pX, x); }inline ZZ_pX& operator++(ZZ_pX& x) { add(x, x, 1); return x; }inline void operator++(ZZ_pX& x, int) { add(x, x, 1); }inline ZZ_pX& operator--(ZZ_pX& x) { sub(x, x, 1); return x; }inline void operator--(ZZ_pX& x, int) { sub(x, x, 1); }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产麻豆视频一区| 欧美va亚洲va| 91麻豆精品国产91久久久久久 | 亚洲午夜一区二区| 国产乱色国产精品免费视频| 色欲综合视频天天天| 久久久久九九视频| 日韩中文字幕1| 91极品视觉盛宴| 国产精品久久久久久亚洲伦| 久久爱www久久做| 欧美日韩一区中文字幕| 亚洲日本一区二区| 成人亚洲一区二区一| 精品日韩在线一区| 日韩专区中文字幕一区二区| 色婷婷综合久色| 国产精品大尺度| k8久久久一区二区三区| 国产亚洲污的网站| 国产在线一区观看| 久久日韩精品一区二区五区| 免费在线观看不卡| 欧美一级午夜免费电影| 日韩成人午夜电影| 宅男在线国产精品| 蜜桃视频免费观看一区| 欧美一区二区网站| 麻豆极品一区二区三区| 3d动漫精品啪啪| 日本怡春院一区二区| 欧美丰满少妇xxxbbb| 婷婷开心激情综合| 日韩一区和二区| 久久成人免费日本黄色| 精品国产一区二区三区四区四 | 91美女在线观看| 亚洲欧美日韩成人高清在线一区| av在线不卡观看免费观看| 国产精品无人区| 91在线观看一区二区| 一二三四社区欧美黄| 欧美精品日韩一区| 久久99精品国产91久久来源| 日韩欧美电影在线| 国产激情视频一区二区在线观看| 久久久久国产精品免费免费搜索| 丰满少妇久久久久久久| 中文字幕综合网| 欧美日韩一本到| 精品在线一区二区三区| 国产人成一区二区三区影院| 白白色 亚洲乱淫| 亚洲电影激情视频网站| 91精品国产综合久久久久久| 韩国午夜理伦三级不卡影院| 国产免费成人在线视频| 色吧成人激情小说| 麻豆91在线播放| 国产精品网站在线| 欧美性极品少妇| 久久福利视频一区二区| 国产精品久久久久影院老司| 91天堂素人约啪| 蜜桃久久av一区| 国产精品国产三级国产aⅴ中文 | 日韩极品在线观看| 久久午夜羞羞影院免费观看| 不卡的电视剧免费网站有什么| 亚洲国产精品久久人人爱| 精品久久久久久久久久久院品网 | 色综合中文字幕国产 | 国产精品性做久久久久久| 国产精品福利av| 日韩欧美一级特黄在线播放| 成人免费看黄yyy456| 午夜国产精品一区| 久久久久久免费网| 欧美在线一区二区三区| 国产精品亚洲第一| 日日夜夜免费精品视频| 最新不卡av在线| 欧美第一区第二区| 欧美日韩一区二区三区高清| 国产乱子伦一区二区三区国色天香| 樱花草国产18久久久久| 久久品道一品道久久精品| 欧美日韩一区二区三区不卡 | 91国偷自产一区二区三区成为亚洲经典| 日本不卡视频一二三区| 一区二区三区美女| 国产精品视频你懂的| 精品国产a毛片| 制服丝袜日韩国产| 欧美精品自拍偷拍动漫精品| 99精品国产热久久91蜜凸| 国产成人精品免费| 狠狠久久亚洲欧美| 美国十次综合导航| 轻轻草成人在线| 午夜不卡av在线| 亚洲综合视频在线| 亚洲人成网站色在线观看| 欧美国产亚洲另类动漫| 亚洲精品在线三区| 精品国产免费视频| 欧美一级免费大片| 欧美三电影在线| 欧美色图激情小说| 欧美在线视频你懂得| 在线看日本不卡| 一本大道久久a久久精二百| 99在线精品免费| 91网站最新网址| 日本福利一区二区| 欧美无乱码久久久免费午夜一区 | 天使萌一区二区三区免费观看| 亚洲精品成人精品456| 亚洲三级理论片| 亚洲在线观看免费| 五月天精品一区二区三区| 欧美aaa在线| 国产最新精品免费| 大白屁股一区二区视频| va亚洲va日韩不卡在线观看| 91香蕉视频在线| 欧美视频完全免费看| 欧美高清dvd| 久久综合九色综合欧美就去吻| 久久综合成人精品亚洲另类欧美 | 不卡欧美aaaaa| 色噜噜狠狠成人网p站| 91国偷自产一区二区三区成为亚洲经典| 色94色欧美sute亚洲线路一久| 在线观看一区不卡| 91精品婷婷国产综合久久竹菊| 日韩一区二区中文字幕| 国产欧美日韩综合| 一区二区三区在线视频播放| 肉肉av福利一精品导航| 国产老肥熟一区二区三区| 成人av资源站| 欧美夫妻性生活| 久久久久久电影| 一区二区三区高清在线| 免费高清在线一区| 成人免费视频免费观看| 欧美日本在线播放| 久久蜜桃一区二区| 亚洲欧美偷拍另类a∨色屁股| 亚洲成a人片在线不卡一二三区 | xvideos.蜜桃一区二区| 国产精品第五页| 日韩精彩视频在线观看| 成人视屏免费看| 欧美久久婷婷综合色| 欧美激情一区二区三区四区 | 亚洲品质自拍视频网站| 免费一区二区视频| 色婷婷久久99综合精品jk白丝| 精品嫩草影院久久| 亚洲制服欧美中文字幕中文字幕| 另类小说图片综合网| 91丨porny丨户外露出| 精品久久免费看| 亚洲综合精品自拍| 国产99久久精品| 日韩欧美一区二区不卡| 亚洲精品视频一区| 国产.欧美.日韩| 欧美一区2区视频在线观看| 亚洲欧洲美洲综合色网| 国产乱子轮精品视频| 日韩一区二区精品| 亚洲一区二三区| av一区二区三区黑人| 久久久精品tv| 裸体歌舞表演一区二区| 欧美日韩精品福利| 亚洲欧美另类小说| 9人人澡人人爽人人精品| 国产日韩欧美激情| 久久精品久久99精品久久| 欧美日韩国产bt| 亚洲国产一区二区在线播放| 99精品视频在线播放观看| 久久久av毛片精品| 国内精品写真在线观看| 日韩三级伦理片妻子的秘密按摩| 一区av在线播放| 日本福利一区二区| 亚洲综合无码一区二区| 91浏览器在线视频| 亚洲乱码国产乱码精品精小说| www.色精品| 国产精品无人区| 91免费国产在线| 尤物av一区二区| 欧美无砖砖区免费| 天天综合天天综合色|