Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion baby-stark/src/polynomial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,15 @@ impl Polynomial {
None => Err("COULD_NOT_GET_MODULO".to_string())
}
}



pub fn test_colinearity(points: [FieldElement]) -> bool {
let domain: Vec<_> = points.iter().map(|point| point.clone()).collect();
let values: Vec<_> = points.iter().map(|point| point.clone()).collect();
let polynomial = Polynomial::interpolate_domain(domain, values);
polynomial.degree() <= 1
}

pub fn __xor__(self, exponent : i128) -> Polynomial {
// TBD
if self.clone().is_zero() {
Expand Down Expand Up @@ -267,7 +275,12 @@ impl Polynomial {
}

Polynomial::from(new_coefficients)

}




}


Expand Down