#ifndef __GF_POLY_H_ #define __GF_POLY_H_ #include"gf.h" struct gf_poly { unsigned int degree; unsigned int base_degree; symbol_t * elements; }; inline void init_poly(struct gf_poly * poly, int degree); inline void init_random_poly(struct gf_poly * poly, int degree); void init_poly_ingf2(struct gf_poly * poly, int degree, unsigned long init_vec); void init_poly_wones(struct gf_poly * poly, int degree, unsigned long init_vec); void init_random_monic_poly_wzeros(struct gf_poly * poly, int degree, unsigned long init_vec); inline symbol_t eval_poly(struct gf_poly * poly, symbol_t x); void print_poly(struct gf_poly * poly); void print_poly_alt(struct gf_poly * poly); int has_roots(struct gf_poly * poly); int is_irreducible(struct gf_poly * poly); void divide_poly(struct gf_poly * quot, struct gf_poly * rem, struct gf_poly * a, struct gf_poly * b); void add_poly(struct gf_poly * sum, struct gf_poly * a, struct gf_poly * b); void multiply_poly(struct gf_poly * prod, struct gf_poly * a, struct gf_poly * b); void free_poly(struct gf_poly * poly); #include"gf_poly.c" #endif