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

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

?? gf2x.txt

?? NTL is a high-performance, portable C++ library providing data structures and algorithms for manipul
?? TXT
?? 第 1 頁 / 共 2 頁
字號:
GF2X InvMod(const GF2X& a, const GF2X& f);
// x = a^{-1} % f, error is a is not invertible

long InvModStatus(GF2X& x, const GF2X& a, const GF2X& f);
// if (a, f) = 1, returns 0 and sets x = a^{-1} % f; otherwise,
// returns 1 and sets x = (a, f)


// for modular exponentiation, see below



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

                     Modular Arithmetic with Pre-Conditioning

If you need to do a lot of arithmetic modulo a fixed f, build
GF2XModulus F for f.  This pre-computes information about f that
speeds up subsequent computations.

As an example, the following routine computes the product modulo f of a vector
of polynomials.

#include <NTL/GF2X.h>

void product(GF2X& x, const vec_GF2X& v, const GF2X& f)
{
   GF2XModulus F(f);
   GF2X res;
   res = 1;
   long i;
   for (i = 0; i < v.length(); i++)
      MulMod(res, res, v[i], F); 
   x = res;
}


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

The GF2XModulus routines optimize several important special cases:

  - f = X^n + X^k + 1, where k <= min((n+1)/2, n-NTL_BITS_PER_LONG)

  - f = X^n + X^{k_3} + X^{k_2} + X^{k_1} + 1,
      where k_3 <= min((n+1)/2, n-NTL_BITS_PER_LONG)

  - f = X^n + g, where deg(g) is small


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

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

   GF2XModulus(const GF2XModulus&);  // copy

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

   GF2XModulus(const GF2X& f); // initialize with f, deg(f) > 0

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

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

   long WordLength() const;
   // returns word-length of resisues
};

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

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

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

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

void PowerMod(GF2X& x, const GF2X& a, const ZZ& e, const GF2XModulus& F);
GF2X PowerMod(const GF2X& a, const ZZ& e, const GF2XModulus& F);

void PowerMod(GF2X& x, const GF2X& a, long e, const GF2XModulus& F);
GF2X PowerMod(const GF2X& a, long e, const GF2XModulus& F);

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

void PowerXMod(GF2X& x, const ZZ& e, const GF2XModulus& F);
GF2X PowerXMod(const ZZ& e, const GF2XModulus& F);

void PowerXMod(GF2X& x, long e, const GF2XModulus& F);
GF2X PowerXMod(long e, const GF2XModulus& F);

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


void rem(GF2X& x, const GF2X& a, const GF2XModulus& F);
// x = a % f

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

void div(GF2X& q, const GF2X& a, const GF2XModulus& F);
// q = a/f

// operator notation:

GF2X operator/(const GF2X& a, const GF2XModulus& F);
GF2X operator%(const GF2X& a, const GF2XModulus& F);

GF2X& operator/=(GF2X& x, const GF2XModulus& F);
GF2X& operator%=(GF2X& x, const GF2XModulus& F);


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

                             vectors of GF2X's

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

NTL_vector_decl(GF2X,vec_GF2X)
// vec_GF2X

NTL_eq_vector_decl(GF2X,vec_GF2X)
// == and !=

NTL_io_vector_decl(GF2X,vec_GF2X)
// 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(GF2X& x, const GF2X& g, const GF2X& h, const GF2XModulus& F);
GF2X CompMod(const GF2X& g, const GF2X& h, const GF2XModulus& F);
// x = g(h) mod f; deg(h) < n

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

void CompMod3(GF2X& x1, GF2X& x2, GF2X& x3, 
              const GF2X& g1, const GF2X& g2, const GF2X& g3,
              const GF2X& h, const GF2XModulus& 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 GF2XArgument 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 GF2XArgument {
   vec_GF2X H;
};

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

void CompMod(GF2X& x, const GF2X& g, const GF2XArgument& H, 
             const GF2XModulus& F);

GF2X CompMod(const GF2X& g, const GF2XArgument& H, 
             const GF2XModulus& F);


extern long GF2XArgBound;

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

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

                     Power Projection routines

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

void project(GF2& x, const vec_GF2& a, const GF2X& b);
GF2 project(const vec_GF2& a, const GF2X& b);
// x = inner product of a with coefficient vector of b


void ProjectPowers(vec_GF2& x, const vec_GF2& a, long k,
                   const GF2X& h, const GF2XModulus& F);

vec_GF2 ProjectPowers(const vec_GF2& a, long k,
                   const GF2X& h, const GF2XModulus& F);

// Computes the vector 

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

// Restriction: must have a.length <= deg(F) and deg(h) < deg(F).
// This operation is really the "transpose" of the modular composition 
// operation.

void ProjectPowers(vec_GF2& x, const vec_GF2& a, long k,
                   const GF2XArgument& H, const GF2XModulus& F);

vec_GF2 ProjectPowers(const vec_GF2& a, long k,
                   const GF2XArgument& H, const GF2XModulus& F);

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


// lower-level routines for transposed modular multiplication:

class GF2XTransMultiplier { /* ... */ };

void build(GF2XTransMultiplier& B, const GF2X& b, const GF2XModulus& F);

// build a GF2XTransMultiplier to use in the following routine:

void UpdateMap(vec_GF2& x, const vec_GF2& a, const GF2XTransMultiplier& B,
         const GF2XModulus& F);

vec_GF2 UpdateMap(const vec_GF2& a, const GF2XTransMultiplier& B,
         const GF2XModulus& 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) and deg(b) < deg(F).
// This is really the transpose of modular multiplication.
// Input may have "high order" zeroes stripped.
// Output always has high order zeroes stripped.


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

                              Minimum Polynomials

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(GF2X& h, const vec_GF2& 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(GF2X& h, const GF2X& g, const GF2XModulus& F, long m);
GF2X ProbMinPolyMod(const GF2X& g, const GF2XModulus& F, long m);

void ProbMinPolyMod(GF2X& h, const GF2X& g, const GF2XModulus& F);
GF2X ProbMinPolyMod(const GF2X& g, const GF2XModulus& 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; it always
// returns a divisor of the minimal polynomial, possibly a proper divisor.

void MinPolyMod(GF2X& h, const GF2X& g, const GF2XModulus& F, long m);
GF2X MinPolyMod(const GF2X& g, const GF2XModulus& F, long m);

void MinPolyMod(GF2X& h, const GF2X& g, const GF2XModulus& F);
GF2X MinPolyMod(const GF2X& g, const GF2XModulus& F);

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

void IrredPolyMod(GF2X& h, const GF2X& g, const GF2XModulus& F, long m);
GF2X IrredPolyMod(const GF2X& g, const GF2XModulus& F, long m);

void IrredPolyMod(GF2X& h, const GF2X& g, const GF2XModulus& F);
GF2X IrredPolyMod(const GF2X& g, const GF2XModulus& 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

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


void TraceMod(GF2& x, const GF2X& a, const GF2XModulus& F);
GF2 TraceMod(const GF2X& a, const GF2XModulus& F);

void TraceMod(GF2& x, const GF2X& a, const GF2X& f);
GF2 TraceMod(const GF2X& a, const GF2X& f);
// x = Trace(a mod f); deg(a) < deg(f)


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

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


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

                           Miscellany

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


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

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

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

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

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

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

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久99久久精品| 国产经典欧美精品| 成人午夜在线免费| 欧美男生操女生| 亚洲女子a中天字幕| 国产黄色精品视频| 精品女同一区二区| 亚洲成人av电影| 91美女福利视频| 国产精品久久久久久一区二区三区| 首页欧美精品中文字幕| 99re8在线精品视频免费播放| 久久尤物电影视频在线观看| 奇米综合一区二区三区精品视频| 在线观看av一区| 亚洲人成亚洲人成在线观看图片 | 不卡视频在线看| 91精品国产综合久久小美女| 亚洲一区在线观看视频| 色综合久久六月婷婷中文字幕| 国产偷国产偷亚洲高清人白洁| 久久国产精品一区二区| 欧美一区二区精美| 蜜臀av一级做a爰片久久| 欧美日韩精品三区| 视频一区国产视频| 日韩一区二区在线看| 人妖欧美一区二区| 6080国产精品一区二区| 五月综合激情网| 欧美一级视频精品观看| 男女性色大片免费观看一区二区| 91麻豆精品国产91久久久久久久久 | 美女网站在线免费欧美精品| 成人app在线| 国产亚洲精品7777| 99国产精品99久久久久久| 亚洲欧洲精品天堂一级| 91国产成人在线| 性做久久久久久免费观看欧美| 91 com成人网| 国产一区二区三区精品欧美日韩一区二区三区 | 国产ts人妖一区二区| 国产亚洲精品精华液| av激情亚洲男人天堂| 亚洲激情一二三区| 欧美日韩中文字幕一区| 美脚の诱脚舐め脚责91 | 天天综合色天天综合| 制服丝袜在线91| 国模一区二区三区白浆| 国产精品区一区二区三| 在线观看日韩精品| 久99久精品视频免费观看| 中文字幕 久热精品 视频在线| 91久久精品一区二区| 美女视频第一区二区三区免费观看网站| 精品伦理精品一区| av电影天堂一区二区在线观看| 亚洲成国产人片在线观看| 久久女同精品一区二区| 色哟哟一区二区| 韩国欧美一区二区| 日韩美女视频一区| 欧美变态凌虐bdsm| 色综合天天综合给合国产| 亚洲国产欧美在线人成| 久久久久国色av免费看影院| 在线观看视频一区二区| 国产乱人伦偷精品视频不卡 | 免费看欧美女人艹b| 中文字幕中文字幕一区二区 | 久久99精品国产.久久久久| 国产精品第四页| 精品黑人一区二区三区久久 | 欧美成人r级一区二区三区| 成人一级黄色片| 日韩av一区二区在线影视| 国产精品色眯眯| 日韩欧美专区在线| 色综合久久88色综合天天6| 狠狠色丁香久久婷婷综| 性做久久久久久久免费看| 国产精品免费av| 精品国一区二区三区| 欧美乱妇23p| 色丁香久综合在线久综合在线观看| 日韩avvvv在线播放| 一卡二卡三卡日韩欧美| 国产精品久久久爽爽爽麻豆色哟哟| 欧美一区二区三级| 欧美日韩一区二区三区免费看| 成人综合在线观看| 狠狠色综合播放一区二区| 偷拍亚洲欧洲综合| 亚洲自拍偷拍av| 亚洲日穴在线视频| 国产日产欧产精品推荐色| 欧美精品在欧美一区二区少妇| 91精品91久久久中77777| 成人av综合一区| 国产乱子轮精品视频| 免费观看成人av| 三级一区在线视频先锋| 亚洲国产精品久久久男人的天堂| 中文字幕一区不卡| 国产精品毛片高清在线完整版| 久久精品亚洲乱码伦伦中文| 日韩欧美123| 精品国产乱码久久久久久浪潮| 欧美一级理论片| 欧美一区二区三区四区在线观看 | 欧美一区二区三区四区在线观看 | 欧美三级日韩三级| 欧美日韩亚洲综合在线| 欧美日韩精品是欧美日韩精品| 欧美日韩激情在线| 欧美精选午夜久久久乱码6080| 欧美日本一区二区在线观看| 欧美乱妇20p| 欧美一区二区在线播放| 欧美一区二区三区四区高清| 日韩免费观看2025年上映的电影 | 欧美成人一级视频| 欧美成人福利视频| 欧美极品少妇xxxxⅹ高跟鞋 | 91成人在线精品| 精品视频一区二区不卡| 这里只有精品99re| 亚洲精品在线网站| 中文字幕在线免费不卡| 艳妇臀荡乳欲伦亚洲一区| 午夜av一区二区三区| 精品中文字幕一区二区小辣椒| 国产成人自拍网| 色婷婷国产精品综合在线观看| 欧美三级韩国三级日本三斤| 日韩欧美一级二级三级久久久| 久久久精品综合| 亚洲免费在线视频一区 二区| 视频一区中文字幕| 国产91丝袜在线18| 欧美日韩在线直播| 久久久综合视频| 伊人婷婷欧美激情| 麻豆极品一区二区三区| av在线不卡免费看| 欧美一区二区免费| 国产精品国产三级国产aⅴ入口| 亚洲一区二区3| 国产成人精品免费| 欧美人牲a欧美精品| 中文字幕欧美国产| 日本美女一区二区| 97精品视频在线观看自产线路二| 日韩一区二区精品在线观看| 国产精品久久久久影视| 麻豆成人免费电影| 欧洲激情一区二区| 国产精品天干天干在线综合| 石原莉奈在线亚洲二区| 91视频在线观看| 26uuu欧美| 日韩国产精品久久久| kk眼镜猥琐国模调教系列一区二区| 51午夜精品国产| 亚洲精品国产一区二区精华液| 久久99久久久久| 欧美日韩亚州综合| 1024亚洲合集| 国产成人精品免费看| 精品精品国产高清一毛片一天堂| 亚洲高清免费观看| 在线精品亚洲一区二区不卡| 国产精品伦理在线| 国产成人在线视频网站| 日韩亚洲欧美一区| 视频一区二区不卡| 欧美日韩国产综合视频在线观看| 亚洲精品写真福利| aaa欧美色吧激情视频| 国产精品天天看| 国产激情一区二区三区| 久久影院视频免费| 国产精品66部| 久久久青草青青国产亚洲免观| 精品一区二区日韩| 日韩精品一区二区三区蜜臀| 日本在线不卡视频| 日韩欧美电影一区| 久久99久久99精品免视看婷婷| 日韩欧美一区二区视频| 青青草97国产精品免费观看| 日韩一卡二卡三卡四卡| 日韩主播视频在线| 欧美一区二区三区在线| 日本不卡一二三| 久久一留热品黄| 高清在线观看日韩| 中文字幕亚洲成人|