Function sprs::prod::csvec_dot_by_binary_search[][src]

pub fn csvec_dot_by_binary_search<N, I>(
    vec1: CsVecViewI<'_, N, I>,
    vec2: CsVecViewI<'_, N, I>
) -> N where
    I: SpIndex,
    N: MulAcc + Zero

Compute the dot product of two sparse vectors, using binary search to find matching indices.

Runs in O(MlogN) time, where M and N are the number of non-zero entries in each vector.