Function sprs::prod::csvec_dot_by_binary_search
source · pub fn csvec_dot_by_binary_search<N, I, A, B>(
vec1: CsVecViewI<'_, A, I>,
vec2: CsVecViewI<'_, B, I>
) -> Nwhere
I: SpIndex,
N: MulAcc<A, B> + Zero,
Expand description
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.