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

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

?? zz_px.txt

?? 一個比較通用的大數運算庫
?? TXT
?? 第 1 頁 / 共 2 頁
字號:
   for (i = 0; i < v.length(); i++)
      MulMod(res, res, v[i], F); 
   x = res;
}

Note that automatic conversions are provided so that a ZZ_pX can
be used wherever a ZZ_pXModulus is required, and a ZZ_pXModulus
can be used wherever a ZZ_pX is required.

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


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

   ZZ_pXModulus(const ZZ_pXModulus&);  // copy

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

   ~ZZ_pXModulus();

   ZZ_pXModulus(const ZZ_pX& f); // initialize with f, deg(f) > 0

   operator const ZZ_pX& () const; 
   // read-only access to f, implicit conversion operator

   const ZZ_pX& val() const; 
   // read-only access to f, explicit notation

};

void build(ZZ_pXModulus& F, const ZZ_pX& f);
// pre-computes information about f and stores it in F.
// Note that the declaration ZZ_pXModulus F(f) is equivalent to
// ZZ_pXModulus 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_pXModulus& F);  // return n=deg(f)

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

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

void PowerMod(ZZ_pX& x, const ZZ_pX& a, const ZZ& e, const ZZ_pXModulus& F);
ZZ_pX PowerMod(const ZZ_pX& a, const ZZ& e, const ZZ_pXModulus& F);

void PowerMod(ZZ_pX& x, const ZZ_pX& a, long e, const ZZ_pXModulus& F);
ZZ_pX PowerMod(const ZZ_pX& a, long e, const ZZ_pXModulus& F);

// x = a^e % f; deg(a) < n (e may be negative)

void PowerXMod(ZZ_pX& x, const ZZ& e, const ZZ_pXModulus& F);
ZZ_pX PowerXMod(const ZZ& e, const ZZ_pXModulus& F);

void PowerXMod(ZZ_pX& x, long e, const ZZ_pXModulus& F);
ZZ_pX PowerXMod(long e, const ZZ_pXModulus& F);

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

void PowerXPlusAMod(ZZ_pX& x, const ZZ_p& a, const ZZ& e, 
                    const ZZ_pXModulus& F);

ZZ_pX PowerXPlusAMod(const ZZ_p& a, const ZZ& e, 
                           const ZZ_pXModulus& F);

void PowerXPlusAMod(ZZ_pX& x, const ZZ_p& a, long e, 
                    const ZZ_pXModulus& F);

ZZ_pX PowerXPlusAMod(const ZZ_p& a, long e, 
                           const ZZ_pXModulus& F);

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


void rem(ZZ_pX& x, const ZZ_pX& a, const ZZ_pXModulus& F);
// x = a % f

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

void div(ZZ_pX& q, const ZZ_pX& a, const ZZ_pXModulus& F);
// q = a/f

// operator notation:

ZZ_pX operator/(const ZZ_pX& a, const ZZ_pXModulus& F);
ZZ_pX operator%(const ZZ_pX& a, const ZZ_pXModulus& F);

ZZ_pX& operator/=(ZZ_pX& x, const ZZ_pXModulus& F);
ZZ_pX& operator%=(ZZ_pX& x, const ZZ_pXModulus& F);



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


                                More Pre-Conditioning

If you need to compute a * b % f for a fixed b, but for many a's, it
is much more efficient to first build a ZZ_pXMultiplier B for b, and
then use the MulMod routine below.

Here is an example that multiplies each element of a vector by a fixed
polynomial modulo f.

#include <NTL/ZZ_pX.h>

void mul(vec_ZZ_pX& v, const ZZ_pX& b, const ZZ_pX& f)
{
   ZZ_pXModulus F(f);
   ZZ_pXMultiplier B(b, F);
   long i;
   for (i = 0; i < v.length(); i++)
      MulMod(v[i], v[i], B, F);
}

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


class ZZ_pXMultiplier {
public:
   ZZ_pXMultiplier(); // initially zero

   ZZ_pXMultiplier(const ZZ_pX& b, const ZZ_pXModulus& F);
      // initializes with b mod F, where deg(b) < deg(F)

   ZZ_pXMultiplier(const ZZ_pXMultiplier&);  // copy

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

   ~ZZ_pXMultiplier();

   const ZZ_pX& val() const; // read-only access to b

};


void build(ZZ_pXMultiplier& B, const ZZ_pX& b, const ZZ_pXModulus& F);
// pre-computes information about b and stores it in B; deg(b) <
// deg(F)

void MulMod(ZZ_pX& x, const ZZ_pX& a, const ZZ_pXMultiplier& B,
                                      const ZZ_pXModulus& F);

// x = (a * b) % F; deg(a) < deg(F)

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

                             vectors of ZZ_pX's

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

NTL_vector_decl(ZZ_pX,vec_ZZ_pX)
// vec_ZZ_pX

NTL_eq_vector_decl(ZZ_pX,vec_ZZ_pX)
// == and !=

NTL_io_vector_decl(ZZ_pX,vec_ZZ_pX)
// 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_pX& x, const ZZ_pX& g, const ZZ_pX& h, const ZZ_pXModulus& F);
ZZ_pX CompMod(const ZZ_pX& g, const ZZ_pX& h, 
                    const ZZ_pXModulus& F);

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

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

void Comp3Mod(ZZ_pX& x1, ZZ_pX& x2, ZZ_pX& x3, 
              const ZZ_pX& g1, const ZZ_pX& g2, const ZZ_pX& g3,
              const ZZ_pX& h, const ZZ_pXModulus& 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_pXArgument 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_pXArgument {
   vec_ZZ_pX H;
};

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

void CompMod(ZZ_pX& x, const ZZ_pX& g, const ZZ_pXArgument& H, 
             const ZZ_pXModulus& F);

ZZ_pX CompMod(const ZZ_pX& g, const ZZ_pXArgument& H, 
                    const ZZ_pXModulus& F);

extern long ZZ_pXArgBound;

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

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

                     power projection routines

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

void project(ZZ_p& x, const ZZ_pVector& a, const ZZ_pX& b);
ZZ_p project(const ZZ_pVector& a, const ZZ_pX& b);
// x = inner product of a with coefficient vector of b


void ProjectPowers(vec_ZZ_p& x, const vec_ZZ_p& a, long k,
                   const ZZ_pX& h, const ZZ_pXModulus& F);

vec_ZZ_p ProjectPowers(const vec_ZZ_p& a, long k,
                   const ZZ_pX& h, const ZZ_pXModulus& 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_p& x, const vec_ZZ_p& a, long k,
                   const ZZ_pXArgument& H, const ZZ_pXModulus& F);

vec_ZZ_p ProjectPowers(const vec_ZZ_p& a, long k,
                   const ZZ_pXArgument& H, const ZZ_pXModulus& F);

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


void UpdateMap(vec_ZZ_p& x, const vec_ZZ_p& a,
               const ZZ_pXMultiplier& B, const ZZ_pXModulus& F);

vec_ZZ_p UpdateMap(const vec_ZZ_p& a,
               const ZZ_pXMultiplier& B, const ZZ_pXModulus& F);

// Computes the vector

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

// Restriction: must have a.length() <= deg(F).
// This is "transposed" MulMod by B.
// Input may have "high order" zeroes stripped.
// Output will always have high order zeroes stripped.


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

                              Minimum Polynomials

These routines should be used with prime p.

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_pX& h, const vec_ZZ_p& a, long m);
ZZ_pX MinPolySeq(const vec_ZZ_p& 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_pX& h, const ZZ_pX& g, const ZZ_pXModulus& F, long m);
ZZ_pX ProbMinPolyMod(const ZZ_pX& g, const ZZ_pXModulus& F, long m);

void ProbMinPolyMod(ZZ_pX& h, const ZZ_pX& g, const ZZ_pXModulus& F);
ZZ_pX ProbMinPolyMod(const ZZ_pX& g, const ZZ_pXModulus& 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/p.

void MinPolyMod(ZZ_pX& h, const ZZ_pX& g, const ZZ_pXModulus& F, long m);
ZZ_pX MinPolyMod(const ZZ_pX& g, const ZZ_pXModulus& F, long m);

void MinPolyMod(ZZ_pX& h, const ZZ_pX& g, const ZZ_pXModulus& F);
ZZ_pX MinPolyMod(const ZZ_pX& g, const ZZ_pXModulus& F);

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

void IrredPolyMod(ZZ_pX& h, const ZZ_pX& g, const ZZ_pXModulus& F, long m);
ZZ_pX IrredPolyMod(const ZZ_pX& g, const ZZ_pXModulus& F, long m);

void IrredPolyMod(ZZ_pX& h, const ZZ_pX& g, const ZZ_pXModulus& F);
ZZ_pX IrredPolyMod(const ZZ_pX& g, const ZZ_pXModulus& 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).


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

                   Traces, norms, resultants

These routines should be used with prime p.

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


void TraceMod(ZZ_p& x, const ZZ_pX& a, const ZZ_pXModulus& F);
ZZ_p TraceMod(const ZZ_pX& a, const ZZ_pXModulus& F);

void TraceMod(ZZ_p& x, const ZZ_pX& a, const ZZ_pX& f);
ZZ_p TraceMod(const ZZ_pX& a, const ZZ_pXModulus& f);
// x = Trace(a mod f); deg(a) < deg(f)


void TraceVec(vec_ZZ_p& S, const ZZ_pX& f);
vec_ZZ_p TraceVec(const ZZ_pX& 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_p& x, const ZZ_pX& a, const ZZ_pX& f);
ZZ_p NormMod(const ZZ_pX& a, const ZZ_pX& f);
// x = Norm(a mod f); 0 < deg(f), deg(a) < deg(f)

void resultant(ZZ_p& x, const ZZ_pX& a, const ZZ_pX& b);
ZZ_p resultant(const ZZ_pX& a, const ZZ_pX& b);
// x = resultant(a, b)

void CharPolyMod(ZZ_pX& g, const ZZ_pX& a, const ZZ_pX& f);
ZZ_pX CharPolyMod(const ZZ_pX& a, const ZZ_pX& f);
// g = charcteristic polynomial of (a mod f); 0 < deg(f), deg(g) <
// deg(f);  this routine works for arbitrary f;  if f is irreducible,
// it is faster to use the IrredPolyMod routine, and then exponentiate
// if necessary (since in this case the CharPoly is just a power of
// the IrredPoly).


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

                           Miscellany

A ZZ_pX f is represented as a vec_ZZ_p, 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_pX& x) // x = 0
void set(ZZ_pX& x); // x = 1

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

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

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

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

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

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
极品少妇xxxx偷拍精品少妇| 中文字幕精品一区二区精品绿巨人| 国产精品色噜噜| 激情综合亚洲精品| 在线亚洲人成电影网站色www| 《视频一区视频二区| 国产精品资源在线看| 欧美mv日韩mv| 成人激情黄色小说| 国产精品人成在线观看免费 | 亚洲精品成人悠悠色影视| 国产精品456露脸| 国产欧美日韩中文久久| 久久精品国产99国产| 久久婷婷成人综合色| 国产精品1024| 国产日韩欧美亚洲| 91视频一区二区三区| 亚洲精品伦理在线| 欧美日韩一区视频| 久久电影网站中文字幕| 久久无码av三级| 粉嫩一区二区三区在线看| 欧美va在线播放| 国产成人午夜视频| 亚洲欧美一区二区三区极速播放| 91麻豆swag| 蜜臀av一区二区| 亚洲国产精品激情在线观看| 成人禁用看黄a在线| 午夜精品福利在线| 日韩欧美亚洲国产另类| 韩国av一区二区| 一区二区三区在线免费播放| 欧美日韩大陆一区二区| 精品一区二区三区免费观看| 亚洲精选一二三| 欧美一区二区三区视频免费| 国产一区二区三区免费| 亚洲午夜在线电影| 日韩精品一区在线观看| aaa国产一区| 亚洲午夜国产一区99re久久| 国产亲近乱来精品视频 | 香蕉影视欧美成人| 欧美日韩视频第一区| 懂色av一区二区夜夜嗨| 一区二区三区精品| 精品国产百合女同互慰| 欧美少妇xxx| 韩国一区二区视频| 亚洲在线视频一区| 国产精品网站一区| 337p亚洲精品色噜噜狠狠| 国产乱码字幕精品高清av| 自拍偷拍国产亚洲| 欧美激情综合在线| 欧美一区二区在线视频| gogogo免费视频观看亚洲一| 国产一区日韩二区欧美三区| 亚洲一二三区在线观看| 国产欧美日韩卡一| 国产视频一区二区在线| 欧美日韩亚洲综合一区| av不卡在线播放| 欧美a一区二区| 亚洲午夜三级在线| 国产精品久久福利| 日本韩国欧美在线| 99久久国产综合精品麻豆| 久久精品理论片| 亚洲v中文字幕| 亚洲成av人片在线| 亚洲欧美日韩中文播放| 国产日韩av一区二区| 亚洲精品一区二区三区99| 欧美欧美午夜aⅴ在线观看| 91美女在线观看| 色综合久久88色综合天天免费| 国产成人精品一区二| 国产资源精品在线观看| 久久精品国产亚洲高清剧情介绍 | 一区二区三区高清不卡| 日本一区二区三区电影| 久久久天堂av| 欧美成人video| 91麻豆精品国产91久久久资源速度 | 亚洲国产精品成人久久综合一区| 欧美精品久久一区| 欧美日韩一级二级三级| 欧美男同性恋视频网站| 欧美性大战xxxxx久久久| 日本丰满少妇一区二区三区| 国产精品亚洲成人| 高清国产一区二区| 国产成人精品影视| 成人福利视频网站| 99热在这里有精品免费| 91一区二区三区在线播放| 99re66热这里只有精品3直播| 美女看a上一区| 国产黄色精品网站| 成人免费黄色在线| 91影院在线观看| 欧美日韩一区二区三区在线| 欧美丝袜第三区| 在线成人av影院| 久久综合精品国产一区二区三区 | 久久激五月天综合精品| 久久99这里只有精品| 日日摸夜夜添夜夜添国产精品 | 久久av老司机精品网站导航| 九九**精品视频免费播放| 国产精品伊人色| 不卡一区二区在线| 色综合久久中文综合久久牛| 在线看日韩精品电影| 制服丝袜一区二区三区| 国产精品毛片久久久久久久| 一片黄亚洲嫩模| 综合久久国产九一剧情麻豆| 亚洲一区二区三区四区在线免费观看 | 久久精品一区二区| 亚洲已满18点击进入久久| 日本免费新一区视频| 国产精品综合久久| 欧美伊人精品成人久久综合97 | 欧美美女一区二区三区| 欧美一区二区成人| 亚洲欧美aⅴ...| 青青草成人在线观看| 丁香激情综合国产| 欧美一区二区日韩| 亚洲天堂精品视频| 日韩电影一区二区三区四区| 99国内精品久久| 日韩免费高清av| 一区二区三区四区在线播放| 石原莉奈在线亚洲三区| www.亚洲在线| 欧美一级理论片| 国产精品福利一区| 国产东北露脸精品视频| 欧美日韩国产美女| 日本一区二区三区高清不卡| 美女视频网站久久| 日本道色综合久久| 久久久久久久久99精品| 亚洲国产精品影院| 成人h精品动漫一区二区三区| 欧美精品久久久久久久久老牛影院| 国产清纯白嫩初高生在线观看91 | 国产视频不卡一区| 欧美va亚洲va| 亚洲成人资源在线| 99v久久综合狠狠综合久久| 日韩视频在线你懂得| 亚洲精品国产视频| www.日本不卡| 2020日本不卡一区二区视频| 亚洲1区2区3区视频| 色综合色综合色综合| 国产精品久久久久久久久图文区| 国产成人一级电影| 国产三区在线成人av| 国产精品自在在线| 久久中文娱乐网| 国产成人av影院| 国产精品美女久久久久久久| 粉嫩av一区二区三区在线播放| 国产色一区二区| 成人福利在线看| 亚洲女女做受ⅹxx高潮| 色婷婷激情久久| 性感美女极品91精品| 91精品国产麻豆| 极品少妇一区二区| 国产欧美日韩精品一区| 99国产精品国产精品毛片| 亚洲日韩欧美一区二区在线| 91久久精品一区二区| 亚洲国产精品精华液网站| 欧美日韩一区精品| 日韩国产精品久久久| 日韩欧美不卡一区| 国产精品1区2区3区| 国产精品美女久久久久久| 色视频一区二区| 丝袜美腿亚洲一区| 精品免费一区二区三区| 成人性生交大合| 亚洲宅男天堂在线观看无病毒| 欧美精品123区| 激情五月婷婷综合网| 国产精品乱人伦中文| 欧美日韩国产综合视频在线观看 | 国产在线观看一区二区| 中文字幕乱码日本亚洲一区二区 | 69堂成人精品免费视频| 国产成人综合在线|