feat: ready test runner for monic and sqrt tasks
This commit is contained in:
parent
f75e7de733
commit
5bb9bcebff
4 changed files with 53 additions and 30 deletions
|
|
@ -81,6 +81,22 @@ pub fn gfpoly_sort(args: &Value) -> Result<Vec<Polynomial>> {
|
|||
Ok(polys)
|
||||
}
|
||||
|
||||
pub fn gfpoly_make_monic(args: &Value) -> Result<Polynomial> {
|
||||
let mut poly_a = Polynomial::from_c_array(&args["A"].clone());
|
||||
|
||||
poly_a.monic();
|
||||
|
||||
Ok(poly_a)
|
||||
}
|
||||
|
||||
pub fn gfpoly_sqrt(args: &Value) -> Result<Polynomial> {
|
||||
let poly_a = Polynomial::from_c_array(&args["Q"].clone());
|
||||
|
||||
let result = poly_a.sqrt();
|
||||
|
||||
Ok(result)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue