POLY: add print functions

This commit is contained in:
hasufell 2014-05-25 01:40:07 +02:00
parent bdb12ac175
commit f3ac38a6c0
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020
2 changed files with 27 additions and 0 deletions

View File

@ -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");
}

View File

@ -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 */