亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
精品三级在线看| 欧美成人激情免费网| 国产麻豆视频一区二区| 欧美aⅴ一区二区三区视频| 一二三四社区欧美黄| 亚洲欧美日韩国产中文在线| 成人免费在线视频观看| 亚洲视频一区二区免费在线观看| 国产精品欧美一级免费| 1024国产精品| 亚洲午夜电影在线| 日韩高清不卡一区二区三区| 精品综合久久久久久8888| 久久99精品一区二区三区三区| 国产尤物一区二区| 91麻豆精品一区二区三区| 在线精品视频一区二区| 717成人午夜免费福利电影| 日韩亚洲欧美一区| 欧美国产视频在线| 亚洲精品综合在线| 男女男精品视频网| 粉嫩aⅴ一区二区三区四区| 97超碰欧美中文字幕| 欧美日韩1234| 欧美激情艳妇裸体舞| 亚洲综合成人在线视频| 美女看a上一区| 97国产一区二区| 日韩欧美国产一区二区三区| 欧美激情一区二区三区四区| 香蕉av福利精品导航| 国产一区中文字幕| 欧美羞羞免费网站| 精品国产欧美一区二区| 亚洲久草在线视频| 国产精品自在在线| 欧美麻豆精品久久久久久| 久久久精品免费观看| 亚洲一区免费在线观看| 国产suv精品一区二区883| 欧美日韩情趣电影| 国产精品美女久久久久久久久久久 | 成人av网在线| 欧美高清在线一区二区| 亚洲免费在线视频| 国产美女在线精品| 欧美日韩国产美| 亚洲免费电影在线| 国产盗摄一区二区| 91麻豆精品国产91久久久久久久久 | 成熟亚洲日本毛茸茸凸凹| 欧美日韩一区二区三区不卡| 国产亚洲一区二区三区| 日韩成人一区二区三区在线观看| 色综合天天综合色综合av| 国产欧美精品一区二区色综合| 日本不卡在线视频| 欧美视频在线不卡| 一区二区三区免费在线观看| 国产91在线看| 亚洲精品在线一区二区| 日韩影院精彩在线| 欧美精品在线视频| 亚洲国产日韩a在线播放性色| 成人av在线电影| 国产精品水嫩水嫩| 成人永久aaa| 国产女主播一区| 国产精品一区一区三区| 久久久99精品免费观看不卡| 精品综合久久久久久8888| 精品三级在线观看| 国产露脸91国语对白| 国产欧美视频在线观看| 国产精品99精品久久免费| 国产欧美久久久精品影院| 国产精品 日产精品 欧美精品| 久久无码av三级| 国产高清在线观看免费不卡| 国产三级欧美三级日产三级99| 韩国成人精品a∨在线观看| 精品成人私密视频| 国产另类ts人妖一区二区| 国产女主播一区| 色综合中文综合网| 国产欧美一区二区三区鸳鸯浴| 国产一区二区三区久久悠悠色av| 久久蜜桃av一区精品变态类天堂 | 日韩高清不卡一区二区| 日韩亚洲欧美成人一区| 精品一区二区在线视频| 久久婷婷综合激情| 99精品视频中文字幕| 一区二区三区在线观看欧美| 在线观看视频91| 91免费版pro下载短视频| 亚洲国产一区二区三区| 337p亚洲精品色噜噜| 国产尤物一区二区在线| 国产精品久久久久久户外露出| 色综合久久久久久久| 日韩中文字幕亚洲一区二区va在线| 欧美一区二区啪啪| 国产成人综合亚洲网站| 亚洲国产成人av| 久久久久久久久久看片| 欧洲av一区二区嗯嗯嗯啊| 美女精品自拍一二三四| 国产精品传媒在线| 日韩一区二区不卡| 99久久99久久久精品齐齐| 亚洲va国产天堂va久久en| 久久综合狠狠综合久久综合88| 色综合久久99| 狠狠色狠狠色合久久伊人| 一区二区三区 在线观看视频| 精品国产一区二区三区四区四| 色一情一乱一乱一91av| 国产精品99久久久久久似苏梦涵| 一区二区在线观看视频在线观看| 久久亚洲影视婷婷| 制服丝袜一区二区三区| 91视视频在线观看入口直接观看www | 国产日韩影视精品| 69久久99精品久久久久婷婷| 国产成人自拍网| 免费观看91视频大全| 亚洲精品视频在线观看免费| 26uuu欧美日本| 欧美精品久久久久久久久老牛影院| 福利一区二区在线观看| 久久国产精品一区二区| 亚洲午夜在线视频| 一区视频在线播放| 国产日韩高清在线| 精品处破学生在线二十三| 欧美一三区三区四区免费在线看 | 欧美性生交片4| 99久久久久免费精品国产| 国产一区高清在线| 久久er99热精品一区二区| 日韩高清不卡在线| 天天色综合天天| 日韩高清不卡一区二区三区| 亚洲成人一区二区| 午夜av区久久| 亚洲mv在线观看| 亚洲va韩国va欧美va精品| 亚洲成人中文在线| 日产国产高清一区二区三区| 美女免费视频一区二区| 久久国产生活片100| 国产毛片精品视频| 国产精品一线二线三线| 国产经典欧美精品| 成人在线视频一区| yourporn久久国产精品| jvid福利写真一区二区三区| 99久久精品情趣| 欧美在线观看一区二区| 在线观看91视频| 欧美日韩黄色一区二区| 日韩免费看网站| 久久精品日韩一区二区三区| 国产精品视频一二三区| 亚洲日本韩国一区| 亚洲一区二三区| 久久激情五月激情| 处破女av一区二区| 欧美自拍丝袜亚洲| 欧美一区二区三区在线观看| 欧美变态口味重另类| 欧美韩日一区二区三区四区| 一级特黄大欧美久久久| 久久激五月天综合精品| 成人黄色大片在线观看| 欧美日韩成人综合在线一区二区| 欧美草草影院在线视频| 国产精品三级视频| 亚洲小少妇裸体bbw| 精彩视频一区二区| 99精品视频在线观看免费| 欧美日韩第一区日日骚| 久久久99精品免费观看| 亚洲午夜一区二区| 激情图区综合网| 欧美在线观看视频一区二区 | 欧美一区二区视频免费观看| 久久久久久久综合狠狠综合| 亚洲欧美精品午睡沙发| 麻豆精品一区二区三区| 97久久精品人人做人人爽50路| 5858s免费视频成人| 中文字幕一区二区三区四区不卡| 亚洲mv大片欧洲mv大片精品| 福利电影一区二区三区| 日韩精品在线看片z| 亚洲免费观看高清完整版在线| 国内精品久久久久影院色|