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

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

?? zz_pex.txt

?? 一個比較通用的大數運算庫
?? TXT
?? 第 1 頁 / 共 2 頁
字號:
NOTE: A ZZ_pEX may be used wherever a ZZ_pEXModulus is required,
and a ZZ_pEXModulus may be used wherever a ZZ_pEX is required.


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

class ZZ_pEXModulus {
public:
   ZZ_pEXModulus(); // initially in an unusable state

   ZZ_pEXModulus(const ZZ_pEX& f); // initialize with f, deg(f) > 0

   ZZ_pEXModulus(const ZZ_pEXModulus&); // copy

   ZZ_pEXModulus& operator=(const ZZ_pEXModulus&); // assignment

   ~ZZ_pEXModulus(); // destructor

   operator const ZZ_pEX& () const; // implicit read-only access to f

   const ZZ_pEX& val() const; // explicit read-only access to f
};

void build(ZZ_pEXModulus& F, const ZZ_pEX& f);
// pre-computes information about f and stores it in F.  Must have
// deg(f) > 0.  Note that the declaration ZZ_pEXModulus F(f) is
// equivalent to ZZ_pEXModulus F; build(F, f).

// In the following, f refers to the polynomial f supplied to the
// build routine, and n = deg(f).


long deg(const ZZ_pEXModulus& F);  // return n=deg(f)

void MulMod(ZZ_pEX& x, const ZZ_pEX& a, const ZZ_pEX& b, 
            const ZZ_pEXModulus& F);
ZZ_pEX MulMod(const ZZ_pEX& a, const ZZ_pEX& b, const ZZ_pEXModulus& F);
// x = (a * b) % f; deg(a), deg(b) < n

void SqrMod(ZZ_pEX& x, const ZZ_pEX& a, const ZZ_pEXModulus& F);
ZZ_pEX SqrMod(const ZZ_pEX& a, const ZZ_pEXModulus& F);
// x = a^2 % f; deg(a) < n

void PowerMod(ZZ_pEX& x, const ZZ_pEX& a, const ZZ& e, const ZZ_pEXModulus& F);
ZZ_pEX PowerMod(const ZZ_pEX& a, const ZZ& e, const ZZ_pEXModulus& F);

void PowerMod(ZZ_pEX& x, const ZZ_pEX& a, long e, const ZZ_pEXModulus& F);
ZZ_pEX PowerMod(const ZZ_pEX& a, long e, const ZZ_pEXModulus& F);

// x = a^e % f; e >= 0, deg(a) < n.  Uses a sliding window algorithm.
// (e may be negative)

void PowerXMod(ZZ_pEX& x, const ZZ& e, const ZZ_pEXModulus& F);
ZZ_pEX PowerXMod(const ZZ& e, const ZZ_pEXModulus& F);

void PowerXMod(ZZ_pEX& x, long e, const ZZ_pEXModulus& F);
ZZ_pEX PowerXMod(long e, const ZZ_pEXModulus& F);

// x = X^e % f (e may be negative)

void rem(ZZ_pEX& x, const ZZ_pEX& a, const ZZ_pEXModulus& F);
// x = a % f

void DivRem(ZZ_pEX& q, ZZ_pEX& r, const ZZ_pEX& a, const ZZ_pEXModulus& F);
// q = a/f, r = a%f

void div(ZZ_pEX& q, const ZZ_pEX& a, const ZZ_pEXModulus& F);
// q = a/f

// operator notation:

ZZ_pEX operator/(const ZZ_pEX& a, const ZZ_pEXModulus& F);
ZZ_pEX operator%(const ZZ_pEX& a, const ZZ_pEXModulus& F);

ZZ_pEX& operator/=(ZZ_pEX& x, const ZZ_pEXModulus& F);
ZZ_pEX& operator%=(ZZ_pEX& x, const ZZ_pEXModulus& F);



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

                             vectors of ZZ_pEX's

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

NTL_vector_decl(ZZ_pEX,vec_ZZ_pEX)
// vec_ZZ_pEX

NTL_eq_vector_decl(ZZ_pEX,vec_ZZ_pEX)
// == and !=

NTL_io_vector_decl(ZZ_pEX,vec_ZZ_pEX)
// I/O operators



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

                              Modular Composition

Modular composition is the problem of computing g(h) mod f for
polynomials f, g, and h.

The algorithm employed is that of Brent & Kung (Fast algorithms for
manipulating formal power series, JACM 25:581-595, 1978), which uses
O(n^{1/2}) modular polynomial multiplications, and O(n^2) scalar
operations.


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

void CompMod(ZZ_pEX& x, const ZZ_pEX& g, const ZZ_pEX& h, 
             const ZZ_pEXModulus& F);
ZZ_pEX CompMod(const ZZ_pEX& g, const ZZ_pEX& h, 
                    const ZZ_pEXModulus& F);

// x = g(h) mod f; deg(h) < n

void Comp2Mod(ZZ_pEX& x1, ZZ_pEX& x2, const ZZ_pEX& g1, const ZZ_pEX& g2,
              const ZZ_pEX& h, const ZZ_pEXModulus& F);
// xi = gi(h) mod f (i=1,2); deg(h) < n.


void Comp3Mod(ZZ_pEX& x1, ZZ_pEX& x2, ZZ_pEX& x3, 
              const ZZ_pEX& g1, const ZZ_pEX& g2, const ZZ_pEX& g3,
              const ZZ_pEX& h, const ZZ_pEXModulus& F);
// xi = gi(h) mod f (i=1..3); deg(h) < n.



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

                     Composition with Pre-Conditioning

If a single h is going to be used with many g's then you should build
a ZZ_pEXArgument for h, and then use the compose routine below.  The
routine build computes and stores h, h^2, ..., h^m mod f.  After this
pre-computation, composing a polynomial of degree roughly n with h
takes n/m multiplies mod f, plus n^2 scalar multiplies.  Thus,
increasing m increases the space requirement and the pre-computation
time, but reduces the composition time.

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


struct ZZ_pEXArgument {
   vec_ZZ_pEX H;
};

void build(ZZ_pEXArgument& H, const ZZ_pEX& h, const ZZ_pEXModulus& F, long m);
// Pre-Computes information about h.  m > 0, deg(h) < n.

void CompMod(ZZ_pEX& x, const ZZ_pEX& g, const ZZ_pEXArgument& H, 
             const ZZ_pEXModulus& F);

ZZ_pEX CompMod(const ZZ_pEX& g, const ZZ_pEXArgument& H, 
                    const ZZ_pEXModulus& F);

extern long ZZ_pEXArgBound;

// Initially 0.  If this is set to a value greater than zero, then
// composition routines will allocate a table of no than about
// ZZ_pEXArgBound KB.  Setting this value affects all compose routines
// and the power projection and minimal polynomial routines below, 
// and indirectly affects many routines in ZZ_pEXFactoring.

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

                     power projection routines

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

void project(ZZ_pE& x, const ZZ_pEVector& a, const ZZ_pEX& b);
ZZ_pE project(const ZZ_pEVector& a, const ZZ_pEX& b);
// x = inner product of a with coefficient vector of b


void ProjectPowers(vec_ZZ_pE& x, const vec_ZZ_pE& a, long k,
                   const ZZ_pEX& h, const ZZ_pEXModulus& F);

vec_ZZ_pE ProjectPowers(const vec_ZZ_pE& a, long k,
                   const ZZ_pEX& h, const ZZ_pEXModulus& F);

// Computes the vector

//    project(a, 1), project(a, h), ..., project(a, h^{k-1} % f).  

// This operation is the "transpose" of the modular composition operation.

void ProjectPowers(vec_ZZ_pE& x, const vec_ZZ_pE& a, long k,
                   const ZZ_pEXArgument& H, const ZZ_pEXModulus& F);

vec_ZZ_pE ProjectPowers(const vec_ZZ_pE& a, long k,
                   const ZZ_pEXArgument& H, const ZZ_pEXModulus& F);

// same as above, but uses a pre-computed ZZ_pEXArgument


class ZZ_pEXTransMultiplier { /* ... */ };

void build(ZZ_pEXTransMultiplier& B, const ZZ_pEX& b, const ZZ_pEXModulus& F);

void UpdateMap(vec_ZZ_pE& x, const vec_ZZ_pE& a,
               const ZZ_pEXMultiplier& B, const ZZ_pEXModulus& F);

vec_ZZ_pE UpdateMap(const vec_ZZ_pE& a,
               const ZZ_pEXMultiplier& B, const ZZ_pEXModulus& F);

// Computes the vector

//    project(a, b), project(a, (b*X)%f), ..., project(a, (b*X^{n-1})%f)

// Required: a.length() <= deg(F), deg(b) < deg(F).
// This is "transposed" MulMod by B.
// Input may have "high order" zeroes stripped.
// Output always has high order zeroes stripped.


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

                              Minimum Polynomials

These routines should be used only when ZZ_pE is a field.

All of these routines implement the algorithm from [Shoup, J. Symbolic
Comp. 17:371-391, 1994] and [Shoup, J. Symbolic Comp. 20:363-397,
1995], based on transposed modular composition and the
Berlekamp/Massey algorithm.

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


void MinPolySeq(ZZ_pEX& h, const vec_ZZ_pE& a, long m);
ZZ_pEX MinPolySeq(const vec_ZZ_pE& a, long m);
// computes the minimum polynomial of a linealy generated sequence; m
// is a bound on the degree of the polynomial; required: a.length() >=
// 2*m


void ProbMinPolyMod(ZZ_pEX& h, const ZZ_pEX& g, const ZZ_pEXModulus& F, long m);
ZZ_pEX ProbMinPolyMod(const ZZ_pEX& g, const ZZ_pEXModulus& F, long m);

void ProbMinPolyMod(ZZ_pEX& h, const ZZ_pEX& g, const ZZ_pEXModulus& F);
ZZ_pEX ProbMinPolyMod(const ZZ_pEX& g, const ZZ_pEXModulus& F);

// computes the monic minimal polynomial if (g mod f).  m = a bound on
// the degree of the minimal polynomial; in the second version, this
// argument defaults to n.  The algorithm is probabilistic, always
// returns a divisor of the minimal polynomial, and returns a proper
// divisor with probability at most m/2^{ZZ_pE::degree()}.

void MinPolyMod(ZZ_pEX& h, const ZZ_pEX& g, const ZZ_pEXModulus& F, long m);
ZZ_pEX MinPolyMod(const ZZ_pEX& g, const ZZ_pEXModulus& F, long m);

void MinPolyMod(ZZ_pEX& h, const ZZ_pEX& g, const ZZ_pEXModulus& F);
ZZ_pEX MinPolyMod(const ZZ_pEX& g, const ZZ_pEXModulus& F);

// same as above, but guarantees that result is correct

void IrredPolyMod(ZZ_pEX& h, const ZZ_pEX& g, const ZZ_pEXModulus& F, long m);
ZZ_pEX IrredPolyMod(const ZZ_pEX& g, const ZZ_pEXModulus& F, long m);

void IrredPolyMod(ZZ_pEX& h, const ZZ_pEX& g, const ZZ_pEXModulus& F);
ZZ_pEX IrredPolyMod(const ZZ_pEX& g, const ZZ_pEXModulus& F);

// same as above, but assumes that f is irreducible, or at least that
// the minimal poly of g is itself irreducible.  The algorithm is
// deterministic (and is always correct).

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

           Composition and Minimal Polynomials in towers

These are implementations of algorithms that will be described
and analyzed in a forthcoming paper.

The routines require that p is prime, but ZZ_pE need not be a field.

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


void CompTower(ZZ_pEX& x, const ZZ_pX& g, const ZZ_pEXArgument& h,
             const ZZ_pEXModulus& F);

ZZ_pEX CompTower(const ZZ_pX& g, const ZZ_pEXArgument& h,
             const ZZ_pEXModulus& F);

void CompTower(ZZ_pEX& x, const ZZ_pX& g, const ZZ_pEX& h,
             const ZZ_pEXModulus& F);

ZZ_pEX CompTower(const ZZ_pX& g, const ZZ_pEX& h,
             const ZZ_pEXModulus& F);


// x = g(h) mod f


void ProbMinPolyTower(ZZ_pX& h, const ZZ_pEX& g, const ZZ_pEXModulus& F,
                      long m);

ZZ_pX ProbMinPolyTower(const ZZ_pEX& g, const ZZ_pEXModulus& F, long m);

void ProbMinPolyTower(ZZ_pX& h, const ZZ_pEX& g, const ZZ_pEXModulus& F);

ZZ_pX ProbMinPolyTower(const ZZ_pEX& g, const ZZ_pEXModulus& F);

// Uses a probabilistic algorithm to compute the minimal
// polynomial of (g mod f) over ZZ_p.
// The parameter m is a bound on the degree of the minimal polynomial
// (default = deg(f)*ZZ_pE::degree()).
// In general, the result will be a divisor of the true minimimal
// polynomial.  For correct results, use the MinPoly routines below.



void MinPolyTower(ZZ_pX& h, const ZZ_pEX& g, const ZZ_pEXModulus& F, long m);

ZZ_pX MinPolyTower(const ZZ_pEX& g, const ZZ_pEXModulus& F, long m);

void MinPolyTower(ZZ_pX& h, const ZZ_pEX& g, const ZZ_pEXModulus& F);

ZZ_pX MinPolyTower(const ZZ_pEX& g, const ZZ_pEXModulus& F);

// Same as above, but result is always correct.


void IrredPolyTower(ZZ_pX& h, const ZZ_pEX& g, const ZZ_pEXModulus& F, long m);

ZZ_pX IrredPolyTower(const ZZ_pEX& g, const ZZ_pEXModulus& F, long m);

void IrredPolyTower(ZZ_pX& h, const ZZ_pEX& g, const ZZ_pEXModulus& F);

ZZ_pX IrredPolyTower(const ZZ_pEX& g, const ZZ_pEXModulus& F);

// Same as above, but assumes the minimal polynomial is
// irreducible, and uses a slightly faster, deterministic algorithm.


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

                   Traces, norms, resultants

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


void TraceMod(ZZ_pE& x, const ZZ_pEX& a, const ZZ_pEXModulus& F);
ZZ_pE TraceMod(const ZZ_pEX& a, const ZZ_pEXModulus& F);

void TraceMod(ZZ_pE& x, const ZZ_pEX& a, const ZZ_pEX& f);
ZZ_pE TraceMod(const ZZ_pEX& a, const ZZ_pEXModulus& f);
// x = Trace(a mod f); deg(a) < deg(f)


void TraceVec(vec_ZZ_pE& S, const ZZ_pEX& f);
vec_ZZ_pE TraceVec(const ZZ_pEX& f);
// S[i] = Trace(X^i mod f), i = 0..deg(f)-1; 0 < deg(f)

// The above trace routines implement the asymptotically fast trace
// algorithm from [von zur Gathen and Shoup, Computational Complexity,
// 1992].

void NormMod(ZZ_pE& x, const ZZ_pEX& a, const ZZ_pEX& f);
ZZ_pE NormMod(const ZZ_pEX& a, const ZZ_pEX& f);
// x = Norm(a mod f); 0 < deg(f), deg(a) < deg(f)

void resultant(ZZ_pE& x, const ZZ_pEX& a, const ZZ_pEX& b);
ZZ_pE resultant(const ZZ_pEX& a, const ZZ_pEX& b);
// x = resultant(a, b)

// NormMod and resultant require that ZZ_pE is a field.




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

                           Miscellany

A ZZ_pEX f is represented as a vec_ZZ_pE, which can be accessed as
f.rep.  The constant term is f.rep[0] and the leading coefficient is
f.rep[f.rep.length()-1], except if f is zero, in which case
f.rep.length() == 0.  Note that the leading coefficient is always
nonzero (unless f is zero).  One can freely access and modify f.rep,
but one should always ensure that the leading coefficient is nonzero,
which can be done by invoking f.normalize().


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


void clear(ZZ_pEX& x) // x = 0
void set(ZZ_pEX& x); // x = 1

void ZZ_pEX::normalize();  
// f.normalize() strips leading zeros from f.rep.

void ZZ_pEX::SetMaxLength(long n);
// f.SetMaxLength(n) pre-allocate spaces for n coefficients.  The
// polynomial that f represents is unchanged.

void ZZ_pEX::kill();
// f.kill() sets f to 0 and frees all memory held by f.  Equivalent to
// f.rep.kill().

ZZ_pEX::ZZ_pEX(INIT_SIZE_TYPE, long n);
// ZZ_pEX(INIT_SIZE, n) initializes to zero, but space is pre-allocated
// for n coefficients

static const ZZ_pEX& zero();
// ZZ_pEX::zero() is a read-only reference to 0

void swap(ZZ_pEX& x, ZZ_pEX& y); 
// swap x and y (via "pointer swapping")

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲高清免费视频| 制服丝袜日韩国产| 欧美精品丝袜中出| 国产精品视频一二| 美女mm1313爽爽久久久蜜臀| 91免费视频大全| 国产女人aaa级久久久级| 日韩成人精品视频| 91国模大尺度私拍在线视频| 国产亚洲短视频| 日韩国产欧美在线观看| 色爱区综合激月婷婷| 欧美国产日韩精品免费观看| 国内外精品视频| 欧美一区二区在线视频| 青青国产91久久久久久 | 国产精品一级片在线观看| 欧美日韩国产精品成人| 亚洲综合久久久久| 在线精品视频一区二区三四 | 日产欧产美韩系列久久99| 91视频com| 成人欧美一区二区三区在线播放| 国产精品自拍av| 精品福利av导航| 精品一区二区三区香蕉蜜桃 | 精品国产一二三| 天堂久久一区二区三区| 欧美精品日韩一区| 午夜精品福利一区二区三区蜜桃| 欧美体内she精高潮| 亚洲一区二区三区四区不卡| 欧美在线你懂的| 亚洲第一福利视频在线| 欧美猛男超大videosgay| 亚洲制服丝袜在线| 欧美丰满一区二区免费视频| 亚洲高清一区二区三区| 制服丝袜av成人在线看| 麻豆精品视频在线| 久久综合色综合88| 成人性生交大片| 亚洲精品成人a在线观看| 欧美网站大全在线观看| 石原莉奈一区二区三区在线观看| 欧美电影免费观看高清完整版| 国产一区二区不卡老阿姨| 国产精品沙发午睡系列990531| 91丨九色丨蝌蚪丨老版| 视频精品一区二区| 久久久久亚洲综合| 2欧美一区二区三区在线观看视频| 久久电影国产免费久久电影 | 国产精品福利在线播放| 91一区二区三区在线观看| 亚洲一二三专区| 日韩三区在线观看| jiyouzz国产精品久久| 亚洲国产视频一区| 精品成人佐山爱一区二区| 9久草视频在线视频精品| 亚洲成人自拍网| 精品盗摄一区二区三区| 色婷婷av一区二区三区大白胸| 午夜视频久久久久久| 久久奇米777| 欧美在线观看视频一区二区三区| 美女高潮久久久| 亚洲精品免费在线| 精品国内二区三区| 99re热视频精品| 亚洲永久免费视频| 欧美一区二区成人| 成人动漫一区二区| 天堂久久一区二区三区| 国产精品美女久久福利网站| 欧美高清视频不卡网| 成人午夜视频福利| 另类小说色综合网站| 亚洲欧美福利一区二区| 久久久国产精华| 91精品国产综合久久香蕉麻豆| 成人美女在线视频| 老司机精品视频一区二区三区| 亚洲女与黑人做爰| 久久免费电影网| 91精品国产91久久久久久一区二区 | 国产91精品在线观看| 亚洲三级在线观看| 久久久久久99精品| 777奇米四色成人影色区| 99麻豆久久久国产精品免费 | 精品国产乱码久久久久久浪潮| 99国产精品久久久久久久久久久| 奇米888四色在线精品| 亚洲一区二区高清| 亚洲欧洲无码一区二区三区| 久久人人爽爽爽人久久久| 欧美精品日韩一本| 91福利在线导航| 日本高清无吗v一区| 99视频精品免费视频| 成人在线视频首页| 欧美一区二区三区的| 成人午夜免费av| 国产精品资源网站| 久久精品国产澳门| 免费成人结看片| 播五月开心婷婷综合| 国产成人8x视频一区二区| 久久超碰97中文字幕| 日韩精品电影一区亚洲| 丝袜亚洲精品中文字幕一区| 亚洲国产美女搞黄色| 亚洲一区二区三区美女| 亚洲电影你懂得| 日韩精品电影一区亚洲| 日本亚洲一区二区| 久久国产剧场电影| 激情欧美日韩一区二区| 国产精华液一区二区三区| 国产一区二区免费在线| 成人激情文学综合网| 91视视频在线观看入口直接观看www | 国产精品国产三级国产普通话99| 久久久久9999亚洲精品| 国产欧美精品一区| 国产精品成人免费| 亚洲综合色自拍一区| 亚洲成a天堂v人片| 免费成人在线播放| 成人一区二区三区| 色婷婷久久综合| 在线播放欧美女士性生活| 日韩欧美一级片| 国产精品女主播av| 亚洲成人综合网站| 国产精品一区专区| 91免费小视频| 日韩美女一区二区三区四区| 国产情人综合久久777777| 一区二区三区不卡在线观看 | 亚洲丝袜精品丝袜在线| 午夜精品久久久久久久久久 | 亚洲麻豆国产自偷在线| 天天色综合成人网| 国产毛片一区二区| 色老头久久综合| 在线免费av一区| 欧美亚洲一区三区| 欧美va在线播放| 国产精品国产自产拍高清av王其| 亚洲一区二区三区四区在线免费观看 | 欧美刺激午夜性久久久久久久| 国产精品乱码一区二三区小蝌蚪| 亚洲国产视频a| 国产美女一区二区| 欧美无砖砖区免费| 精品国产三级电影在线观看| 国产精品初高中害羞小美女文| 免费亚洲电影在线| 91在线视频免费91| 久久久亚洲精品一区二区三区| 精品一区二区三区免费观看| 成人激情免费电影网址| 欧美一区二区三区啪啪| 中文字幕一区二区三区蜜月| 免费在线观看日韩欧美| 欧美丝袜第三区| 久久久久久久久免费| 亚洲一区电影777| 国产精品888| 日韩欧美成人一区二区| 亚洲a一区二区| 91天堂素人约啪| 国产精品天美传媒| 国产美女久久久久| 日韩欧美在线一区二区三区| 亚洲在线视频一区| 91美女在线视频| 亚洲欧洲在线观看av| 国产成人av电影在线| 久久综合九色综合欧美就去吻| 日本视频中文字幕一区二区三区| 欧洲一区在线电影| 亚洲天堂免费在线观看视频| 成人激情av网| 国产精品午夜春色av| 高清av一区二区| 国产日本亚洲高清| 国产精品一区二区三区网站| 亚洲精品一区在线观看| 久久精品噜噜噜成人av农村| 欧美日韩国产乱码电影| 亚洲国产wwwccc36天堂| 欧美日韩日日骚| 日本视频在线一区| 精品国产乱码久久久久久夜甘婷婷| 麻豆国产精品一区二区三区| 精品国产区一区|