diff --git a/src/poly.c b/src/poly.c index 3d88e4a..4eb97bf 100644 --- a/src/poly.c +++ b/src/poly.c @@ -602,3 +602,26 @@ cleanup: return retval; } + +/** + * Draws a polynomial to stdout. + * + * @param poly draw this + */ +void poly_draw(fmpz_poly_t poly) +{ + fmpz_poly_print(poly); + flint_printf("\n"); +} + +/** + * Draws a polynomial to stdout, + * in pretty format. + * + * @param poly draw this + */ +void poly_draw_pretty(fmpz_poly_t poly) +{ + fmpz_poly_print_pretty(poly, "x"); + flint_printf("\n"); +} diff --git a/src/poly.h b/src/poly.h index a92ad3a..839898a 100644 --- a/src/poly.h +++ b/src/poly.h @@ -70,5 +70,9 @@ bool poly_inverse_poly_p(fmpz_poly_t a, fmpz_poly_t Fp, ntru_context *ctx); +void poly_draw(fmpz_poly_t poly); + +void poly_draw_pretty(fmpz_poly_t poly); + #endif /* NTRU_POLY_H */