POLY: add print functions
This commit is contained in:
parent
bdb12ac175
commit
f3ac38a6c0
23
src/poly.c
23
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");
|
||||
}
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user