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

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

?? zz_p.txt

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


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

MODULE: ZZ_p

SUMMARY:

The class ZZ_p is used to represent integers mod p.  The modulus p may
be any positive integer, not necessarily prime.  


Objects of the class ZZ_p are represented as a ZZ in the range 0..p-1.

An executing program maintains a "current modulus", which is set to p
with ZZ_p::init(p).  The current modulus should be initialized before
any ZZ_p objects are created.

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

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

#include <NTL/ZZ.h>
#include <NTL/ZZVec.h>

class ZZ_p {
public:
   
   ZZ_p(); // initialize to 0

   ZZ_p& operator=(const ZZ_p& a); // assignment
   ZZ_p& operator=(long a); // assignment

   ZZ_p(const ZZ_p& a); // copy constructor


   ~ZZ_p(); // destructor

   static void init(const ZZ& p);
   // ZZ_p::init(p) sets the modulus to p (p > 1)
   
   static const ZZ& modulus();
   // ZZ_p::modulus() yields read-only reference to the current
   // modulus
};


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

                      Access to representation

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


const ZZ& rep(const ZZ_p& a); 
// read-only access to representation of a

/****** Example: ********  

   ZZ x;
   ZZ_p a;

   x = rep(a);

*************************/


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

                                  Comparison

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


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

// PROMOTIONS: the comparison operators provide promotions
// from long to ZZ_p on (a, b)

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


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

                                    Addition 

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

// operator notation:

ZZ_p operator+(const ZZ_p& a, const ZZ_p& b);
ZZ_p operator-(const ZZ_p& a, const ZZ_p& b);
ZZ_p operator-(const ZZ_p& a); // unary -

ZZ_p& operator+=(ZZ_p& x, const ZZ_p& b);
ZZ_p& operator+=(ZZ_p& x, long b);

ZZ_p& operator-=(ZZ_p& x, const ZZ_p& b);
ZZ_p& operator-=(ZZ_p& x, long b);

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

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

// procedural versions:


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

// PROMOTIONS: binary +, - and procedures add, sub provide promotions
// from long to ZZ_p on (a, b)


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

                                  Multiplication 

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

// operator notation:

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

ZZ_p& operator*=(ZZ_p& x, const ZZ_p& b);
ZZ_p& operator*=(ZZ_p& x, long b);

// procedural versions:


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

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

// PROMOTIONS: operator * and procedure mul provide promotions 
// from long to ZZ_p on (a, b)



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

                              Division

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


// operator notation:

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

ZZ_p& operator/=(ZZ_p& x, const ZZ_p& b);
ZZ_p& operator/=(ZZ_p& x, long b);


// procedural versions:


void div(ZZ_p& x, const ZZ_p& a, const ZZ_p& b);
// x = a/b.

// By default, if b is not invertible, an error is raised.  However,
// one can override this default behavior by defining an error handler
// void H(const ZZ_p& b), and setting ZZ_p::DivHandler = H.  Then if b
// != 0 and b is not invertible, the function H is invoked with b as
// its argument.  When this happens, p is of course not prime, and
// GCD(p, rep(b)) is a nontrivial factor.

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

// Error handling is the same as above.

// PROMOTIONS: operator / and procedure div provide promotions
// from long to ZZ_p on (a, b)



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

                            Exponentiation

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



void power(ZZ_p& x, const ZZ_p& a, const ZZ& e); // x = a^e (e may be negative)
ZZ_p power(const ZZ_p& a, const ZZ& e); // functional variants

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



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

                               Random Elements

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


void random(ZZ_p& x);
ZZ_p random_ZZ_p();
// x = random element in ZZ_p.  


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

                                Input/Output

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


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

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

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

                       Modulus Switching 

A class ZZ_pBak 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_pBak bak;
   bak.save();   // save current modulus (if any)

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

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

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

When the current modulus is changed, there may be extant
ZZ_p 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_p 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_pBak
or a ZZ_pContext object.

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


class ZZ_pBak {
public:

   // To describe this logic, think of a ZZ_pBak 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_pBak();  // q = "null", b = 0

   ~ZZ_pBak();  // if (b) p = q

   void save();  // q = p, b = 1 
   void restore();  // p = q, b = 0


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


// more general context switching:

class ZZ_pContext {

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

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

public:

ZZ_pContext(); // q = "null"
ZZ_pContext(const ZZ& new_q); // q = new_q

void save(); // q = p
void restore() const; // p = q

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


};



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

                               Miscellany

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

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

static long ZZ_p::ModulusSize();
//  ZZ_p::ModulusSize() returns ZZ_p::modulus().size()

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

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


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产在线精品一区二区三区不卡| 91精品久久久久久久久99蜜臂| 免费亚洲电影在线| 日韩激情在线观看| 午夜影视日本亚洲欧洲精品| 亚洲精品一二三| 亚洲激情自拍偷拍| 亚洲一二三区视频在线观看| 一区二区三区影院| 偷拍与自拍一区| 青青草原综合久久大伊人精品优势| 亚洲国产wwwccc36天堂| 亚洲精品中文字幕乱码三区| 亚洲第一二三四区| 精品一区二区三区免费播放| 国内精品视频666| 成人h动漫精品一区二| 白白色亚洲国产精品| 色屁屁一区二区| 欧美日韩精品一区二区三区蜜桃 | 国产主播一区二区| 成人综合婷婷国产精品久久免费| 高清不卡一二三区| 在线一区二区三区四区五区| 成人免费高清在线| 欧美精品黑人性xxxx| 欧美精品1区2区3区| 久久亚洲一级片| 一区二区在线观看免费| 视频一区二区中文字幕| 国产精品一区二区视频| 色婷婷久久久亚洲一区二区三区| 欧美二区在线观看| 国产精品久久久久婷婷二区次| 一区二区三区久久| 国产一区啦啦啦在线观看| 91麻豆国产香蕉久久精品| 7777精品伊人久久久大香线蕉最新版| 久久综合色天天久久综合图片| 国产精品九色蝌蚪自拍| 免费精品视频最新在线| www.视频一区| 精品免费99久久| 亚洲高清不卡在线| 成人免费不卡视频| 2023国产精华国产精品| 夜夜亚洲天天久久| av在线一区二区| 精品女同一区二区| 日本欧洲一区二区| 色激情天天射综合网| 欧美精品一区二区三区蜜臀| 亚洲精品va在线观看| 成人免费的视频| 久久综合国产精品| 免费人成在线不卡| 欧美日韩不卡一区| 亚洲精品v日韩精品| 97久久精品人人做人人爽 | 免费日韩伦理电影| 在线观看一区不卡| 国产精品国产三级国产专播品爱网| 日本aⅴ亚洲精品中文乱码| 欧美中文字幕一区| 综合欧美一区二区三区| www.欧美.com| 国产精品国产三级国产aⅴ入口| 理论电影国产精品| 欧美大片拔萝卜| 美腿丝袜一区二区三区| 欧美挠脚心视频网站| 美腿丝袜亚洲三区| 在线成人午夜影院| 亚洲午夜一二三区视频| 欧美日韩一区二区三区高清| 亚洲日本韩国一区| 日本国产一区二区| 亚洲成av人片www| 3atv一区二区三区| 日本午夜精品视频在线观看| 91麻豆精品国产91久久久久 | 日韩综合一区二区| 5858s免费视频成人| 秋霞电影一区二区| 精品乱码亚洲一区二区不卡| 韩国v欧美v亚洲v日本v| 久久综合av免费| 国产成人精品综合在线观看 | 国产精品乱码妇女bbbb| 国产成人在线电影| 成人欧美一区二区三区黑人麻豆 | 久久久久久久久蜜桃| 午夜精品免费在线| 欧美一级午夜免费电影| 日本伊人午夜精品| 久久久久久麻豆| 99re在线视频这里只有精品| 综合久久久久久| 欧美狂野另类xxxxoooo| 日本成人在线电影网| 久久九九久精品国产免费直播| 国产精品一区二区在线播放| 国产精品久久久久久久久晋中| 色狠狠一区二区| 秋霞电影一区二区| 亚洲色图制服丝袜| 欧美一区二区女人| 黄网站免费久久| 自拍偷拍国产精品| 欧美一区二区二区| 成人污污视频在线观看| 亚洲国产精品天堂| 国产日韩欧美在线一区| 成人动漫在线一区| 国产91精品精华液一区二区三区| 一区二区不卡在线播放| 日韩欧美一区二区三区在线| 国内不卡的二区三区中文字幕 | 日日夜夜精品视频免费| 中文字幕第一区综合| 欧美日韩在线三区| 成人av片在线观看| 韩国中文字幕2020精品| 一区二区三区**美女毛片| 久久免费美女视频| 欧美人xxxx| 一本到一区二区三区| 国模无码大尺度一区二区三区| 一区二区三区在线观看欧美| 久久五月婷婷丁香社区| 在线观看中文字幕不卡| 国产一区二区在线观看视频| 亚洲韩国精品一区| 中文字幕一区二区日韩精品绯色| 精品视频在线看| 色婷婷av一区| gogo大胆日本视频一区| 精品一区二区在线看| 水蜜桃久久夜色精品一区的特点| 99免费精品视频| 成人午夜av电影| 国产美女精品一区二区三区| 日韩电影免费在线看| 一区二区三区日本| 国产91精品一区二区麻豆亚洲| 日日欢夜夜爽一区| 视频在线观看国产精品| 午夜精品一区二区三区三上悠亚| 亚洲视频小说图片| 最新高清无码专区| 亚洲欧美国产三级| 国产精品久久久久久久浪潮网站 | 欧美精品一区视频| 欧美日韩国产系列| 欧美日韩综合在线| 3751色影院一区二区三区| 波多野结衣一区二区三区| 高清免费成人av| 国产精品亚洲第一区在线暖暖韩国 | 91麻豆精品91久久久久久清纯| 日本一区二区三区久久久久久久久不| 欧美亚洲综合一区| 秋霞国产午夜精品免费视频| 欧美日韩成人高清| 男人的j进女人的j一区| 欧美日韩亚洲不卡| 国产精一品亚洲二区在线视频| 国产又粗又猛又爽又黄91精品| 一区二区三区自拍| 国产精品电影院| **网站欧美大片在线观看| 国产精品你懂的| 欧美福利视频一区| 91精品国产日韩91久久久久久| 成人综合在线网站| a在线播放不卡| 欧美中文字幕亚洲一区二区va在线 | 美女免费视频一区二区| 国产精品国产精品国产专区不片| 亚洲欧美另类在线| 亚洲一区二区三区四区在线观看| 亚洲伦在线观看| 日本成人在线一区| 午夜一区二区三区在线观看| 性欧美大战久久久久久久久| 欧美精品777| 欧美午夜精品久久久| 国产成人精品免费| 亚洲一二三四久久| 亚洲图片欧美一区| 图片区小说区国产精品视频 | 91免费在线播放| 首页国产丝袜综合| 五月婷婷综合在线| 久久免费视频色| 久久国产精品一区二区| 91精品国产一区二区三区香蕉| 亚洲日本一区二区| 国产精品大尺度| 久久久国际精品|