pub struct Zip<A: Expression, B: Expression> { /* private fields */ }
Expand description
Expression that gives tuples (x, y)
of the elements from each expression.
Trait Implementations§
Source§impl<A: Clone + Expression, B: Clone + Expression> Clone for Zip<A, B>
impl<A: Clone + Expression, B: Clone + Expression> Clone for Zip<A, B>
Source§impl<A: Expression + Debug, B: Expression + Debug> Debug for Zip<A, B>
impl<A: Expression + Debug, B: Expression + Debug> Debug for Zip<A, B>
Source§impl<S: Shape, R: Shape, A, B> Expression for Zip<A, B>where
A: Expression<Shape = S>,
B: Expression<Shape = R>,
impl<S: Shape, R: Shape, A, B> Expression for Zip<A, B>where
A: Expression<Shape = S>,
B: Expression<Shape = R>,
Source§const IS_REPEATABLE: bool
const IS_REPEATABLE: bool
True if the expression can be restarted from the beginning after the last element.
Source§type Shape = <<<S as Shape>::Reverse as Shape>::Merge<<R as Shape>::Reverse> as Shape>::Reverse
type Shape = <<<S as Shape>::Reverse as Shape>::Merge<<R as Shape>::Reverse> as Shape>::Reverse
Array shape type.
Source§fn cloned<'a, T: 'a + Clone>(self) -> Cloned<Self>
fn cloned<'a, T: 'a + Clone>(self) -> Cloned<Self>
Creates an expression which clones all of its elements.
Source§fn copied<'a, T: 'a + Copy>(self) -> Copied<Self>
fn copied<'a, T: 'a + Copy>(self) -> Copied<Self>
Creates an expression which copies all of its elements.
Source§fn dim(&self, index: usize) -> usize
fn dim(&self, index: usize) -> usize
Returns the number of elements in the specified dimension. Read more
Source§fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
Creates an expression which gives tuples of the current count and the element.
Source§fn eval(self) -> <Self::Shape as Shape>::Owned<Self::Item>where
Self: Sized,
fn eval(self) -> <Self::Shape as Shape>::Owned<Self::Item>where
Self: Sized,
Evaluates the expression into a new array. Read more
Source§fn eval_into<S: Shape, A: Allocator>(
self,
tensor: &mut Tensor<Self::Item, S, A>,
) -> &mut Tensor<Self::Item, S, A>where
Self: Sized,
fn eval_into<S: Shape, A: Allocator>(
self,
tensor: &mut Tensor<Self::Item, S, A>,
) -> &mut Tensor<Self::Item, S, A>where
Self: Sized,
Evaluates the expression with broadcasting and appends to the given array
along the first dimension. Read more
Source§fn fold<T, F: FnMut(T, Self::Item) -> T>(self, init: T, f: F) -> Twhere
Self: Sized,
fn fold<T, F: FnMut(T, Self::Item) -> T>(self, init: T, f: F) -> Twhere
Self: Sized,
Folds all elements into an accumulator by applying an operation, and returns the result.
Source§fn for_each<F: FnMut(Self::Item)>(self, f: F)where
Self: Sized,
fn for_each<F: FnMut(Self::Item)>(self, f: F)where
Self: Sized,
Calls a closure on each element of the expression.
Source§impl<A: Expression, B: Expression> IntoIterator for Zip<A, B>
impl<A: Expression, B: Expression> IntoIterator for Zip<A, B>
Auto Trait Implementations§
impl<A, B> Freeze for Zip<A, B>
impl<A, B> RefUnwindSafe for Zip<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
<<<<A as Expression>::Shape as Shape>::Reverse as Shape>::Merge<<<B as Expression>::Shape as Shape>::Reverse> as Shape>::Reverse: RefUnwindSafe,
impl<A, B> Send for Zip<A, B>
impl<A, B> Sync for Zip<A, B>
impl<A, B> Unpin for Zip<A, B>
impl<A, B> UnwindSafe for Zip<A, B>where
A: UnwindSafe,
B: UnwindSafe,
<<<<A as Expression>::Shape as Shape>::Reverse as Shape>::Merge<<<B as Expression>::Shape as Shape>::Reverse> as Shape>::Reverse: UnwindSafe,
Blanket Implementations§
Source§impl<T, E> Apply<T> for Ewhere
E: Expression,
impl<T, E> Apply<T> for Ewhere
E: Expression,
Source§type Output<F: FnMut(<E as IntoIterator>::Item) -> T> = Map<E, F>
type Output<F: FnMut(<E as IntoIterator>::Item) -> T> = Map<E, F>
The resulting type after applying a closure.
Source§type ZippedWith<I: IntoExpression, F: FnMut((<E as IntoIterator>::Item, <I as IntoIterator>::Item)) -> T> = Map<Zip<E, <I as IntoExpression>::IntoExpr>, F>
type ZippedWith<I: IntoExpression, F: FnMut((<E as IntoIterator>::Item, <I as IntoIterator>::Item)) -> T> = Map<Zip<E, <I as IntoExpression>::IntoExpr>, F>
The resulting type after zipping elements and applying a closure.
Source§fn apply<F>(self, f: F) -> <E as Apply<T>>::Output<F>
fn apply<F>(self, f: F) -> <E as Apply<T>>::Output<F>
Returns the array or an expression with the given closure applied to each element.
Source§fn zip_with<I, F>(self, expr: I, f: F) -> <E as Apply<T>>::ZippedWith<I, F>
fn zip_with<I, F>(self, expr: I, f: F) -> <E as Apply<T>>::ZippedWith<I, F>
Returns the array or an expression with the given closure applied to zipped element pairs.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more