[][src]Trait const_alg::ZipWith

pub trait ZipWith<RHS, F> {
    type Output;
    fn zip_with(self, other: RHS, f: F) -> Self::Output;
}

Zips the matrix eagerly with the given function

Similar to Haskell's zipWith

This takes a secondary matrix, and a function that accepts two arguments, elements into each matrix, and calls the function with all of the corrosponding elements of each matrix and produces a matrix of the result

Associated Types

type Output

Loading content...

Required methods

fn zip_with(self, other: RHS, f: F) -> Self::Output

Loading content...

Implementors

impl<'a, 'b, T, U, F, const N: usize, const M: usize> ZipWith<&'b Matrix<U, N, M>, F> for &'a Matrix<T, { N }, { M }> where
    F: FnMut(&'a T, &'b U), 
[src]

impl<'a, 'b, T, U, F, const N: usize, const M: usize> ZipWith<&'b Matrix<U, N, M>, F> for &'a mut Matrix<T, { N }, { M }> where
    F: FnMut(&'a mut T, &'b U), 
[src]

impl<'a, 'b, T, U, F, const N: usize, const M: usize> ZipWith<&'b mut Matrix<U, N, M>, F> for &'a Matrix<T, { N }, { M }> where
    F: FnMut(&'a T, &'b mut U), 
[src]

impl<'a, 'b, T, U, F, const N: usize, const M: usize> ZipWith<&'b mut Matrix<U, N, M>, F> for &'a mut Matrix<T, { N }, { M }> where
    F: FnMut(&'a mut T, &'b mut U), 
[src]

impl<'a, 'b, T, U, V, F, const N: usize, const M: usize> ZipWith<&'b Matrix<U, N, M>, F> for &'a Matrix<T, { N }, { M }> where
    F: FnMut(&'a T, &'b U) -> V, 
[src]

type Output = Matrix<V, { N }, { M }>

impl<'a, 'b, T, U, V, F, const N: usize, const M: usize> ZipWith<&'b Matrix<U, N, M>, F> for &'a mut Matrix<T, { N }, { M }> where
    F: FnMut(&'a mut T, &'b U) -> V, 
[src]

type Output = Matrix<V, { N }, { M }>

impl<'a, 'b, T, U, V, F, const N: usize, const M: usize> ZipWith<&'b mut Matrix<U, N, M>, F> for &'a Matrix<T, { N }, { M }> where
    F: FnMut(&'a T, &'b mut U) -> V, 
[src]

type Output = Matrix<V, { N }, { M }>

impl<'a, 'b, T, U, V, F, const N: usize, const M: usize> ZipWith<&'b mut Matrix<U, N, M>, F> for &'a mut Matrix<T, { N }, { M }> where
    F: FnMut(&'a mut T, &'b mut U) -> V, 
[src]

type Output = Matrix<V, { N }, { M }>

impl<'a, T, U, F, const N: usize, const M: usize> ZipWith<Matrix<U, N, M>, F> for &'a Matrix<T, { N }, { M }> where
    F: FnMut(&'a T, U), 
[src]

impl<'a, T, U, F, const N: usize, const M: usize> ZipWith<Matrix<U, N, M>, F> for &'a mut Matrix<T, { N }, { M }> where
    F: FnMut(&'a mut T, U), 
[src]

impl<'a, T, U, V, F, const N: usize, const M: usize> ZipWith<Matrix<U, N, M>, F> for &'a Matrix<T, { N }, { M }> where
    F: FnMut(&'a T, U) -> V, 
[src]

type Output = Matrix<V, { N }, { M }>

impl<'a, T, U, V, F, const N: usize, const M: usize> ZipWith<Matrix<U, N, M>, F> for &'a mut Matrix<T, { N }, { M }> where
    F: FnMut(&'a mut T, U) -> V, 
[src]

type Output = Matrix<V, { N }, { M }>

impl<'b, T, U, F, const N: usize, const M: usize> ZipWith<&'b Matrix<U, N, M>, F> for Matrix<T, { N }, { M }> where
    F: FnMut(T, &'b U), 
[src]

impl<'b, T, U, F, const N: usize, const M: usize> ZipWith<&'b mut Matrix<U, N, M>, F> for Matrix<T, { N }, { M }> where
    F: FnMut(T, &'b mut U), 
[src]

impl<'b, T, U, V, F, const N: usize, const M: usize> ZipWith<&'b Matrix<U, N, M>, F> for Matrix<T, { N }, { M }> where
    F: FnMut(T, &'b U) -> V, 
[src]

type Output = Matrix<V, { N }, { M }>

impl<'b, T, U, V, F, const N: usize, const M: usize> ZipWith<&'b mut Matrix<U, N, M>, F> for Matrix<T, { N }, { M }> where
    F: FnMut(T, &'b mut U) -> V, 
[src]

type Output = Matrix<V, { N }, { M }>

impl<T, U, F, const N: usize, const M: usize> ZipWith<Matrix<U, N, M>, F> for Matrix<T, { N }, { M }> where
    F: FnMut(T, U), 
[src]

impl<T, U, V, F, const N: usize, const M: usize> ZipWith<Matrix<U, N, M>, F> for Matrix<T, { N }, { M }> where
    F: FnMut(T, U) -> V, 
[src]

type Output = Matrix<V, { N }, { M }>

Loading content...