MCPcopy Create free account
hub / github.com/docknetwork/crypto / check_poly

Function check_poly

compressed_sigma/src/partial_knowledge.rs:392–399  ·  view source on GitHub ↗
(x: Vec<Fr>)

Source from the content-addressed store, hash-verified

390 #[test]
391 fn polynomial() {
392 fn check_poly(x: Vec<Fr>) {
393 let p = create_poly(x.clone());
394 assert_eq!(p.degree(), x.len());
395 assert_eq!(p.evaluate(&Fr::zero()), Fr::one());
396 for x in x.iter() {
397 assert_eq!(p.evaluate(x), Fr::zero());
398 }
399 }
400
401 let x1 = vec![Fr::from(3u64), Fr::from(4u64), Fr::from(5u64)];
402 let x2 = vec![

Callers 1

polynomialFunction · 0.85

Calls 3

create_polyFunction · 0.85
cloneMethod · 0.80
iterMethod · 0.45

Tested by 1

polynomialFunction · 0.68