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

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

?? zz_p.h

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


#ifndef NTL_ZZ_p__H
#define NTL_ZZ_p__H

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

NTL_OPEN_NNS


// ZZ_p representation:  each ZZ_p is represented by a ZZ in the range 0..p-1.

// The constructor for a ZZ_p pre-allocates space for the underlying ZZ,
// and initializes it to zero.

const int MAX_ZZ_p_TEMPS = 16;

class ZZ_p;

class ZZ_pInfoT {
private:
   ZZ_pInfoT();                       // disabled
   ZZ_pInfoT(const ZZ_pInfoT&);   // disabled
   void operator=(const ZZ_pInfoT&);  // disabled
public:
   ZZ_pInfoT(const ZZ& NewP);
   ~ZZ_pInfoT();

   long ref_count; // reference count for gargabge collection

   ZZ p;      // the modulus
   long size;  // p.size()
   long ExtendedModulusSize;

   // the following implement a "lazy" initialization strategy
   long initialized;  // flag if initialization really was done
   void init();
   void check() { if (!initialized) init(); }

   long NumPrimes;

   long MaxRoot;  

   long QuickCRT;

   ZZ MinusMModP;  //  -M mod p, M = product of primes

   void *crt_struct;

   void *rem_struct;


   // the following arrays are indexed 0..NumPrimes-1
   // q = FFTPrime[i]


   double *x;          // u/q, where u = (M/q)^{-1} mod q
   long *u;            // u, as above

   double **tbl;       // table used for MultiRem; only with NTL_SINGLE_MUL

   long **tbl1;        // table used for MultiRem; only with NTL_TBL_REM

   ZZ_p *temps[MAX_ZZ_p_TEMPS];
   long temps_top;
};

extern ZZ_pInfoT *ZZ_pInfo; // info for current modulus, initially null



class ZZ_pContext {
private:
ZZ_pInfoT *ptr;

public:
void save();
void restore() const;

ZZ_pContext() { ptr = 0; }
ZZ_pContext(const ZZ& p);

ZZ_pContext(const ZZ_pContext&); 


ZZ_pContext& operator=(const ZZ_pContext&); 


~ZZ_pContext();


};


class ZZ_pBak {
private:
long MustRestore;
ZZ_pInfoT *ptr;

ZZ_pBak(const ZZ_pBak&); // disabled
void operator=(const ZZ_pBak&); // disabled

public:
void save();
void restore();

ZZ_pBak() { MustRestore = 0; ptr = 0; }

~ZZ_pBak();


};




struct ZZ_p_NoAlloc_type { ZZ_p_NoAlloc_type() { } };
const ZZ_p_NoAlloc_type ZZ_p_NoAlloc = ZZ_p_NoAlloc_type();


class ZZ_pTemp {
private:
   long pos;

public:
   ZZ_pTemp();
   ~ZZ_pTemp();

   ZZ_p& val() const;
};

#define NTL_ZZ_pRegister(x)  \
   ZZ_pTemp ZZ_pTemp__ ## x; ZZ_p& x = ZZ_pTemp__ ## x . val()


class ZZ_p {

public:

ZZ _ZZ_p__rep;


static void init(const ZZ&);


typedef void (*DivHandlerPtr)(const ZZ_p& a);   // error-handler for division
static DivHandlerPtr DivHandler;


// ****** constructors and assignment

ZZ_p();

ZZ_p(const ZZ_p& a) :  _ZZ_p__rep(INIT_SIZE, ZZ_pInfo->size) { _ZZ_p__rep = a._ZZ_p__rep; }

ZZ_p(ZZ_p_NoAlloc_type) { }  // allocates no space

~ZZ_p() { } 

ZZ_p& operator=(const ZZ_p& a) { _ZZ_p__rep = a._ZZ_p__rep; return *this; }

inline ZZ_p& operator=(long a);

// You can always access the _ZZ_p__representation directly...if you dare.
ZZ& LoopHole() { return _ZZ_p__rep; }

ZZ_p(ZZ_p& x, INIT_TRANS_TYPE) : _ZZ_p__rep(x._ZZ_p__rep, INIT_TRANS) { }



static const ZZ& modulus() { return ZZ_pInfo->p; }
static long ModulusSize() { return ZZ_pInfo->size; }
static long storage() { return ZZ_storage(ZZ_pInfo->size); }

static const ZZ_p& zero();


ZZ_p(INIT_VAL_TYPE, const ZZ& a);
ZZ_p(INIT_VAL_TYPE, long a);

};



// read-only access to _ZZ_p__representation
inline const ZZ& rep(const ZZ_p& a) { return a._ZZ_p__rep; }

// ****** conversion

inline void conv(ZZ_p& x, const ZZ& a)
   { rem(x._ZZ_p__rep, a, ZZ_p::modulus()); }


inline ZZ_p to_ZZ_p(const ZZ& a)
   { return ZZ_p(INIT_VAL, a); }


void conv(ZZ_p& x, long a);


inline ZZ_p to_ZZ_p(long a)
   { return ZZ_p(INIT_VAL, a); }




// ****** some basics


inline void clear(ZZ_p& x)
// x = 0
   { clear(x._ZZ_p__rep); }

inline void set(ZZ_p& x)
// x = 1
   { set(x._ZZ_p__rep); }

inline void swap(ZZ_p& x, ZZ_p& y)
// swap x and y

   { swap(x._ZZ_p__rep, y._ZZ_p__rep); }

// ****** addition

inline void add(ZZ_p& x, const ZZ_p& a, const ZZ_p& b)
// x = a + b

   { AddMod(x._ZZ_p__rep, a._ZZ_p__rep, b._ZZ_p__rep, ZZ_p::modulus()); }

inline void sub(ZZ_p& x, const ZZ_p& a, const ZZ_p& b)
// x = a - b

   { SubMod(x._ZZ_p__rep, a._ZZ_p__rep, b._ZZ_p__rep, ZZ_p::modulus()); }


inline void negate(ZZ_p& x, const ZZ_p& a)
// x = -a

   { NegateMod(x._ZZ_p__rep, a._ZZ_p__rep, ZZ_p::modulus()); }


// scalar versions

void add(ZZ_p& x, const ZZ_p& a, long b);
inline void add(ZZ_p& x, long a, const ZZ_p& b) { add(x, b, a); }

void sub(ZZ_p& x, const ZZ_p& a, long b);
void sub(ZZ_p& x, long a, const ZZ_p& b);


// ****** multiplication

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

   { MulMod(x._ZZ_p__rep, a._ZZ_p__rep, b._ZZ_p__rep, ZZ_p::modulus()); }


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

   { SqrMod(x._ZZ_p__rep, a._ZZ_p__rep, ZZ_p::modulus()); }

inline ZZ_p sqr(const ZZ_p& a)
   { ZZ_p x; sqr(x, a); NTL_OPT_RETURN(ZZ_p, x); }


// scalar versions

void mul(ZZ_p& x, const ZZ_p& a, long b);
inline void mul(ZZ_p& x, long a, const ZZ_p& b) { mul(x, b, a); }

// ****** division


void div(ZZ_p& x, const ZZ_p& a, const ZZ_p& b);
// x = a/b
// If b != 0 & b not invertible & DivHandler != 0,
// then DivHandler will be called with the offending b.
// In this case, of course, p is not really prime, and one
// can factor p by taking a gcd with rep(b).
// Otherwise, if b is not invertible, an error occurs.

void inv(ZZ_p& x, const ZZ_p& a);
// x = 1/a
// Error handling is the same as above.

inline ZZ_p inv(const ZZ_p& a)
   { ZZ_p x; inv(x, a); NTL_OPT_RETURN(ZZ_p, x); }

void div(ZZ_p& x, const ZZ_p& a, long b);
void div(ZZ_p& x, long a, const ZZ_p& b);


// operator notation:

inline ZZ_p operator+(const ZZ_p& a, const ZZ_p& b)
   { ZZ_p x; add(x, a, b); NTL_OPT_RETURN(ZZ_p, x); }

inline ZZ_p operator+(const ZZ_p& a, long b)
   { ZZ_p x; add(x, a, b); NTL_OPT_RETURN(ZZ_p, x); }

inline ZZ_p operator+(long a, const ZZ_p& b)
   { ZZ_p x; add(x, a, b); NTL_OPT_RETURN(ZZ_p, x); }

inline ZZ_p& operator+=(ZZ_p& x, const ZZ_p& b)
   { add(x, x, b); return x; } 

inline ZZ_p& operator+=(ZZ_p& x, long b)
   { add(x, x, b); return x; } 



inline ZZ_p operator-(const ZZ_p& a, const ZZ_p& b)
   { ZZ_p x; sub(x, a, b); NTL_OPT_RETURN(ZZ_p, x); }

inline ZZ_p operator-(const ZZ_p& a, long b)
   { ZZ_p x; sub(x, a, b); NTL_OPT_RETURN(ZZ_p, x); }

inline ZZ_p operator-(long a, const ZZ_p& b)
   { ZZ_p x; sub(x, a, b); NTL_OPT_RETURN(ZZ_p, x); }

inline ZZ_p& operator-=(ZZ_p& x, const ZZ_p& b)
   { sub(x, x, b); return x; } 

inline ZZ_p& operator-=(ZZ_p& x, long b)
   { sub(x, x, b); return x; } 



inline ZZ_p operator*(const ZZ_p& a, const ZZ_p& b)
   { ZZ_p x; mul(x, a, b); NTL_OPT_RETURN(ZZ_p, x); }

inline ZZ_p operator*(const ZZ_p& a, long b)
   { ZZ_p x; mul(x, a, b); NTL_OPT_RETURN(ZZ_p, x); }

inline ZZ_p operator*(long a, const ZZ_p& b)
   { ZZ_p x; mul(x, a, b); NTL_OPT_RETURN(ZZ_p, x); }

inline ZZ_p& operator*=(ZZ_p& x, const ZZ_p& b)
   { mul(x, x, b); return x; } 

inline ZZ_p& operator*=(ZZ_p& x, long b)
   { mul(x, x, b); return x; } 


inline ZZ_p operator/(const ZZ_p& a, const ZZ_p& b)
   { ZZ_p x; div(x, a, b); NTL_OPT_RETURN(ZZ_p, x); }

inline ZZ_p operator/(const ZZ_p& a, long b)
   { ZZ_p x; div(x, a, b); NTL_OPT_RETURN(ZZ_p, x); }

inline ZZ_p operator/(long a, const ZZ_p& b)
   { ZZ_p x; div(x, a, b); NTL_OPT_RETURN(ZZ_p, x); }

inline ZZ_p& operator/=(ZZ_p& x, const ZZ_p& b)
   { div(x, x, b); return x; } 

inline ZZ_p& operator/=(ZZ_p& x, long b)
   { div(x, x, b); return x; } 


inline ZZ_p operator-(const ZZ_p& a)
   { ZZ_p x; negate(x, a); NTL_OPT_RETURN(ZZ_p, x); }


inline ZZ_p& operator++(ZZ_p& x) { add(x, x, 1); return x; }
inline void operator++(ZZ_p& x, int) { add(x, x, 1); }
inline ZZ_p& operator--(ZZ_p& x) { sub(x, x, 1); return x; }
inline void operator--(ZZ_p& x, int) { sub(x, x, 1); }


// ****** exponentiation

inline void power(ZZ_p& x, const ZZ_p& a, const ZZ& e)
   { PowerMod(x._ZZ_p__rep, a._ZZ_p__rep, e, ZZ_p::modulus()); }

inline ZZ_p power(const ZZ_p& a, const ZZ& e)
   { ZZ_p x; power(x, a, e); NTL_OPT_RETURN(ZZ_p, x); }

inline void power(ZZ_p& x, const ZZ_p& a, long e)
   { PowerMod(x._ZZ_p__rep, a._ZZ_p__rep, e, ZZ_p::modulus()); }

inline ZZ_p power(const ZZ_p& a, long e)
   { ZZ_p x; power(x, a, e); NTL_OPT_RETURN(ZZ_p, x); }


// ****** comparison

inline long IsZero(const ZZ_p& a)
   { return IsZero(a._ZZ_p__rep); }


inline long IsOne(const ZZ_p& a)
   { return IsOne(a._ZZ_p__rep); }

inline long operator==(const ZZ_p& a, const ZZ_p& b)
   { return a._ZZ_p__rep == b._ZZ_p__rep; }

inline long operator!=(const ZZ_p& a, const ZZ_p& b)
   { return !(a == b); }

long operator==(const ZZ_p& a, long b);
inline long operator==(long a, const ZZ_p& b) { return b == a; }

inline long operator!=(const ZZ_p& a, long b) { return !(a == b); }
inline long operator!=(long a, const ZZ_p& b) { return !(a == b); }


// ****** random numbers

inline void random(ZZ_p& x)
// x = random element in ZZ_p

   { RandomBnd(x._ZZ_p__rep, ZZ_p::modulus()); }

inline ZZ_p random_ZZ_p()
   { ZZ_p x; random(x); NTL_OPT_RETURN(ZZ_p, x); }


// ****** input/output

inline NTL_SNS ostream& operator<<(NTL_SNS ostream& s, const ZZ_p& a)
   { return s << a._ZZ_p__rep; }
   
NTL_SNS istream& operator>>(NTL_SNS istream& s, ZZ_p& x);


inline ZZ_p& ZZ_p::operator=(long a) { conv(*this, a); return *this; }

NTL_CLOSE_NNS

#endif

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久亚洲欧洲日产国码αv| 中文字幕一区二区在线播放| 99re热这里只有精品免费视频| 亚洲国产成人91porn| 国产情人综合久久777777| 欧美日韩精品欧美日韩精品一| 成人黄色a**站在线观看| 三级欧美韩日大片在线看| 亚洲欧美色图小说| 国产欧美综合色| 日韩精品一区二区三区视频在线观看| 在线观看三级视频欧美| 成人av资源站| 国产精品系列在线观看| 美女视频黄频大全不卡视频在线播放| 一区二区三区四区不卡在线| 国产欧美精品在线观看| www久久久久| 日韩欧美一二三区| 欧美日韩视频专区在线播放| 日本高清不卡在线观看| 福利电影一区二区三区| 国产乱人伦精品一区二区在线观看| 日精品一区二区| 亚洲一区二区三区激情| 一区二区三区免费| 一区二区久久久久久| 悠悠色在线精品| 一区二区三区精品久久久| 亚洲男人的天堂一区二区| 最好看的中文字幕久久| 亚洲婷婷在线视频| 亚洲人成人一区二区在线观看 | 首页国产丝袜综合| 一区二区激情小说| 亚洲综合丁香婷婷六月香| 亚洲美女免费在线| 一区二区欧美国产| 亚洲国产精品麻豆| 婷婷成人激情在线网| 午夜视频一区在线观看| 亚洲成人第一页| 婷婷亚洲久悠悠色悠在线播放| 亚洲一区二区三区影院| 亚洲成年人影院| 日本欧美一区二区在线观看| 麻豆视频一区二区| 国产综合成人久久大片91| 国产精品18久久久久久vr| 国产91在线观看丝袜| 成人精品视频.| 日本韩国精品在线| 欧美日韩精品一区二区三区 | 中文字幕日韩av资源站| 亚洲欧美在线高清| 亚洲主播在线播放| 青草av.久久免费一区| 国产美女在线观看一区| 国产白丝精品91爽爽久久 | 色吊一区二区三区| 欧美天堂一区二区三区| 日韩欧美国产电影| 久久精品欧美一区二区三区不卡 | 日韩理论片一区二区| 亚洲国产一区二区在线播放| 日本vs亚洲vs韩国一区三区| 国内一区二区在线| 99精品视频一区| 欧美日本高清视频在线观看| 精品国产乱码久久久久久老虎| 欧美国产1区2区| 午夜av一区二区| 国产精品一线二线三线精华| 91女人视频在线观看| 欧美猛男gaygay网站| 精品免费视频一区二区| 亚洲欧洲国产日韩| 美国欧美日韩国产在线播放| 成人一区二区三区中文字幕| 欧美日韩中文字幕一区| 久久久99精品免费观看| 亚洲午夜一二三区视频| 韩国理伦片一区二区三区在线播放 | 国产精品黄色在线观看| 亚洲a一区二区| 丰满白嫩尤物一区二区| 欧美三区在线视频| 国产日韩精品一区| 天天影视网天天综合色在线播放| 国产成人精品一区二区三区四区| 欧美少妇一区二区| 国产欧美日韩不卡免费| 青青国产91久久久久久| 91麻豆视频网站| 337p粉嫩大胆噜噜噜噜噜91av| 亚洲免费在线电影| 国产成人免费在线观看不卡| 91精品在线免费| 欧美精品九九99久久| 亚洲欧美日韩国产综合在线| 国产在线视频一区二区三区| 欧美乱妇一区二区三区不卡视频| 日本一区二区免费在线| 美女脱光内衣内裤视频久久网站| 色呦呦日韩精品| 国产精品天天摸av网| 久久福利资源站| 欧美色综合天天久久综合精品| 中文字幕亚洲电影| 国产凹凸在线观看一区二区| 日韩精品一区二区三区三区免费 | 91精品国产综合久久久久久漫画| 亚洲欧美怡红院| 国产精品1024| 精品国产免费一区二区三区四区| 午夜成人免费视频| 欧美羞羞免费网站| 亚洲三级免费电影| 91亚洲男人天堂| 国产精品日日摸夜夜摸av| 国产乱码精品一区二区三区五月婷| 6080yy午夜一二三区久久| 亚洲一区二区四区蜜桃| 在线亚洲+欧美+日本专区| 亚洲色图一区二区| 91丝袜国产在线播放| 日韩毛片一二三区| 91美女福利视频| 亚洲精品视频在线观看网站| 91影院在线观看| 亚洲黄色尤物视频| 91福利国产精品| 夜夜爽夜夜爽精品视频| 欧美亚日韩国产aⅴ精品中极品| 亚洲精品v日韩精品| 在线影视一区二区三区| 亚洲一区二区在线观看视频| 欧美日韩亚洲丝袜制服| 亚洲福利视频一区| 制服.丝袜.亚洲.中文.综合 | 97se狠狠狠综合亚洲狠狠| 中文字幕一区二区三区乱码在线| proumb性欧美在线观看| 亚洲色图在线播放| 欧美日韩国产一区| 日本vs亚洲vs韩国一区三区二区 | 91精品国模一区二区三区| 青青草一区二区三区| 精品成人a区在线观看| 国产高清成人在线| 亚洲欧美一区二区三区久本道91 | 欧美午夜影院一区| 三级精品在线观看| 精品国产伦理网| 成人激情综合网站| 亚洲自拍与偷拍| 欧美一区二区女人| 国产成a人亚洲精品| 亚洲日本欧美天堂| 在线播放中文字幕一区| 国模无码大尺度一区二区三区| 欧美高清在线视频| 欧美性一区二区| 激情久久久久久久久久久久久久久久| 久久久久久97三级| 欧美在线不卡视频| 久久国产精品免费| 综合婷婷亚洲小说| 在线成人免费视频| 国产乱子伦视频一区二区三区 | 国产精品欧美一区喷水| 欧美体内she精高潮| 韩国一区二区在线观看| 亚洲三级理论片| 日韩欧美二区三区| 成人国产在线观看| 亚洲高清久久久| 国产欧美1区2区3区| 欧美日韩一区在线| 成人丝袜18视频在线观看| 亚洲一区二区三区四区中文字幕 | 亚洲小说欧美激情另类| 久久综合九色综合97_久久久| 91免费版pro下载短视频| 蜜芽一区二区三区| 亚洲欧洲美洲综合色网| 日韩三级视频在线观看| 99久久er热在这里只有精品15| 免费xxxx性欧美18vr| 亚洲精品国产成人久久av盗摄 | 欧美日韩激情一区二区| 国产成人午夜精品5599| 五月综合激情日本mⅴ| 中文字幕一区二区三中文字幕| 欧美一区二区啪啪| 欧美伊人久久大香线蕉综合69| 国产成人综合在线| 美国十次综合导航| 午夜精品成人在线视频| 亚洲视频免费在线观看|