Skip to content

Commit

Permalink
Make coefs retrievable
Browse files Browse the repository at this point in the history
  • Loading branch information
survived committed Jun 27, 2023
1 parent 50ce9fa commit 83537a7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions generic-ec-zkp/src/polynomial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ impl<C> Polynomial<C> {
len => len - 1,
}
}

/// Returns polynomial coefficients
pub fn coefs(&self) -> &[C] {
&self.coefs
}

/// Destructs polynomial, returns its coefficients
pub fn into_coefs(self) -> Vec<C> {
self.coefs
}
}

impl<C: Samplable> Polynomial<C> {
Expand Down

0 comments on commit 83537a7

Please sign in to comment.