[ < ] [ > ] [ << ] [ Up ] [ >> ] [Top] [Contents] [Index] [ ? ]

### Algebraic Operations on vectors

Function: void vector_combine (const pkint_t* q1, const pkint_t* q2, pkint_t* q3, int k, size_t size)
This function computes a linear combination of q1 and q2 and puts it array q3 such that q3[k]=0. The first coefficient is never considered for computations, except when k==0. The result is normalized.

Function: void vector_product (pkint_t* prod, const pkint_t* q1, const pkint_t* q2, size_t size)
Computes the scalar product of arrays q1 and q2 of common size size and stores it in *prod. The first coefficient is ignored.

Function: void vector_product_strict (pkint_t* prod, const pkint_t* q1, const pkint_t* q2, size_t size)
As the previous function, but the \epsilon-coefficients are ignored.

Function: void vector_add (pkint_t* q3, const pkint_t* q1, const pkint_t* q2, size_t size)
This function computes the addition of q1 and q2 considered as affine expressions. The result is normalized and put in q3.

Function: void vector_sub (pkint_t* q3, const pkint_t* q1, const pkint_t* q2, size_t size)
This function computes the substraction of q1 by q2 considered as affine expressions. The result is normalized and put in q3.

Function: void vector_scale (pkint_t* q2, pkint_t num, pkint_t den, const pkint_t* q1, size_t size)
This function scales q1 considered as an affine expression by the fraction num/den and put the results in q2. den is supposed to be positive.

This document was generated on October, 27 2006 using texi2html