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

Function inner_product

poly-commit/src/utils.rs:150–155  ·  view source on GitHub ↗
(v1: &[F], v2: &[F])

Source from the content-addressed store, hash-verified

148
149#[inline]
150pub(crate) fn inner_product<F: Field>(v1: &[F], v2: &[F]) -> F {
151 ark_std::cfg_iter!(v1)
152 .zip(v2)
153 .map(|(li, ri)| *li * ri)
154 .sum()
155}
156
157#[inline]
158pub(crate) fn scalar_by_vector<F: Field>(s: F, v: &[F]) -> Vec<F> {

Callers 5

row_mulMethod · 0.85
checkMethod · 0.85
openMethod · 0.85
openMethod · 0.85
checkMethod · 0.85

Calls 1

sumMethod · 0.80

Tested by

no test coverage detected