MCPcopy Create free account
hub / github.com/arkworks-rs/poly-commit / evaluate

Method evaluate

poly-commit/src/ipa_pc/data_structures.rs:223–236  ·  view source on GitHub ↗

Evaluate `self` at `point` in time `O(log_d)`.

(&self, point: F)

Source from the content-addressed store, hash-verified

221
222 /// Evaluate `self` at `point` in time `O(log_d)`.
223 pub fn evaluate(&self, point: F) -> F {
224 let challenges = &self.0;
225 let log_d = challenges.len();
226
227 let mut product = F::one();
228 for (i, challenge) in challenges.iter().enumerate() {
229 let i = i + 1;
230 let elem_degree: u64 = (1 << (log_d - i)) as u64;
231 let elem = point.pow([elem_degree]);
232 product *= &(F::one() + &(elem * challenge));
233 }
234
235 product
236 }
237}

Callers 11

test_commitmentFunction · 0.45
openMethod · 0.45
test_polynomialFunction · 0.45
succinct_checkMethod · 0.45
openMethod · 0.45
end_to_end_test_templateFunction · 0.45
test_hyrax_constructionFunction · 0.45

Calls 2

lenMethod · 0.80
iterMethod · 0.80