feat: Add task runner for the sff task

This commit is contained in:
Alivecow 2024-11-25 14:19:41 +01:00
parent 1c9948ac62
commit 6856420ff9
6 changed files with 62 additions and 24 deletions

View file

@ -0,0 +1,10 @@
use super::poly::Polynomial;
pub fn dff(f: Polynomial) {
let q = 2u128.pow(128);
let z: Vec<(Polynomial, u32)> = vec![];
let d = 1;
let f_start = f.clone();
while f_start.degree() >= 2 * d {}
}

View file

@ -22,6 +22,10 @@ impl Polynomial {
Self { polynomial }
}
pub fn degree(&self) -> usize {
self.polynomial.len()
}
pub fn from_c_array(array: &Value) -> Self {
let mut polynomial: Vec<FieldElement> = vec![];
let c_array: Vec<String> = array

View file

@ -8,9 +8,9 @@ use crate::utils::{
use super::poly::Polynomial;
#[derive(Debug, Serialize, Deserialize)]
struct Factors {
factor: Vec<String>,
exponent: u32,
pub struct Factors {
pub factor: Vec<String>,
pub exponent: u32,
}
pub fn sff(mut f: Polynomial) -> Vec<(Polynomial, u32)> {