fn nnz_zip<'a, I, N1, N2>(self, other: I)
    -> FilterMap<NnzOrZip<'a, Self, I::IntoIter, N1, N2>,
                 fn(NnzEither<'a, N1,N2>) -> Option<(usize, &'a N1, &'a N2)>>
    where Self: Iterator<Item=(usize, &'a N1)> + Sized,
          I: IntoIterator<Item=(usize, &'a N2)> {
        let nnz_or_iter = NnzOrZip {
            left: self.peekable(),
            right: other.into_iter().peekable(),
            life: PhantomData,
        };
        nnz_or_iter.filter_map(filter_both_nnz)
    }
/// Iterate over the matching non-zero elements of both vectors
/// Useful for vector dot product.
///
/// # Example
///
/// ```rust
/// use sprs::CsVec;
/// use sprs::vec::SparseIterTools;
/// let v0 = CsVec::new(5, vec![0, 2, 4], vec![1., 2., 3.]);
/// let v1 = CsVec::new(5, vec![1, 2, 3], vec![-1., -2., -3.]);
/// let mut nnz_zip = v0.iter().nnz_zip(v1.iter());
/// assert_eq!(nnz_zip.next(), Some((2, &2., &-2.)));
/// assert_eq!(nnz_zip.next(), None);
/// ```
Iterate over the matching non-zero elements of both vectors
Useful for vector dot product.
Iterate over the matching non - zero elements of both vectors Useful for vector dot product .
fn nnz_zip<'a, I, N1, N2>(self, other: I)
    -> FilterMap<NnzOrZip<'a, Self, I::IntoIter, N1, N2>,
                 fn(NnzEither<'a, N1,N2>) -> Option<(usize, &'a N1, &'a N2)>>
    where Self: Iterator<Item=(usize, &'a N1)> + Sized,
          I: IntoIterator<Item=(usize, &'a N2)> {
        let nnz_or_iter = NnzOrZip {
            left: self.peekable(),
            right: other.into_iter().peekable(),
            life: PhantomData,
        };
        nnz_or_iter.filter_map(filter_both_nnz)
    }
fn nnz_zip < ' a , I , N1 , N2 > ( self , other : I ) -> FilterMap < NnzOrZip < ' a , Self , I :: IntoIter , N1 , N2 > , fn ( NnzEither < ' a , N1 , N2 > ) -> Option < ( usize , & ' a N1 , & ' a N2 ) > > where Self : Iterator < Item = ( usize , & ' a N1 ) > + Sized , I : IntoIterator < Item = ( usize , & ' a N2 ) > { let nnz_or_iter = NnzOrZip { left : self . peekable ( ) , right : other . into_iter ( ) . peekable ( ) , life : PhantomData , } ; nnz_or_iter . filter_map ( filter_both_nnz ) }
Iterate over the matching non-zero elements of both vectors
Useful for vector dot product.
Iterate over the matching non - zero elements of both vectors Useful for vector dot product .
self
other
I
self
other
I
example
None