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

📄 vec_rr.txt

📁 密码大家Shoup写的数论算法c语言实现
💻 TXT
字号:
/**************************************************************************\MODULE: vec_RRSUMMARY:Defines the class vec_RR.\**************************************************************************/NTL_vector_decl(RR,vec_RR)NTL_eq_vector_decl(RR,vec_RR)// == and !=NTL_io_vector_decl(RR,vec_RR)// I/O operatorsvoid mul(vec_RR& x, const vec_RR& a, const RR& b);void mul(vec_RR& x, const vec_RR& a, double b);void mul(vec_RR& x, const RR& a, const vec_RR& b);void mul(vec_RR& x, double a, const vec_RR& b);// x = a * bvoid add(vec_RR& x, const vec_RR& a, const vec_RR& b);// x = a + bvoid sub(vec_RR& x, const vec_RR& a, const vec_RR& b);// x = a - bvoid clear(vec_RR& x);// x = 0 (length unchanged)void negate(vec_RR& x, const vec_RR& a);// x = -along IsZero(const vec_RR& a);// test if a is the zero vectorvoid InnerProduct(RR& x, const vec_RR& a, const vec_RR& b);// x = inner product of a and b, padded with zeros to make the lengths// even.void VectorCopy(vec_RR& x, const vec_RR& a, long n);vec_RR VectorCopy(const vec_RR& 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_RR operator+(const vec_RR& a, const vec_RR& b);vec_RR operator-(const vec_RR& a, const vec_RR& b);vec_RR operator-(const vec_RR& a);// vector/scalar multiplication:vec_RR operator*(const vec_RR& a, const RR& b);vec_RR operator*(const vec_RR& a, double b);vec_RR operator*(const RR& a, const vec_RR& b);vec_RR operator*(double a, const vec_RR& b);// inner product:RR operator*(const vec_RR& a, const vec_RR& b);// assignment operator notation:vec_RR& operator+=(vec_RR& x, const vec_RR& a);vec_RR& operator-=(vec_RR& x, const vec_RR& a);vec_RR& operator*=(vec_RR& x, const RR& a);vec_RR& operator*=(vec_RR& x, double a);

⌨️ 快捷键说明

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