diff options
author | 2015-11-23 17:48:48 +0100 | |
---|---|---|
committer | 2015-11-23 17:48:48 +0100 | |
commit | fca74d4bc3569506a6659880a89aa009dc11f552 (patch) | |
tree | 4cefd06af989608ea8ebd3bc6306889e2a1ad175 /moon-abe/pbc-0.5.14/include/pbc_poly.h | |
parent | 840ac3ebca7af381132bf7e93c1e4c0430d6b16a (diff) |
moon-abe cleanup
Change-Id: Ie1259856db03f0b9e80de3e967ec6bd1f03191b3
Diffstat (limited to 'moon-abe/pbc-0.5.14/include/pbc_poly.h')
-rw-r--r-- | moon-abe/pbc-0.5.14/include/pbc_poly.h | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/moon-abe/pbc-0.5.14/include/pbc_poly.h b/moon-abe/pbc-0.5.14/include/pbc_poly.h deleted file mode 100644 index bca8e108..00000000 --- a/moon-abe/pbc-0.5.14/include/pbc_poly.h +++ /dev/null @@ -1,57 +0,0 @@ -// Polynomial rings R[x], and polynomial rings modulo polynomials, -// i.e. R[x]_{f(x)}. - -// Requires: -// * gmp.h -// * field.h -#ifndef __PBC_POLY_H__ -#define __PBC_POLY_H__ - -// Initializes a polynomial ring. -void field_init_poly(field_ptr f, field_ptr base_field); - -// Initializes a polynomial modulo ring. -// Requires poly to be monic. -void field_init_polymod(field_ptr f, element_ptr poly); - -#pragma GCC visibility push(hidden) -// Internal library functions: - -// Returns deg f. -static inline int poly_degree(element_ptr f) { - return element_item_count(f) - 1; -} - -// Returns base field of f (where the coefficients live). -field_ptr poly_base_field(element_t f); - -// Sets the coefficient of x^n to 0. -void poly_set_coeff0(element_ptr f, int n); - -// Sets the coefficient of x^n to 1. -void poly_set_coeff1(element_ptr f, int n); - -// Sets the coefficient of x^n to a. -void poly_set_coeff(element_ptr f, element_ptr a, int n); - -// Sets f = x. -void poly_setx(element_ptr f); -void poly_const_mul(element_ptr res, element_ptr a, element_ptr poly); - -// Returns 0 when a root exists and sets root to one of the roots. -int poly_findroot(element_ptr root, element_ptr poly); - -// Returns 1 if polynomial is irreducible, 0 otherwise. -// Requires the polynomial to be monic. -int poly_is_irred(element_ptr f); -void poly_random_monic(element_ptr f, int deg); - -void element_field_to_poly(element_t poly, element_t constant); -void element_field_to_polymod(element_ptr f, element_ptr a); - -void polymod_const_mul(element_ptr res, element_ptr a, element_ptr e); -int polymod_field_degree(field_t f); - -#pragma GCC visibility pop - -#endif //__PBC_POLY_H__ |