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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? lzz_p.txt

?? 大數(shù)運算類
?? TXT
字號:


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

MODULE: zz_p

SUMMARY:

The class zz_p is used to represent integers mod p, where 1 <= p <
NTL_SP_BOUND.  Note that NTL_SP_BOUND is usually 2^30 on 32-bit machines and
2^50 on 64-bit machines.

The modulus p may be any positive integer, not necessarily prime.

Objects of the class zz_p are represented as a long in the range 0..p-1.

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

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>


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

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

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

   static void init(long p); 
   // set the modulus to p, where p > 1.  This must be called before any
   // zz_p constructors are invoked.
   // The number p must have at most NTL_SP_NBITS bits.

   static long modulus();
   // zz_p::modulus() yields read-only reference to the current
   // modulus
};


long rep(zz_p a); // read-only access to representation of a



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

                                  Comparison

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


long operator==(zz_p a, zz_p b);
long operator!=(zz_p a, zz_p b);

long IsZero(zz_p a);  // test for 0
long IsOne(zz_p a);  // test for 1

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


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

                                    Addition 

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

// operator notation:

zz_p operator+(zz_p a, zz_p b);
zz_p operator-(zz_p a, zz_p b);

zz_p operator-(zz_p a); // unary -

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

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

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, zz_p a, zz_p b); // x = a + b
void sub(zz_p& x, zz_p a, zz_p b); // x = a - b 
void negate(zz_p& x, zz_p a); // x = -a

// PROMOTIONS: binary +, -, and procedures add, sub promote
// from long to zz_p on (a, b).


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

                                  Multiplication 

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

// operator notation:

zz_p operator*(zz_p a, zz_p b);

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

// procedural versions:

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

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

// PROMOTIONS: operator * and procedure mul promote from long to zz_p
// on (a, b).


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

                                  Division

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

operator notation:

zz_p operator/(z_p a, zz_p b);

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

procedural versions:

void div(zz_p& x, zz_p a, zz_p b);
// x = a/b

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

// PROMOTIONS: operator / and procedure div promote from long to zz_p
// on (a, b).


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

                                  Exponentiation

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


void power(zz_p& x, zz_p a, long e); // x = a^e (e may be negative)
zz_p power(zz_p a, long e); 


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

                               Random Elements

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


void random(zz_p& x);
zz_p random_zz_p();
// x = random element in zz_p.  Uses RandomBnd from ZZ.


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

                                Input/Output

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


ostream& operator<<(ostream& s, zz_p a);

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

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

                       Modulus Switching 

Generally you do the following:

   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(long 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 double zz_p::ModulusInverse();
// zz_p::ModulusInverse() returns 1.0/(double(zz_p::modulus())) 

static 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 

static void zz_p::init(long p, long maxroot);
// Same as ordinary zz_p::init(p), but somewhat more efficient.  If you are
// going to perform arithmetic modulo a degree n polynomial, in which
// case set maxroot to NextPowerOfTwo(n)+1.  This is useful, for
// example, if you are going to factor a polynomial of degree n modulo
// p, and you know n in advance.
// If maxroot is set too low, the program will abort with an
// appropriate error message.

static void zz_p::FFTInit(long i);
// sets modulus to the i-th FFT prime (counting from 0).  FFT primes
// are NTL_SP_NBITS-bit primes p, where p-1 is divisible by a high power
// of two.  Thus, polynomial arithmetic mod p can be implemented
// particularly efficiently using the FFT.  As i increases, the power
// of 2 that divides p-1 gets smaller, thus placing a more severe
// restriction on the degrees of the polynomials to be multiplied.

zz_pContext::zz_pContext(long p, long maxroot);
// constructor for a zz_pContext with same semantics
// as zz_p::init(p, maxroot) above.

zz_pContext::zz_pContext(INIT_FFT_TYPE, long i);
// constructor for a zz_pContext with same semantics
// as zz_p::FFTInit(i) above; invoke as zz_pContext(INIT_FFT, i).


?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久超碰97中文字幕| 日韩不卡一区二区| 欧美高清视频一二三区| 国产精品一区二区久久精品爱涩| 亚洲品质自拍视频网站| 日韩精品一区二区三区四区| 欧美性一二三区| 成人av电影免费在线播放| 免费av网站大全久久| 亚洲女人****多毛耸耸8| 欧美一区二区三区免费视频| 色爱区综合激月婷婷| 国产传媒欧美日韩成人| 久久97超碰国产精品超碰| 亚洲一区在线播放| ●精品国产综合乱码久久久久| 日韩欧美的一区二区| 欧美在线视频不卡| k8久久久一区二区三区| 国产精品69久久久久水密桃| 天天综合网天天综合色| 一区二区久久久| 亚洲欧美经典视频| 国产精品久久免费看| 国产午夜一区二区三区| 精品蜜桃在线看| 日韩情涩欧美日韩视频| 在线电影欧美成精品| 在线亚洲人成电影网站色www| 成人av电影在线网| 成人av网址在线| 成人在线视频一区二区| 国产91精品欧美| 国产成人综合网站| 国产99久久久精品| 国产91富婆露脸刺激对白| 国产精品香蕉一区二区三区| 国精产品一区一区三区mba桃花 | 777午夜精品免费视频| 色婷婷久久久亚洲一区二区三区 | 日本韩国一区二区| 99re热视频这里只精品| 波多野结衣在线一区| 成人少妇影院yyyy| 99久久精品99国产精品| 99re热这里只有精品视频| 色婷婷av一区二区| 欧美日韩一区视频| 日韩一卡二卡三卡四卡| 日韩精品一区二区在线观看| 日韩和欧美一区二区三区| 午夜伦理一区二区| 蜜臀精品久久久久久蜜臀| 精品制服美女久久| 国产成人在线视频网站| 91色porny在线视频| 欧美优质美女网站| 欧美一区二区三区人| 久久久亚洲高清| 国产精品久久久久三级| 樱花影视一区二区| 首页国产欧美久久| 国产在线精品不卡| 白白色亚洲国产精品| 日本韩国一区二区三区视频| 91精品国产乱码久久蜜臀| 亚洲精品一区二区三区香蕉| 中文字幕高清不卡| 亚洲va国产va欧美va观看| 另类小说视频一区二区| 成人免费高清在线观看| 欧美在线不卡一区| 26uuu国产日韩综合| 国产精品成人网| 五月激情综合网| 国产精品乡下勾搭老头1| 91麻豆自制传媒国产之光| 4438x亚洲最大成人网| 久久综合久色欧美综合狠狠| 自拍偷拍亚洲综合| 日本网站在线观看一区二区三区| 国产99久久久久久免费看农村| 欧美日韩一区二区三区在线看| 欧美大片日本大片免费观看| 亚洲人成网站在线| 日本免费在线视频不卡一不卡二 | 国产成人在线影院| 欧美日韩国产免费一区二区| 久久久久99精品国产片| 亚洲成人www| 成人免费看片app下载| 69av一区二区三区| 国产精品久久久久久久久果冻传媒| 亚洲成在人线免费| yourporn久久国产精品| 日韩一区二区三区在线视频| 亚洲婷婷综合色高清在线| 狂野欧美性猛交blacked| 久久亚洲精品小早川怜子| 亚洲成人精品一区二区| 波多野结衣在线aⅴ中文字幕不卡| 在线成人午夜影院| 成人18视频在线播放| 欧美美女喷水视频| 国产精品久久毛片a| 精品一区二区三区在线观看国产 | 日韩免费观看2025年上映的电影| 国产精品乱码一区二区三区软件 | 日韩精品乱码免费| 91蜜桃传媒精品久久久一区二区| 久久夜色精品国产噜噜av| 天天操天天综合网| 在线观看日韩电影| 亚洲欧洲日产国码二区| 国产一区不卡在线| 欧美一级久久久久久久大片| 午夜在线成人av| 色综合婷婷久久| 中文字幕亚洲区| 国产成都精品91一区二区三| 精品伦理精品一区| 婷婷夜色潮精品综合在线| 日本精品一区二区三区高清| 国产精品对白交换视频 | 91蝌蚪porny| 国产精品国产自产拍在线| 国产精品一级片在线观看| 日韩女优毛片在线| 免费成人小视频| 日韩三级免费观看| 久久国产夜色精品鲁鲁99| 欧美一级欧美三级在线观看| 天天色天天操综合| 欧美一区国产二区| 日本中文字幕一区| 亚洲超碰精品一区二区| 在线免费视频一区二区| 亚洲老司机在线| 91色porny蝌蚪| 亚洲黄色录像片| 欧美亚洲一区二区在线| 亚洲一区二区三区四区在线观看| 91视频免费看| 亚洲综合男人的天堂| 欧美视频在线观看一区二区| 亚洲午夜久久久久久久久久久 | 久久精品人人做| 国产精品18久久久久| 久久免费电影网| 成人手机电影网| 亚洲色图视频网站| 欧美性一级生活| 日本欧美一区二区在线观看| 日韩一区二区三区视频| 国产在线播放一区三区四| 国产免费观看久久| 91在线你懂得| 日韩电影免费一区| 久久久久久久久久电影| www.在线成人| 亚洲韩国精品一区| 精品人在线二区三区| 国产精品99久| 亚洲精品久久久久久国产精华液| 欧美精品一级二级| 免费成人av资源网| 国产精品第13页| 欧美色网一区二区| 国内精品第一页| 亚洲视频一区二区在线观看| 欧美伊人久久大香线蕉综合69| 日韩精品每日更新| 国产精品免费免费| 制服丝袜亚洲色图| 成人一区二区三区| 亚洲国产一二三| 国产亚洲美州欧州综合国| 91国产丝袜在线播放| 蜜臀av一区二区三区| 国产精品福利一区| 欧美一级免费观看| 一本大道久久a久久综合| 久久国产剧场电影| 亚洲精品国产品国语在线app| 欧美二区在线观看| 成人免费看的视频| 蜜桃视频免费观看一区| 亚洲免费高清视频在线| 欧美xxxxx牲另类人与| 日本道精品一区二区三区| 精品亚洲aⅴ乱码一区二区三区| 亚洲欧美日韩在线| 亚洲精品在线一区二区| 色94色欧美sute亚洲线路二| 国产真实乱对白精彩久久| 一区二区高清免费观看影视大全| 久久久久久久免费视频了| 欧美日韩成人综合天天影院 | 日本久久一区二区| 免费欧美高清视频|