1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
.. _fmpz-mod-vec:
**fmpz_mod_vec.h** -- vectors over integers mod n
===============================================================================
Conversions
--------------------------------------------------------------------------------
.. function:: void _fmpz_mod_vec_set_fmpz_vec(fmpz * A, const fmpz * B, slong len, const fmpz_mod_ctx_t ctx)
Set the `fmpz_mod_vec` `(A, len)` to the `fmpz_vec` `(B, len)` after
reduction of each entry modulo the modulus..
Arithmetic
--------------------------------------------------------------------------------
.. function:: void _fmpz_mod_vec_neg(fmpz * A, const fmpz * B, slong len, const fmpz_mod_ctx_t ctx)
Set `(A, len)` to `-(B, len)`.
.. function:: void _fmpz_mod_vec_add(fmpz * a, const fmpz * b, const fmpz * c, slong n, const fmpz_mod_ctx_t ctx)
Set (A, len)` to `(B, len) + (C, len)`.
.. function:: void _fmpz_mod_vec_sub(fmpz * a, const fmpz * b, const fmpz * c, slong n, const fmpz_mod_ctx_t ctx)
Set (A, len)` to `(B, len) - (C, len)`.
Scalar Multiplication
--------------------------------------------------------------------------------
.. function:: void _fmpz_mod_vec_scalar_mul_fmpz_mod(fmpz * A, const fmpz * B, slong len, const fmpz_t c, const fmpz_mod_ctx_t ctx)
Set `(A, len)` to `(B, len)*c`.
.. function:: void _fmpz_mod_vec_scalar_addmul_fmpz_mod(fmpz * A, const fmpz * B, slong len, const fmpz_t c, const fmpz_mod_ctx_t ctx)
Set `(A, len)` to `(A, len) + (B, len)*c`.
.. function:: void _fmpz_mod_vec_scalar_div_fmpz_mod(fmpz * A, const fmpz * B, slong len, const fmpz_t c, const fmpz_mod_ctx_t ctx)
Set `(A, len)` to `(B, len)/c` assuming `c` is nonzero.
Dot Product
--------------------------------------------------------------------------------
.. function:: void _fmpz_mod_vec_dot(fmpz_t d, const fmpz * A, const fmpz * B, slong len, const fmpz_mod_ctx_t ctx)
Set `d` to the dot product of `(A, len)` with `(B, len)`.
.. function:: void _fmpz_mod_vec_dot_rev(fmpz_t d, const fmpz * A, const fmpz * B, slong len, const fmpz_mod_ctx_t ctx)
Set `d` to the dot product of `(A, len)` with the reverse of the vector `(B, len)`.
Multiplication
--------------------------------------------------------------------------------
.. function:: void _fmpz_mod_vec_mul(fmpz * A, const fmpz * B, const fmpz * C, slong len, const fmpz_mod_ctx_t ctx)
Set `(A, len)` the pointwise multiplication of `(B, len)` and `(C, len)`.
|