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

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

?? gf2e.txt

?? 一個比較通用的大數運算庫
?? TXT
字號:


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

MODULE: GF2E

SUMMARY:

The class GF2E is used to represent polynomials in F_2[X] modulo a
polynomial P.  The modulus P may be any polynomial with deg(P) > 0,
not necessarily irreducible.  

Objects of the class GF2E are represented as a GF2X of degree < deg(P).

An executing program maintains a "current modulus", which is set to P
using GF2E::init(P).  The current modulus *must* be initialized before
any GF2E constructors are invoked.

The modulus may be changed, and a mechanism is provided for saving and
restoring a modulus (see classes GF2EBak and GF2EContext below).


NOTE: if P is a trinomial X^n + X^k + 1, or a pentanomial
X^n + X^k3 + X^k2 + X^k1 + 1, or of the form X^n + g, where
g has low degree, then performance will be somewhat improved.
Such polynomials are constructed by the routines
BuildSparseIrred and BuildIrred in GF2XFactoring.


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

#include <NTL/GF2X.h>

class GF2E {
public:
   
   GF2E(); // initial value 0

   GF2E(const GF2E& a); // copy constructor
   
   GF2E& operator=(const GF2E& a); // assignment
   GF2E& operator=(GF2 a); // assignment
   GF2E& operator=(long a); // assignment
   
   ~GF2E(); // destructor

   void init(const GF2X& P);
   // GF2E::init(P) initializes the current modulus to P;
   // required: deg(P) >= 1.
   
   static const GF2XModulus& modulus();
   // GF2E::modulus() yields read-only reference to the current modulus 

   static long degree();
   // GF2E::degree() returns deg(P)
};


const GF2X& rep(const GF2E& a); // read-only access to representation of a



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

                                  Comparison

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

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

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

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


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

                                    Addition 

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

// operator notation:

GF2E operator+(const GF2E& a, const GF2E& b);

GF2E operator-(const GF2E& a, const GF2E& b);
GF2E operator-(const GF2E& a);

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

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

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

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

// procedural versions:

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

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


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

                                  Multiplication 

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


// operator notation:

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

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

// procedural versions:


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

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

// PROMOTIONS: *, mul promote {long, GF2} to GF2E on (a, b).


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

                                     Division

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


// operator notation:

GF2E operator/(const GF2E& a, const GF2E& b);

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


// procedural versions:

void div(GF2E& x, const GF2E& a, const GF2E& b);
// x = a/b.  If b is not invertible, an error is raised.

void inv(GF2E& x, const GF2E& a);
GF2E inv(const GF2E& a);
// x = 1/a

PROMOTIONS: /, div promote {long, GF2} to GF2E on (a, b).


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

                                  Exponentiation

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



void power(GF2E& x, const GF2E& a, const ZZ& e); 
GF2E power(const GF2E& a, const ZZ& e);

void power(GF2E& x, const GF2E& a, long e); 
GF2E power(const GF2E& a, long e);

// x = a^e (e may be negative)



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

                               Random Elements

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


void random(GF2E& x);
GF2E random_GF2E();
// x = random element in GF2E.

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

                                  Traces

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


void trace(GF2& x, const GF2E& a);  // x = trace of a
GF2 trace(const GF2E& a);



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

                                Input/Output

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


ostream& operator<<(ostream& s, const GF2E& a);

istream& operator>>(istream& s, GF2E& x);
// a GF2X is read and reduced mod p


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

                       Modulus Switching 

A class GF2EBak is provided for "backing up" the current modulus.

Here is what you do to save the current modulus, temporarily
set it to something new, and then restore it:

   GF2EBak bak;
   bak.save();   // save current modulus (if any)

   GF2E::init(P);  // set modulus to desired value P

      // ...

   bak.restore(); // restore old modulus (if any)

Note that between the save and restore, you may have several calls to
GF2E::init, each of which simply clobbers the previous modulus.

The GF2EBak interface is good for implementing simple stack-like
modulus "context switching".  For more general context switching,
see GF2EContext below.

..........................................................................

When the current modulus is changed, there may be extant
GF2E objects. If the old modulus was saved and then later restored, 
these objects can be used again as if the modulus had never changed.  
Note, however, that if a GF2E object is created under one modulus 
and then used in any way (except destroyed) under another, 
program behavior is not predictable.  This condition is not
explicitly checked for, but an error is likely to be raised.
One should also not presume that things will work properly
if the modulus is changed, but its value happens to be the same---
one should restore the same "context", from either a GF2EBak
or a GF2EContext object.  This is anyway more efficient.

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




class GF2EBak {
public:

   // To describe this logic, think of a GF2EBak object
   // of having two components: a modulus Q (possibly "null") and 
   // an "auto-restore bit" b.

   // There is also a global current modulus P (initially "null").

   GF2EBak();  // Q = "null", b = 0

   ~GF2EBak();  // if (b) P = Q

   void save();  // Q = P, b = 1 
   void restore();  // P = Q, b = 0


private:
   GF2EBak(const GF2EBak&);  // copy disabled
   void operator=(const GF2EBak&);  // assignment disabled
};


// more general context switching:

class GF2EContext {

// A GF2EContext object has a modulus Q (possibly "null"),
// but has no auto-restore bit like a GF2EBak object.
// However, these objects can be initialized and copied with
// complete generality.

// As above, P is the current global modulus (initially "null")

public:

GF2EContext(); // Q = "null"
GF2EContext(const GF2X& new_Q); // Q = new_Q

void save(); // Q = P
void restore() const; // P = Q

GF2EContext(const GF2EContext&);  // copy
GF2EContext& operator=(const GF2EContext&); // assignment
~GF2EContext(); // destructor


};


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

                               Miscellany

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

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

static const GF2E& GF2E::zero();
// GF2E::zero() yields a read-only reference to zero

static long GF2X::WordLength();
// GF2E::size() returns # of words needed to store a polynomial of
// degree < GF2E::degree()

void swap(GF2E& x, GF2E& y);
// swap x and y (done by "pointer swapping", if possible).

static ZZ& GF2E::cardinality();
// yields the cardinality, i.e., 2^{GF2E::degree()}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品国产精品亚洲红杏| 亚洲国产精品成人久久综合一区 | 国产精品美女久久久久久久久 | 天天综合网 天天综合色| 亚洲图片另类小说| 中文字幕一区二区视频| 国产精品成人午夜| 最近中文字幕一区二区三区| 国产精品美女一区二区三区| 亚洲天堂免费在线观看视频| 中文字幕一区二区三区蜜月| 国产精品色呦呦| 中文字幕一区二区不卡 | 在线免费不卡电影| 色婷婷国产精品| 欧美日韩日日摸| 91精品久久久久久久99蜜桃| 日韩一区二区三区电影在线观看| 欧美一级视频精品观看| 精品国产髙清在线看国产毛片 | 91免费版在线| 欧美三级电影网| 日韩视频一区二区在线观看| 国产视频亚洲色图| 亚洲日本一区二区三区| 石原莉奈在线亚洲三区| 精品在线你懂的| 99亚偷拍自图区亚洲| 欧美日韩国产123区| 精品处破学生在线二十三| 中文字幕精品一区二区三区精品| 国产精品久久久久aaaa| 性做久久久久久| 国产一区二区三区在线看麻豆| 成人国产精品视频| 欧美高清性hdvideosex| 久久久蜜桃精品| 亚洲色图色小说| 日本aⅴ精品一区二区三区| 福利一区二区在线观看| 欧美中文字幕久久| 2020国产精品久久精品美国| 亚洲精品国产a| 国产一区福利在线| 欧美日韩综合一区| 国产精品视频看| 麻豆精品国产传媒mv男同| a级精品国产片在线观看| 欧美一级理论性理论a| 国产精品久久777777| 乱一区二区av| 欧美三级蜜桃2在线观看| 中文字幕精品一区二区三区精品| 秋霞av亚洲一区二区三| 欧亚洲嫩模精品一区三区| 精品成人一区二区三区| 亚洲福利国产精品| 色综合久久久久久久| 欧美国产精品专区| 久久成人免费电影| 欧美日韩成人在线| 亚洲美女偷拍久久| 国产成人av自拍| 日韩一级二级三级| 日韩福利视频导航| 欧美裸体一区二区三区| 一区二区三区四区精品在线视频| 成人免费毛片片v| 欧美精品一区二区精品网| 午夜亚洲国产au精品一区二区| 一本久道久久综合中文字幕| 综合激情网...| 99精品欧美一区| 亚洲三级免费电影| 在线视频欧美区| 亚洲一二三四在线观看| 欧美亚洲愉拍一区二区| 一区二区三区在线观看动漫| 色哟哟一区二区| 五月天激情综合网| 91精品国产福利在线观看| 蜜桃传媒麻豆第一区在线观看| 9191国产精品| 日韩高清电影一区| 91精品国产品国语在线不卡| 亚洲欧美在线观看| 欧美撒尿777hd撒尿| 亚洲国产欧美在线| 色呦呦网站一区| 一区二区免费在线| 99久久精品久久久久久清纯| 欧美激情在线观看视频免费| 日一区二区三区| 欧美精品v日韩精品v韩国精品v| 一区二区三区不卡在线观看| 91在线观看污| 亚洲高清在线视频| 久久影视一区二区| 国产剧情av麻豆香蕉精品| 久久久国产精品不卡| 国产电影一区在线| 亚洲欧美一区二区视频| 99精品久久99久久久久| 爽好久久久欧美精品| 欧美不卡视频一区| 国产一区在线观看麻豆| 国产精品国产三级国产a| 在线视频欧美区| 麻豆精品视频在线观看视频| 中文字幕亚洲区| 色噜噜夜夜夜综合网| 亚洲综合久久av| 欧美大尺度电影在线| 国产jizzjizz一区二区| 亚洲国产日韩a在线播放| 色婷婷国产精品| 国产精品一区二区三区四区| 欧美激情一区二区三区全黄| 欧洲亚洲精品在线| 青青草原综合久久大伊人精品优势 | 夜夜嗨av一区二区三区中文字幕| 在线免费观看日本一区| 国产精品亚洲综合一区在线观看| 综合久久给合久久狠狠狠97色| 欧美精品v国产精品v日韩精品| 国内久久婷婷综合| 亚洲日穴在线视频| 日韩免费一区二区| 欧美亚洲精品一区| 国产激情一区二区三区| 亚洲午夜三级在线| 久久久综合网站| 欧美日韩一区二区三区免费看 | 3d成人h动漫网站入口| 激情图片小说一区| 一区二区三区四区激情| 欧美极品xxx| 日韩亚洲欧美一区| 色又黄又爽网站www久久| 极品美女销魂一区二区三区免费| 国产精品视频九色porn| 精品免费一区二区三区| 日本韩国一区二区| 国产成人精品亚洲777人妖| 天涯成人国产亚洲精品一区av| 国产精品午夜在线| 欧美一区2区视频在线观看| 欧美日韩一二三| 91亚洲精品久久久蜜桃| 国产成人午夜高潮毛片| 裸体健美xxxx欧美裸体表演| 亚洲妇女屁股眼交7| 亚洲va中文字幕| 亚洲一区中文日韩| 国产一区二区三区免费观看| 五月婷婷久久丁香| 亚洲一级片在线观看| 日日摸夜夜添夜夜添精品视频 | 久久国产免费看| 美腿丝袜亚洲综合| 香蕉久久夜色精品国产使用方法 | 国产乱码精品1区2区3区| 天堂在线亚洲视频| 亚洲午夜久久久久久久久久久| 国产精品久久久久毛片软件| 国产精品天美传媒| 国产视频一区在线观看| 久久久av毛片精品| 久久久久久久久久久电影| 久久久精品免费网站| av电影在线观看一区| 色综合久久88色综合天天| 成人av在线影院| av电影在线观看不卡| 欧美一区二区三区精品| 日韩一区二区高清| 337p亚洲精品色噜噜| 欧美精品日韩一本| 亚洲一区二区三区在线| 亚洲四区在线观看| 中文字幕欧美国产| 亚洲欧美欧美一区二区三区| 亚洲国产成人av| 视频一区欧美日韩| 黑人巨大精品欧美一区| 国产乱码精品一区二区三区忘忧草| 久久成人久久爱| 九色porny丨国产精品| 91丝袜国产在线播放| 在线精品视频一区二区三四| 欧美挠脚心视频网站| 日韩欧美国产综合| 欧美精品黑人性xxxx| 国产精品久久久久影院色老大| 国产精品久久久久婷婷| 亚洲电影一级片| 国产高清在线观看免费不卡| 91丝袜美女网| 51久久夜色精品国产麻豆| 国产丝袜在线精品|