📄 vec_rr.txt
字号:
/**************************************************************************\
MODULE: vec_RR
SUMMARY:
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 operators
void 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 * b
void add(vec_RR& x, const vec_RR& a, const vec_RR& b);
// x = a + b
void sub(vec_RR& x, const vec_RR& a, const vec_RR& b);
// x = a - b
void clear(vec_RR& x);
// x = 0 (length unchanged)
void negate(vec_RR& x, const vec_RR& a);
// x = -a
long IsZero(const vec_RR& a);
// test if a is the zero vector
void 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 + -