Skip to content

Commit f12a86c

Browse files
add a few more clarifying comments to doc
1 parent 548d7a7 commit f12a86c

File tree

1 file changed

+3
-0
lines changed
  • src/integer_mod_q/modulus_polynomial_ring_zq

1 file changed

+3
-0
lines changed

src/integer_mod_q/modulus_polynomial_ring_zq/from.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use std::{rc::Rc, str::FromStr};
2222

2323
impl<Mod: Into<Modulus>> From<(&PolyOverZ, Mod)> for ModulusPolynomialRingZq {
2424
/// Creates a [`ModulusPolynomialRingZq`] from a [`PolyOverZ`] and a value that implements [`Into<Modulus>`].
25+
/// It requires that the leading coefficient is `1`.
2526
///
2627
/// Parameters:
2728
/// - `poly`: the coefficients of the polynomial.
@@ -58,6 +59,7 @@ impl<Mod: Into<Modulus>> From<(&PolyOverZ, Mod)> for ModulusPolynomialRingZq {
5859

5960
impl<Mod: Into<Modulus>> From<(PolyOverZ, Mod)> for ModulusPolynomialRingZq {
6061
/// Creates a [`ModulusPolynomialRingZq`] from a [`PolyOverZ`] and a value that implements [`Into<Modulus>`].
62+
/// It requires that the leading coefficient is `1`.
6163
///
6264
/// Parameters:
6365
/// - `poly`: the coefficients of the polynomial.
@@ -149,6 +151,7 @@ impl FromStr for ModulusPolynomialRingZq {
149151
/// Creates a Modulus object of type [`ModulusPolynomialRingZq`]
150152
/// for [`PolynomialRingZq`](crate::integer_mod_q::PolynomialRingZq). This first
151153
/// converts the provided string into a [`PolyOverZq`] and then into the Modulus object.
154+
/// It requires that the leading coefficient is `1`.
152155
///
153156
/// **Warning**: If the input string starts with a correctly formatted
154157
/// [`PolyOverZ`](crate::integer::PolyOverZ) object, the rest of the string

0 commit comments

Comments
 (0)