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

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

?? lzz_p.txt

?? 一個(gè)比較通用的大數(shù)運(yùn)算庫(kù)
?? TXT
字號(hào):


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

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).


?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久毛片高清国产| 国产精品视频九色porn| 国产激情视频一区二区三区欧美 | a美女胸又www黄视频久久| 一区二区三区电影在线播| 精品久久久久久久久久久久久久久久久 | 欧美大片在线观看一区二区| 不卡免费追剧大全电视剧网站| 一二三区精品福利视频| 久久久久久一二三区| 欧美日韩成人在线| 成人精品高清在线| 免费av成人在线| 亚洲制服丝袜一区| 中文字幕一区二区在线观看| 精品粉嫩超白一线天av| 91精品国产综合久久久蜜臀粉嫩| av在线播放不卡| 夫妻av一区二区| 精品中文字幕一区二区| 亚洲综合视频在线| 亚洲天堂av老司机| 国产欧美一区二区精品仙草咪| 91精品国产91热久久久做人人 | 91精品国产一区二区三区| 91国产视频在线观看| 成人免费毛片片v| 成人午夜精品在线| 国产精品18久久久| 国产乱码一区二区三区| 麻豆精品一区二区综合av| 亚洲www啪成人一区二区麻豆| 亚洲精品美腿丝袜| 亚洲黄色小视频| 亚洲综合在线电影| 一区二区三区加勒比av| 亚洲午夜在线视频| 亚洲成人你懂的| 视频一区二区三区中文字幕| 亚洲图片自拍偷拍| 午夜精品123| 日韩视频国产视频| 日韩一区二区三区四区五区六区| 69成人精品免费视频| 91精品久久久久久蜜臀| 日韩一级黄色片| 欧美精品一区二区三区在线播放| 日韩视频永久免费| 久久久久久黄色| 国产精品天天摸av网| 国产精品狼人久久影院观看方式| 亚洲同性gay激情无套| 亚洲激情图片一区| 人人精品人人爱| 国产毛片精品视频| 99国产精品一区| 欧美丝袜丝nylons| 777奇米四色成人影色区| 精品久久99ma| 中文字幕制服丝袜一区二区三区 | 国产精品国产三级国产普通话蜜臀 | 337p亚洲精品色噜噜噜| 国产欧美日韩久久| 国产精品狼人久久影院观看方式| 亚洲婷婷国产精品电影人久久| 亚洲精品国久久99热| 亚洲大型综合色站| 激情综合五月天| 91美女片黄在线观看| 欧美日韩一卡二卡三卡| 精品国产伦一区二区三区免费 | 中文欧美字幕免费| 一区二区三区在线不卡| 日韩黄色一级片| 成人网在线免费视频| 色妞www精品视频| 日韩亚洲欧美在线观看| 中文字幕av一区二区三区高| 亚洲国产精品久久久久婷婷884 | 欧美美女网站色| 国产欧美精品一区aⅴ影院| 一区二区三区日韩精品视频| 蜜臀精品一区二区三区在线观看 | 粉嫩久久99精品久久久久久夜| 91丨国产丨九色丨pron| 日韩午夜激情视频| 亚洲人成伊人成综合网小说| 奇米四色…亚洲| 91理论电影在线观看| 日韩一级大片在线观看| 亚洲色图一区二区| 国产一区二区三区四区五区美女| 在线观看亚洲精品视频| 国产亚洲精品7777| 强制捆绑调教一区二区| 99精品视频一区| 久久久青草青青国产亚洲免观| 亚洲国产一区二区在线播放| 国产成人啪免费观看软件| 91精品国产色综合久久ai换脸| 1000精品久久久久久久久| 麻豆国产欧美一区二区三区| 在线观看一区二区精品视频| 欧美激情中文字幕一区二区| 日韩高清电影一区| 欧美综合一区二区| 欧美激情一二三区| 国产一区二区在线视频| 在线播放91灌醉迷j高跟美女| 亚洲日韩欧美一区二区在线| 国产精品一区二区久久精品爱涩| 精品视频一区三区九区| 成人免费在线播放视频| 国产一区二区不卡在线 | 亚洲黄色尤物视频| 成人精品视频一区二区三区尤物| 日韩欧美一二区| 日韩高清一区二区| 欧美日韩国产一二三| 一区二区三区久久| 91行情网站电视在线观看高清版| 国产日韩av一区二区| 国产毛片一区二区| 久久久www免费人成精品| 青椒成人免费视频| 日韩视频在线一区二区| 日韩成人一区二区| 777久久久精品| 天天综合日日夜夜精品| 欧美色涩在线第一页| 亚洲一级片在线观看| 91成人网在线| 国产真实精品久久二三区| 欧美一卡二卡三卡| 男男视频亚洲欧美| 精品久久人人做人人爽| 免费成人你懂的| 欧美精品一区二区三区蜜桃| 国产在线视视频有精品| 久久免费精品国产久精品久久久久 | 国产精品三级av| 91在线视频官网| 亚洲综合色婷婷| 777欧美精品| 国产在线精品一区二区三区不卡| 精品成人a区在线观看| 国产毛片一区二区| 国产精品久久久久久久久图文区 | 手机精品视频在线观看| 91精品国产一区二区三区蜜臀| 毛片不卡一区二区| 亚洲精品一区在线观看| 国产成人在线影院| 亚洲精品成a人| 91精品国产入口| 国产精品自拍网站| 中文字幕一区二区三区在线观看| 99久久婷婷国产综合精品电影| 亚洲一级在线观看| 欧美v亚洲v综合ⅴ国产v| 国产精一品亚洲二区在线视频| 国产精品久久久久影院老司 | 久久国产视频网| 久久精品亚洲精品国产欧美kt∨| 成人aa视频在线观看| 一区二区三区欧美日韩| 欧美一区二区精美| 顶级嫩模精品视频在线看| 亚洲欧美视频在线观看视频| 欧美久久久久久久久中文字幕| 国产一区二区中文字幕| 亚洲免费在线观看视频| 欧美一级高清片| 96av麻豆蜜桃一区二区| 日韩在线一区二区三区| 国产丝袜美腿一区二区三区| 91美女在线视频| 久久不见久久见免费视频7 | 亚洲天天做日日做天天谢日日欢 | 91超碰这里只有精品国产| 国产精品66部| 亚洲二区在线观看| 国产日韩欧美精品综合| 欧美日韩1区2区| 成人中文字幕合集| 首页亚洲欧美制服丝腿| 国产精品美女久久久久aⅴ国产馆| 欧美午夜宅男影院| 丁香啪啪综合成人亚洲小说| 午夜电影网一区| 国产精品国产三级国产普通话三级| 91麻豆精品国产91| 色国产综合视频| 成人免费看片app下载| 免费在线看成人av| 亚洲在线成人精品| 自拍偷拍亚洲综合| 26uuu色噜噜精品一区| 欧美日韩和欧美的一区二区| 粉嫩绯色av一区二区在线观看|