⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vec_zz.txt

📁 密码大家Shoup写的数论算法c语言实现
💻 TXT
字号:
/**************************************************************************\MODULE: vec_ZZSUMMARY:Defines the class vec_ZZ.\**************************************************************************/NTL_vector_decl(ZZ,vec_ZZ)NTL_eq_vector_decl(ZZ,vec_ZZ)// == and !=NTL_io_vector_decl(ZZ,vec_ZZ)// I/O operatorsvoid mul(vec_ZZ& x, const vec_ZZ& a, const ZZ& b);void mul(vec_ZZ& x, const vec_ZZ& a, long b);void mul(vec_ZZ& x, const ZZ& a, const vec_ZZ& b);void mul(vec_ZZ& x, long a, const vec_ZZ& b);// x = a * bvoid add(vec_ZZ& x, const vec_ZZ& a, const vec_ZZ& b);// x = a + bvoid sub(vec_ZZ& x, const vec_ZZ& a, const vec_ZZ& b);// x = a - bvoid clear(vec_ZZ& x);// x = 0 (length unchanged)void negate(vec_ZZ& x, const vec_ZZ& a);// x = -along IsZero(const vec_ZZ& a);// test if a is the zero vectorvoid InnerProduct(ZZ& x, const vec_ZZ& a, const vec_ZZ& b);// x = inner product of a and b, padded with zeros to make the lengths// even.void VectorCopy(vec_ZZ& x, const vec_ZZ& a, long n);vec_ZZ VectorCopy(const vec_ZZ& a, long n);// x = a copy of a of length exactly n.// The input is truncated or padded with zeroes, as necessary.// operator notation:vec_ZZ operator+(const vec_ZZ& a, const vec_ZZ& b);vec_ZZ operator-(const vec_ZZ& a, const vec_ZZ& b);vec_ZZ operator-(const vec_ZZ& a);// vector/scalar multiplication:vec_ZZ operator*(const vec_ZZ& a, const ZZ& b);vec_ZZ operator*(const vec_ZZ& a, long b);vec_ZZ operator*(const ZZ& a, const vec_ZZ& b);vec_ZZ operator*(long a, const vec_ZZ& b);// inner product:ZZ operator*(const vec_ZZ& a, const vec_ZZ& b);// assignment operator notation:vec_ZZ& operator+=(vec_ZZ& x, const vec_ZZ& a);vec_ZZ& operator-=(vec_ZZ& x, const vec_ZZ& a);vec_ZZ& operator*=(vec_ZZ& x, const ZZ& a);vec_ZZ& operator*=(vec_ZZ& x, long a);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -