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

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

?? lzz_pe.txt

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


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

MODULE: zz_pE

SUMMARY:

The class zz_pE is used to represent polynomials in Z_p[X] modulo a
polynomial P.  The modulus P may be any polynomial with deg(P) > 0,
not necessarily irreducible.  The modulus p defining Z_p need
not be prime either.

Objects of the class zz_pE are represented as a zz_pX of degree < deg(P).

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

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


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

#include <NTL/lzz_pX.h>

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

   zz_pE(const zz_pE& a); // copy constructor
   
   zz_pE& operator=(const zz_pE& a); // assignment
   zz_pE& operator=(const zz_p& a); // assignment
   zz_pE& operator=(long a); // assignment
   
   ~zz_pE(); // destructor

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

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


const zz_pX& rep(const zz_pE& a); // read-only access to representation of a



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

                                  Comparison

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

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

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

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


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

                                    Addition 

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

// operator notation:

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

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

zz_pE& operator+=(zz_pE& x, const zz_pE& a);
zz_pE& operator+=(zz_pE& x, const zz_p& a);
zz_pE& operator+=(zz_pE& x, long a);

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

zz_pE& operator-=(zz_pE& x, const zz_pE& a);
zz_pE& operator-=(zz_pE& x, const zz_p& a);
zz_pE& operator-=(zz_pE& x, long a);

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

// procedural versions:

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

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


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

                                  Multiplication 

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


// operator notation:

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

zz_pE& operator*=(zz_pE& x, const zz_pE& a);
zz_pE& operator*=(zz_pE& x, const zz_p& a);
zz_pE& operator*=(zz_pE& x, long a);

// procedural versions:


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

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

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



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

                                     Division

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


// operator notation:

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

zz_pE& operator/=(zz_pE& x, const zz_pE& a);
zz_pE& operator/=(zz_pE& x, const zz_p& a);
zz_pE& operator/=(zz_pE& x, long a);


// procedural versions:

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

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

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


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

                                  Exponentiation

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



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

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

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



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

                               Random Elements

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


void random(zz_pE& x);
zz_pE random_zz_pE();
// x = random element in zz_pE.

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

                               Norms and Traces

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



void trace(zz_p& x, const zz_pE& a);  // x = trace of a
zz_p trace(const zz_pE& a);

void norm(zz_p& x, const zz_pE& a);   // x = norm of a
zz_p norm(const zz_pE& a);



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

                                Input/Output

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


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

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


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

                       Modulus Switching 

A class zz_pEBak 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:

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

   zz_pE::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
zz_pE::init, each of which simply clobbers the previous modulus.

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

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

When the current modulus is changed, there may be extant
zz_pE 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 zz_pE 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 zz_pEBak
or a zz_pEContext object.  This is anyway more efficient.

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




class zz_pEBak {
public:

   // To describe this logic, think of a zz_pEBak 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").

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

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

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


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


// more general context switching:

class zz_pEContext {

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

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

public:

zz_pEContext(); // Q = "null"
zz_pEContext(const zz_pX& new_Q); // Q = new_Q

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

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


};


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

                               Miscellany

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

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

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

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

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产凹凸在线观看一区二区| 午夜日韩在线观看| 2017欧美狠狠色| 日韩三级在线免费观看| 欧美一区二区三区四区五区| 欧美蜜桃一区二区三区 | 欧美挠脚心视频网站| 欧美视频一区在线| 亚洲一线二线三线久久久| 亚洲一区视频在线| 亚洲日本丝袜连裤袜办公室| 91精品婷婷国产综合久久性色| 亚洲综合久久av| 午夜精品久久一牛影视| 成人中文字幕合集| 精品99久久久久久| 日韩精品电影在线观看| 色综合久久中文综合久久牛| 中文字幕不卡在线观看| 狠狠色狠狠色综合| 欧美一级一级性生活免费录像| 一区二区三区波多野结衣在线观看 | 欧美日韩亚洲不卡| 亚洲码国产岛国毛片在线| 国产成人免费视频精品含羞草妖精| 欧美一级二级三级乱码| 日本一区中文字幕| 欧美肥妇bbw| 日韩专区中文字幕一区二区| 欧美日韩一区二区三区在线 | 日韩一区二区精品在线观看| 亚洲电影中文字幕在线观看| 91在线视频网址| 一区二区在线观看不卡| 91无套直看片红桃| 亚洲精选一二三| 色菇凉天天综合网| 一区二区三区视频在线观看| 在线一区二区视频| 五月激情丁香一区二区三区| 欧美日韩免费一区二区三区 | 久久精品国产亚洲高清剧情介绍 | 国模套图日韩精品一区二区| 日韩一区二区三区免费看 | 视频一区二区中文字幕| 欧美福利一区二区| 美女在线观看视频一区二区| 精品电影一区二区| 国产成人啪午夜精品网站男同| 亚洲国产成人在线| 91农村精品一区二区在线| 亚洲一区影音先锋| 欧美一级生活片| 国产精品系列在线播放| 自拍视频在线观看一区二区| 欧美手机在线视频| 久久66热re国产| 中文字幕久久午夜不卡| 欧美色偷偷大香| 国产最新精品免费| 亚洲免费观看在线视频| 91麻豆精品国产91久久久久久久久| 精品在线一区二区三区| 日韩一区在线免费观看| 在线不卡中文字幕| 国产成人免费在线观看| 亚洲国产欧美日韩另类综合| 日韩一二三四区| 99久久国产综合精品色伊 | 亚洲一二三区在线观看| 欧美一区二区在线观看| 不卡大黄网站免费看| 日本在线不卡视频一二三区| 国产精品人妖ts系列视频| 91精品国产一区二区人妖| 国产高清亚洲一区| 午夜精品久久一牛影视| 中文字幕在线不卡国产视频| 欧美一区在线视频| 97se亚洲国产综合自在线观| 久久精品国产一区二区三| 亚洲乱码国产乱码精品精98午夜 | 国产美女av一区二区三区| 亚洲综合色婷婷| 国产女主播视频一区二区| 在线91免费看| 99久久免费精品高清特色大片| 日日夜夜免费精品| 亚洲精品久久嫩草网站秘色| 欧美国产一区在线| 精品动漫一区二区三区在线观看| 91久久奴性调教| 国产91露脸合集magnet| 天天综合色天天综合色h| 国产校园另类小说区| 7777精品伊人久久久大香线蕉经典版下载| 国产一区二区三区不卡在线观看| 亚洲一区二区高清| 国产精品久久毛片| 精品久久一区二区| 欧美电影影音先锋| 欧美亚洲综合网| aaa欧美日韩| 99精品热视频| caoporen国产精品视频| 懂色av一区二区在线播放| 国产在线一区二区综合免费视频| 蜜臀精品久久久久久蜜臀| 午夜精品在线看| 亚洲一区免费在线观看| 一区二区三区在线不卡| 亚洲欧美另类图片小说| 国产精品久久久久三级| 中文字幕一区二区视频| 国产精品久久久久aaaa樱花| 国产精品日产欧美久久久久| 国产精品久久午夜| 自拍偷拍亚洲欧美日韩| 一区二区三区四区视频精品免费| 日韩毛片在线免费观看| 亚洲精品国久久99热| 亚洲自拍另类综合| 午夜精品在线看| 奇米影视7777精品一区二区| 麻豆精品精品国产自在97香蕉| 精品无人码麻豆乱码1区2区 | 成人精品一区二区三区中文字幕 | 一区二区三区成人| 午夜精品一区二区三区免费视频| 图片区小说区国产精品视频| 欧美aaa在线| 国产一区二区三区视频在线播放| 国产夫妻精品视频| 色综合天天综合狠狠| 91高清在线观看| 日韩免费性生活视频播放| 久久久久久久久蜜桃| 国产精品成人网| 性做久久久久久久免费看| 麻豆国产精品官网| 成人深夜在线观看| 欧美性猛片aaaaaaa做受| 日韩一区二区三区免费观看| 国产色产综合色产在线视频| 亚洲黄色在线视频| 九九热在线视频观看这里只有精品| 国产成人福利片| 欧美天堂一区二区三区| 精品国产一区二区三区不卡| 国产精品久久久久影院亚瑟 | 国产一区二区三区不卡在线观看 | 精品久久人人做人人爰| 国产精品麻豆欧美日韩ww| 亚洲午夜免费福利视频| 国产乱人伦精品一区二区在线观看| 99久久久国产精品免费蜜臀| 555夜色666亚洲国产免| 国产精品久久久久久久久晋中| 亚洲高清免费在线| 成人免费毛片a| 日韩一级二级三级精品视频| 亚洲天堂免费在线观看视频| 日韩**一区毛片| 色欧美片视频在线观看| 久久午夜色播影院免费高清| 亚洲一区二区三区三| 国产a视频精品免费观看| 欧美老年两性高潮| 中文字幕综合网| 国产精一区二区三区| 日韩亚洲欧美成人一区| 一区二区三区美女视频| 久久99这里只有精品| 欧美日韩午夜在线| 亚洲欧洲色图综合| 高清国产午夜精品久久久久久| 欧美一区二区精品| 亚洲一区二区在线免费观看视频| 成人福利电影精品一区二区在线观看| 欧美日韩成人在线一区| 亚洲男人的天堂av| 99精品桃花视频在线观看| 国产欧美精品一区aⅴ影院| 蜜臀国产一区二区三区在线播放| 在线看不卡av| 亚洲日本va在线观看| 成人综合婷婷国产精品久久蜜臀| 精品福利一二区| 久久爱www久久做| 日韩免费视频一区| 玖玖九九国产精品| 欧美一级二级三级乱码| 免费在线看成人av| 欧美高清性hdvideosex| 一区二区三区国产精华| 色综合久久久久综合体| 亚洲欧洲日产国码二区| 成人午夜视频网站| 欧美激情一区二区在线| 国产成a人亚洲精|