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

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

?? zzx.txt

?? 一個比較通用的大數運算庫
?? TXT
?? 第 1 頁 / 共 2 頁
字號:


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

MODULE: ZZX

SUMMARY:

The class ZZX implements polynomials in ZZ[X], i.e., univariate
polynomials with integer coefficients.

Polynomial multiplication is implemented using one of 4 different
algorithms:

1) classical 

2) Karatsuba

3) Schoenhage & Strassen --- performs an FFT by working
     modulo a "Fermat number" of appropriate size...
     good for polynomials with huge coefficients
     and moderate degree

4) CRT/FFT --- performs an FFT by working modulo several
     small primes...good for polynomials with moderate coefficients
     and huge degree.

The choice of algorithm is somewhat heuristic, and may not always be
perfect.

Many thanks to Juergen Gerhard <jngerhar@plato.uni-paderborn.de> for
pointing out the deficiency in the NTL-1.0 ZZX arithmetic, and for
contributing the Schoenhage/Strassen code.

Extensive use is made of modular algorithms to enhance performance
(e.g., the GCD algorithm and amny others).

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

#include <NTL/vec_ZZ.h>
#include "zz_pX.h"
#include <NTL/ZZ_pX.h>


class ZZX {
public:


   ZZX(); // initial value 0

   ZZX(const ZZX& a); // copy

   ZZX& operator=(const ZZX& a); // assignment
   ZZX& operator=(const ZZ& a);
   ZZX& operator=(long a);

   ~ZZX();

   ZZX(long i, const ZZ& c); // initial value X^i*c
   ZZX(long i, long c); 

   // ...

};



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

                                  Comparison

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

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

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

// PROMOTIONS: operators ==, != promote {long, ZZ} to ZZX on (a, b).


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

                                   Addition

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

// operator notation:

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

ZZX& operator+=(ZZX& x, const ZZX& a);
ZZX& operator-=(ZZX& x, const ZZX& a);

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

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


// procedural versions:

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

// PROMOTIONS: binary +, - and procedures add, sub promote {long, ZZ} 
// to ZZX on (a, b).


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

                               Multiplication

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

// operator notation:

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

ZZX& operator*=(ZZX& x, const ZZX& a);


// procedural versions:

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

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

// PROMOTIONS: operator * and procedure mul promote {long, ZZ} to ZZX 
// on (a, b).


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

                               Shift Operations

LeftShift by n means multiplication by X^n
RightShift by n means division by X^n

A negative shift amount reverses the direction of the shift.

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

// operator notation:

ZZX operator<<(const ZZX& a, long n);
ZZX operator>>(const ZZX& a, long n);

ZZX& operator<<=(ZZX& x, long n);
ZZX& operator>>=(ZZX& x, long n);

// procedural versions:

void LeftShift(ZZX& x, const ZZX& a, long n); 
ZZX LeftShift(const ZZX& a, long n);

void RightShift(ZZX& x, const ZZX& a, long n); 
ZZX RightShift(const ZZX& a, long n); 



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

                                  Division

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


// Given polynomials a, b in ZZ[X], there exist polynomials
// q, r in QQ[X] such that a = b*q + r, deg(r) < deg(b).
// These routines return q and/or r if q and/or r lie(s) in ZZ[X],
// and otherwise raise an error.  

// Note that if the leading coefficient of b is 1 or -1, 
// then q and r always lie in ZZ[X], and no error can occur.

// For example, you can write f/2 for a ZZX f.  If all coefficients
// of f are even, the result is f with a factor of two removed;
// otherwise, an error is raised.  More generally, f/g will be
// evaluate q in ZZ[X] such that f = q*g if such a q exists,
// and will otherwise raise an error.

// See also below the routines for pseudo-division and division
// predicates for routines that are perhaps more useful in
// some situations.


// operator notation: 

ZZX operator/(const ZZX& a, const ZZX& b);
ZZX operator/(const ZZX& a, const ZZ& b);
ZZX operator/(const ZZX& a, long b);

ZZX operator%(const ZZX& a, const ZZX& b);

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

ZZX& operator%=(ZZX& x, const ZZX& b);


// procedural versions:

void DivRem(ZZX& q, ZZX& r, const ZZX& a, const ZZX& b);
// computes q, r such that a = b q + r and deg(r) < deg(b).
// requires LeadCoeff(b) is a unit (+1, -1); otherwise,
// an error is raised.

void div(ZZX& q, const ZZX& a, const ZZX& b);
void div(ZZX& q, const ZZX& a, const ZZ& b);
void div(ZZX& q, const ZZX& a, long b);
// same as DivRem, but only computes q

void rem(ZZX& r, const ZZX& a, const ZZX& b);
// same as DivRem, but only computes r



// divide predicates:

long divide(ZZX& q, const ZZX& a, const ZZX& b);
long divide(ZZX& q, const ZZX& a, const ZZ& b);
long divide(ZZX& q, const ZZX& a, long b);
// if b | a, sets q = a/b and returns 1; otherwise returns 0


long divide(const ZZX& a, const ZZX& b);
long divide(const ZZX& a, const ZZ& b);
long divide(const ZZX& a, long b);
// if b | a, returns 1; otherwise returns 0

// These algorithms employ a modular approach, performing the division
// modulo small primes (reconstructing q via the CRT).  It is
// usually much faster than the general division routines above
// (especially when b does not divide a).


void content(ZZ& d, const ZZX& f);
ZZ content(const ZZX& f);
// d = content of f, sign(d) == sign(LeadCoeff(f)); content(0) == 0

void PrimitivePart(ZZX& pp, const ZZX& f);
ZZX PrimitivePart(const ZZX& f); 
// pp = primitive part of f, LeadCoeff(pp) >= 0; PrimitivePart(0) == 0



// pseudo-division:

void PseudoDivRem(ZZX& q, ZZX& r, const ZZX& a, const ZZX& b);
// performs pseudo-division: computes q and r with deg(r) < deg(b),
// and LeadCoeff(b)^(deg(a)-deg(b)+1) a = b q + r.  Only the classical
// algorithm is used.

void PseudoDiv(ZZX& q, const ZZX& a, const ZZX& b);
ZZX PseudoDiv(const ZZX& a, const ZZX& b);
// same as PseudoDivRem, but only computes q

void PseudoRem(ZZX& r, const ZZX& a, const ZZX& b);
ZZX PseudoRem(const ZZX& a, const ZZX& b);
// same as PseudoDivRem, but only computes r


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

                                  GCD's

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品在线观看视频| 五月婷婷综合在线| 久久综合狠狠综合久久激情| 欧美一区二区三区小说| 日韩欧美你懂的| 国产婷婷精品av在线| 一区二区三区精品在线| 亚洲国产日韩a在线播放| 日韩高清不卡在线| 成人av在线一区二区三区| av电影天堂一区二区在线| 精品久久人人做人人爽| 亚洲欧美日韩国产成人精品影院 | 一区二区三区高清不卡| 蜜臀99久久精品久久久久久软件 | 精品国产伦一区二区三区观看方式 | 欧洲精品视频在线观看| 欧美大片顶级少妇| 亚洲午夜在线电影| 国产**成人网毛片九色| 欧美三级韩国三级日本三斤| 日韩免费观看高清完整版 | 尤物av一区二区| 国产伦精品一区二区三区视频青涩| av在线免费不卡| 欧美精选在线播放| 亚洲激情五月婷婷| 国产麻豆91精品| 在线国产电影不卡| 久久久亚洲精品石原莉奈| 青青草国产成人av片免费| 国产精品456露脸| 日韩一区二区在线观看视频播放| 亚洲欧洲成人精品av97| 国产91清纯白嫩初高中在线观看| 91国内精品野花午夜精品| 中文字幕精品综合| 久久精品二区亚洲w码| 欧美羞羞免费网站| 亚洲丶国产丶欧美一区二区三区| av爱爱亚洲一区| 中文字幕不卡在线播放| 菠萝蜜视频在线观看一区| 精品播放一区二区| 久久66热re国产| 精品国产伦一区二区三区观看体验| 天天综合日日夜夜精品| 777a∨成人精品桃花网| 奇米影视在线99精品| 2020国产精品久久精品美国| 国产精品亚洲а∨天堂免在线| 欧美韩日一区二区三区四区| 色屁屁一区二区| 免费日韩伦理电影| 中文字幕乱码亚洲精品一区| 成人99免费视频| 亚洲一区二区三区在线看| 日韩亚洲国产中文字幕欧美| 成人一级片网址| 一区二区不卡在线播放 | 一区二区三国产精华液| 色狠狠色狠狠综合| 国产在线观看一区二区| 亚洲第一综合色| 久久综合九色综合欧美就去吻 | 99国产精品99久久久久久| 日韩码欧中文字| 欧美一级欧美一级在线播放| a在线播放不卡| 久久国产精品一区二区| 亚洲一区二区三区视频在线播放 | 久久蜜臀中文字幕| 欧美日韩国产精品自在自线| 久久国产精品无码网站| 一区二区三区在线不卡| 亚洲精选一二三| 亚洲午夜久久久久久久久电影院| 亚洲日本在线a| 午夜av区久久| 国产一区二区精品久久91| 成人精品电影在线观看| 91美女在线看| 欧美精品日韩一区| 国产精品视频观看| 亚洲不卡一区二区三区| 日本在线不卡视频一二三区| 激情综合网最新| 91传媒视频在线播放| xfplay精品久久| 午夜精品久久久久久久久久久| 国产一区视频在线看| 在线观看视频91| 精品国产免费久久| 亚洲国产综合视频在线观看| 国产99精品在线观看| 91免费版pro下载短视频| 日韩欧美激情在线| 亚洲成在线观看| 一本在线高清不卡dvd| 国产女人aaa级久久久级 | 中文字幕在线观看一区二区| 亚洲免费av在线| 久久一二三国产| 日本视频一区二区| 亚洲综合无码一区二区| 中文字幕一区在线观看| 久久九九影视网| 欧美电视剧免费观看| 337p亚洲精品色噜噜| 欧美日韩一区 二区 三区 久久精品| 韩国v欧美v亚洲v日本v| 日韩主播视频在线| 午夜不卡av在线| 日韩电影在线免费| 秋霞午夜av一区二区三区| 日韩高清在线不卡| 免费成人在线观看| 国产乱码精品一区二区三区忘忧草| 日精品一区二区三区| 日韩一区欧美二区| 激情小说欧美图片| 国产精品一卡二| 丁香另类激情小说| 色综合网站在线| 欧美电影一区二区三区| www国产成人免费观看视频 深夜成人网| 日韩欧美一级片| 国产色综合久久| 夜夜亚洲天天久久| 久久99久久99| 99久久99久久综合| 日韩欧美国产综合一区| 国产精品女人毛片| 石原莉奈在线亚洲三区| 国产成人综合在线| 欧美日韩高清一区二区不卡| 精品国产伦一区二区三区观看方式 | 亚洲一级二级三级| 国产成人自拍高清视频在线免费播放| www.视频一区| 欧美精品一区二区在线观看| 亚洲一区精品在线| 盗摄精品av一区二区三区| 91麻豆精品国产无毒不卡在线观看| 国产日韩欧美不卡在线| 久久成人免费网站| 欧美亚洲一区二区在线| 最新国产の精品合集bt伙计| 国产成人夜色高潮福利影视| 日韩精品专区在线影院观看| 亚洲高清不卡在线| 在线观看www91| 亚洲精品伦理在线| 色偷偷88欧美精品久久久| 中文字幕欧美日韩一区| av不卡免费在线观看| 日韩伦理电影网| 欧美午夜视频网站| 午夜精品成人在线视频| 91精品国产黑色紧身裤美女| 午夜电影网亚洲视频| 精品久久久久99| 国产乱码精品一区二区三区忘忧草| 日韩免费看网站| 国产精品一区二区久久精品爱涩| 国产亚洲一区字幕| 99re这里都是精品| 视频在线在亚洲| 26uuu另类欧美| 色综合天天综合在线视频| 午夜精品爽啪视频| 久久久久99精品一区| 99re热这里只有精品视频| 性感美女久久精品| 国产婷婷色一区二区三区| 欧美伊人久久久久久久久影院| 麻豆精品一区二区| 亚洲国产一二三| 久久久久国产免费免费| 色综合婷婷久久| 国产福利不卡视频| 日本不卡一区二区三区| 亚洲天堂久久久久久久| 欧美一级理论片| 欧美视频中文字幕| 97精品电影院| 国产精品99久久久久久久女警| 午夜精品久久久| 夜夜嗨av一区二区三区中文字幕| 国产三级欧美三级| 欧美一区二区日韩一区二区| 色久优优欧美色久优优| 一本一道久久a久久精品综合蜜臀| 国产在线播放一区二区三区| 午夜视频在线观看一区| 婷婷久久综合九色国产成人 | 欧美日韩国产免费一区二区| 色婷婷av一区二区三区之一色屋| 高清不卡在线观看| 成人永久免费视频|