-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add implement interpolate_domain function #20
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please apply changes
baby-stark/src/polynomial.rs
Outdated
assert_eq(domain.len() == values.len(),"number of elements in domain does not match number of values -- cannot interpolate"); | ||
assert(!domain.is_empty(),"cannot interpolate between zero points"); | ||
let field = domain[0].clone(); | ||
let mut x = Polynomial {coefficients : vec![filed.zero(), field.one()]}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filed
: fix typo
baby-stark/src/polynomial.rs
Outdated
assert(!domain.is_empty(),"cannot interpolate between zero points"); | ||
let field = domain[0].clone(); | ||
let mut x = Polynomial {coefficients : vec![filed.zero(), field.one()]}; | ||
let mut acc = Polynomial { coefficients : Vec::new() }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mettre un Vec
de FieldElement
baby-stark/src/polynomial.rs
Outdated
let mut x = Polynomial {coefficients : vec![filed.zero(), field.one()]}; | ||
let mut acc = Polynomial { coefficients : Vec::new() }; | ||
for i in 0..domain.len(){ | ||
let mut prod = Polynomial {coefficients :vec![values[i].clone()]}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not true
Lagrange interpolation