pub struct Fill<T> { /* private fields */ }
Expand description
Expression that repeats an element by cloning.
Trait Implementations§
Source§impl<T: Clone> Expression for Fill<T>
impl<T: Clone> Expression for Fill<T>
Source§const IS_REPEATABLE: bool = true
const IS_REPEATABLE: bool = true
True if the expression can be restarted from the beginning after the last element.
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<T: Clone> IntoIterator for Fill<T>
impl<T: Clone> IntoIterator for Fill<T>
Auto Trait Implementations§
impl<T> Freeze for Fill<T>where
T: Freeze,
impl<T> RefUnwindSafe for Fill<T>where
T: RefUnwindSafe,
impl<T> Send for Fill<T>where
T: Send,
impl<T> Sync for Fill<T>where
T: Sync,
impl<T> Unpin for Fill<T>where
T: Unpin,
impl<T> UnwindSafe for Fill<T>where
T: 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