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

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

?? zz_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/ZZ_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一区二区三区免费野_久草精品视频
亚洲一区二区三区影院| 成人av一区二区三区| 国产成人无遮挡在线视频| 色婷婷久久久久swag精品| 精品国产三级电影在线观看| 亚洲精品菠萝久久久久久久| 国产在线精品一区在线观看麻豆| 一本色道久久加勒比精品| 久久久亚洲高清| 石原莉奈在线亚洲二区| 色婷婷久久久亚洲一区二区三区| 久久伊99综合婷婷久久伊| 午夜日韩在线观看| 色女孩综合影院| 亚洲婷婷综合久久一本伊一区| 激情小说欧美图片| 欧美一级xxx| 日韩1区2区日韩1区2区| 欧美视频一区二区三区在线观看 | 国产一区二区伦理| 欧美精品高清视频| 亚洲精选视频免费看| 成人国产精品免费| 国产日韩欧美一区二区三区综合| 国产资源精品在线观看| 2014亚洲片线观看视频免费| 久久国产三级精品| 精品国产成人系列| 国模大尺度一区二区三区| 精品噜噜噜噜久久久久久久久试看| 日韩精品色哟哟| 69堂成人精品免费视频| 日本亚洲视频在线| 日韩午夜精品视频| 另类中文字幕网| 久久久欧美精品sm网站| 国产一区二区三区美女| 久久日一线二线三线suv| 国产美女视频91| 国产精品理论片在线观看| 成人国产精品免费观看视频| 亚洲免费资源在线播放| 欧美视频第二页| 青青草精品视频| 精品日产卡一卡二卡麻豆| 国产不卡视频在线播放| 综合久久国产九一剧情麻豆| 91在线免费看| 亚洲成人av一区二区三区| 日韩一区二区三区在线观看| 国产一区二区看久久| 亚洲欧美综合在线精品| 91久久精品一区二区三| 日韩电影在线观看一区| www国产精品av| 91免费看`日韩一区二区| 亚洲成人福利片| 精品处破学生在线二十三| av成人免费在线| 亚洲精品自拍动漫在线| 欧美一级二级在线观看| 成人精品小蝌蚪| 亚洲午夜一二三区视频| 亚洲精品一区二区精华| 91欧美一区二区| 麻豆高清免费国产一区| 国产精品国产三级国产| 欧美日韩mp4| 成人av网站在线| 视频一区视频二区在线观看| 中文字幕欧美日韩一区| 欧美日韩一区中文字幕| 国产一区二区网址| 亚洲成人免费在线观看| 中文字幕国产一区| 欧美一级国产精品| 色综合色狠狠综合色| 国产麻豆9l精品三级站| 丝袜脚交一区二区| 中文字幕亚洲在| 日韩免费一区二区| 欧美日韩五月天| av在线这里只有精品| 国内欧美视频一区二区| 丝袜亚洲另类欧美| 亚洲乱码一区二区三区在线观看| 欧美mv和日韩mv的网站| 欧美日韩一区高清| av一区二区三区在线| 狠狠色伊人亚洲综合成人| 日韩国产一区二| 亚洲午夜久久久久久久久久久 | 天天综合天天综合色| **性色生活片久久毛片| 久久久久久黄色| 91精品国产综合久久精品图片 | 日本不卡的三区四区五区| 亚洲欧洲中文日韩久久av乱码| 国产丝袜欧美中文另类| 精品久久久久久久久久久院品网| 欧美女孩性生活视频| 色综合一区二区| 91亚洲国产成人精品一区二三| 成人午夜私人影院| 国产激情91久久精品导航| 激情综合色播激情啊| 精一区二区三区| 久久97超碰色| 精品在线播放免费| 寂寞少妇一区二区三区| 久久不见久久见中文字幕免费| 麻豆久久久久久| 美国精品在线观看| 国产麻豆视频一区二区| 国产suv精品一区二区6| 成人午夜在线视频| 99久久免费精品| 色哟哟欧美精品| 欧美性受xxxx黑人xyx性爽| 欧美吞精做爰啪啪高潮| 在线91免费看| 欧美不卡视频一区| 国产校园另类小说区| 欧美国产一区二区在线观看| 国产精品久久午夜| 一区二区成人在线| 亚洲bt欧美bt精品| 狠狠色丁香久久婷婷综| 国产精品综合在线视频| 成人av电影在线| 色综合久久综合网97色综合| 欧美日韩精品系列| 精品日韩99亚洲| 亚洲欧美综合另类在线卡通| 一区二区三区国产| 麻豆免费看一区二区三区| 国产成人av在线影院| 97se亚洲国产综合自在线不卡 | 精品国产伦一区二区三区观看方式| 精品久久国产老人久久综合| 国产日韩欧美综合一区| 一区二区三区不卡视频| 久久99精品久久久久久| 不卡一区中文字幕| 在线综合视频播放| 国产精品久久久久久久久免费桃花| 亚洲综合免费观看高清完整版| 蜜桃视频在线一区| 91小视频在线| 欧美成人三级在线| 一区二区三区影院| 韩国毛片一区二区三区| 一本到不卡精品视频在线观看 | 欧美精品在欧美一区二区少妇| 精品久久久久香蕉网| 亚洲人成精品久久久久久| 久久精品av麻豆的观看方式| 不卡电影一区二区三区| 91精品国产欧美一区二区成人| 国产欧美日本一区视频| 亚洲成人一区二区| 成人app下载| 日韩一区二区三区av| 亚洲欧美成人一区二区三区| 久久99精品国产麻豆婷婷洗澡| 91亚洲永久精品| 久久尤物电影视频在线观看| 亚洲综合在线第一页| 国产成人av一区二区三区在线| 欧美日韩精品一区二区三区蜜桃| 中文字幕成人网| 激情综合一区二区三区| 欧美日韩一区二区电影| 亚洲色图一区二区三区| 国产成人综合精品三级| 5566中文字幕一区二区电影| 亚洲综合久久av| 色综合色狠狠综合色| 欧美国产激情二区三区| 国内精品久久久久影院薰衣草| 欧美三级日韩三级| 一区二区三区四区蜜桃| 99久久99久久精品国产片果冻| 久久久久9999亚洲精品| 久久aⅴ国产欧美74aaa| 在线成人av影院| 亚洲国产日韩一级| 91精品91久久久中77777| 亚洲欧洲精品一区二区精品久久久 | 丁香婷婷综合激情五月色| 日韩欧美高清一区| 麻豆传媒一区二区三区| 日韩精品一区二区三区视频在线观看| 亚洲国产日日夜夜| 欧美日韩在线一区二区| 亚洲成av人片一区二区梦乃| 欧美日韩综合色| 午夜精品福利一区二区蜜股av| 色偷偷成人一区二区三区91| 亚洲精品乱码久久久久久久久|