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

MODULE: vec_RR

SUMMARY:

Defines the class vec_RR.

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


typedef Vec<RR> vec_RR; // backward compatibility

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);