pub struct Poly(/* private fields */);Expand description
A polynomial in R_q = Z_q[X]/(X^n + 1), stored as a centered coefficient
vector for the active parameter set.
Implementations§
Source§impl Poly
impl Poly
Sourcepub fn from_coefficients(
coefficients: impl Into<Vec<i64>>,
params: &Params,
) -> Result<Self, RuneError>
pub fn from_coefficients( coefficients: impl Into<Vec<i64>>, params: &Params, ) -> Result<Self, RuneError>
Builds a polynomial from centered coefficients.
§Errors
Returns RuneError::MalformedPublicKey if coefficients does not
match params.n() or contains a non-canonical coefficient.
Sourcepub fn coefficients(&self) -> &[i64]
pub fn coefficients(&self) -> &[i64]
Borrows the centered coefficient vector.
Trait Implementations§
impl Eq for Poly
impl StructuralPartialEq for Poly
Auto Trait Implementations§
impl Freeze for Poly
impl RefUnwindSafe for Poly
impl Send for Poly
impl Sync for Poly
impl Unpin for Poly
impl UnsafeUnpin for Poly
impl UnwindSafe for Poly
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more