fmpz_mod_vec.h – vectors over integers mod n¶
Conversions¶
-
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..
-
void _fmpz_mod_vec_get_fmpz_vec_smod(fmpz *res, const fmpz *vec, slong len, const fmpz_mod_ctx_t ctx)¶
Given \((vec, len)\) of residues in \([0, n)\), set \((res, len)\) to the symmetric residues in \((-n/2, n/2]\). This is equivalent to applying
_fmpz_vec_scalar_smod_fmpz()but optimized for the case where the input vector is known to be reduced mod \(n\) ahead of time.
Arithmetic¶
-
void _fmpz_mod_vec_neg(fmpz *A, const fmpz *B, slong len, const fmpz_mod_ctx_t ctx)¶
Set \((A, len)\) to \(-(B, len)\).
Scalar Multiplication¶
-
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\).