亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
青青青伊人色综合久久| 在线观看三级视频欧美| 色欧美乱欧美15图片| 欧美高清视频在线高清观看mv色露露十八| 精品国产不卡一区二区三区| 亚洲免费视频成人| 国产九九视频一区二区三区| 欧美日本乱大交xxxxx| 中文字幕一区日韩精品欧美| 国产一区二三区| 日韩免费性生活视频播放| 亚洲综合在线五月| 99久久精品免费观看| 久久人人超碰精品| 蜜臀av性久久久久蜜臀av麻豆| 91福利国产成人精品照片| 国产日产欧美一区| 国产成人免费视频网站高清观看视频| 日韩一区二区三区四区| 亚洲宅男天堂在线观看无病毒| 岛国一区二区在线观看| 久久综合久色欧美综合狠狠| 蜜臀精品久久久久久蜜臀| 欧美男同性恋视频网站| 亚洲国产视频a| 欧美色手机在线观看| 日韩久久一区二区| 91丝袜美腿高跟国产极品老师| 国产亚洲成年网址在线观看| 国产在线国偷精品产拍免费yy| 欧美一区二区免费观在线| 日韩激情视频在线观看| 91精品国产综合久久香蕉的特点| 亚洲一区欧美一区| 欧美乱妇一区二区三区不卡视频| 午夜久久福利影院| 91麻豆精品91久久久久久清纯| 日韩 欧美一区二区三区| 6080国产精品一区二区| 日产欧产美韩系列久久99| 日韩三区在线观看| 国产在线精品视频| 国产精品二区一区二区aⅴ污介绍| 成人短视频下载 | 99久久国产综合色|国产精品| 欧美国产精品劲爆| 99久久免费精品| 一区二区久久久| 欧美日韩日日摸| 久久国产视频网| 久久免费美女视频| av电影在线观看一区| 亚洲免费av高清| 在线播放中文字幕一区| 激情亚洲综合在线| 国产精品久久看| 欧美美女一区二区三区| 久久疯狂做爰流白浆xx| 欧美激情一区在线| 欧美日韩国产综合视频在线观看| 美女国产一区二区三区| 国产日韩欧美不卡在线| 欧美性色aⅴ视频一区日韩精品| 蜜臀精品一区二区三区在线观看| 欧美激情一区在线观看| 欧美视频中文一区二区三区在线观看| 免费在线观看日韩欧美| 国产免费成人在线视频| 欧美人狂配大交3d怪物一区| 国产精品中文有码| 午夜在线成人av| 国产亚洲欧美日韩日本| 欧美日韩电影一区| 国产精品资源网站| 丝袜诱惑亚洲看片| 国产精品九色蝌蚪自拍| 日韩视频一区二区在线观看| 色综合久久综合网| 国产综合久久久久影院| 亚洲国产成人av网| 国产精品久久99| 欧美精品一区二区三| 欧日韩精品视频| 成人精品免费看| 美女看a上一区| 天天av天天翘天天综合网| 国产精品每日更新在线播放网址| 日韩一区二区精品在线观看| 色综合久久综合网97色综合| 国产91清纯白嫩初高中在线观看| 男男gaygay亚洲| 亚洲一区二区3| 中文字幕一区二区三区在线不卡| 精品国产伦一区二区三区观看体验| 色视频一区二区| 91原创在线视频| 国产风韵犹存在线视精品| 久久激情五月激情| 婷婷六月综合亚洲| 一区二区三区不卡视频在线观看| 欧美国产禁国产网站cc| 久久综合给合久久狠狠狠97色69| 欧美精品v国产精品v日韩精品| 欧洲一区二区av| 91成人网在线| 色婷婷av一区二区三区gif | 国产综合久久久久影院| 毛片一区二区三区| 三级欧美韩日大片在线看| 亚洲国产欧美一区二区三区丁香婷| 成人免费在线观看入口| 国产精品欧美久久久久无广告| 国产日韩精品视频一区| 国产亚洲1区2区3区| 久久婷婷综合激情| 久久久99精品久久| 亚洲国产精品激情在线观看| 国产精品久久久久国产精品日日| 国产精品天干天干在观线 | 精品国产一区a| 精品少妇一区二区三区在线视频| 欧美一区二区三区白人 | 欧美精品电影在线播放| 91精品国产综合久久精品 | 日日夜夜免费精品| 美女诱惑一区二区| 国产精品99久久久久| 福利视频网站一区二区三区| 成人免费视频视频| 一本一本大道香蕉久在线精品| 欧美吞精做爰啪啪高潮| 日韩丝袜情趣美女图片| 欧美精品一区二区三区在线| 亚洲国产精品ⅴa在线观看| 国产精品高潮呻吟| 视频一区二区欧美| 国模娜娜一区二区三区| av在线这里只有精品| 在线视频你懂得一区| 欧美一区二区三级| 国产精品三级电影| 天天综合色天天| 国产精品乡下勾搭老头1| 91一区二区在线| 欧美一区永久视频免费观看| 久久久久久久久免费| 亚洲精品日产精品乱码不卡| 日本亚洲一区二区| 成人综合在线网站| 欧美日韩视频在线观看一区二区三区| 精品久久久三级丝袜| 国产精品麻豆视频| 日本成人在线一区| 国产jizzjizz一区二区| 在线观看一区不卡| 久久久亚洲精品石原莉奈| 亚洲已满18点击进入久久| 奇米色一区二区| 色婷婷av一区二区| 久久久蜜桃精品| 天天综合日日夜夜精品| 成人三级伦理片| 日韩欧美在线影院| 亚洲国产乱码最新视频| 成人丝袜18视频在线观看| 这里只有精品99re| 亚洲天堂免费看| 国产成人在线影院| 欧美一级艳片视频免费观看| 亚洲欧美日韩在线| 国产一区二区三区日韩| 91.com视频| 亚洲大片在线观看| 99精品国产视频| 久久日韩精品一区二区五区| 日本成人在线网站| 欧美在线小视频| 亚洲精品视频在线观看免费| 国产精品一区二区你懂的| 91精品国产品国语在线不卡| 亚洲精品一二三| 色哟哟国产精品| 国产精品毛片a∨一区二区三区| 老司机精品视频导航| 7777精品伊人久久久大香线蕉经典版下载 | 欧美综合天天夜夜久久| 中文字幕va一区二区三区| 国产一区二区三区不卡在线观看| 欧美精品乱人伦久久久久久| 亚洲福利视频一区二区| 色播五月激情综合网| 亚洲欧美日本韩国| 色综合天天综合在线视频| 中文字幕日本不卡| 91在线观看地址| 亚洲一区二区三区影院| 欧美日韩日本视频| 视频一区欧美日韩| 日韩精品一区在线| 激情欧美一区二区|