pub enum PadMode<T> {
Constant(T),
Edge,
Maximum,
Mean,
Median,
Minimum,
Reflect,
Symmetric,
Wrap,
}
Expand description
Method that will be used to select the padded values.
Variants§
Constant(T)
Pads with a constant value.
[1, 2, 3] -> [T, T, 1, 2, 3, T, T]
Edge
Pads with the edge values of array.
[1, 2, 3] -> [1, 1, 1, 2, 3, 3, 3]
Maximum
Pads with the maximum value of all or part of the vector along each axis.
[1, 2, 3] -> [3, 3, 1, 2, 3, 3, 3]
Mean
Pads with the mean value of all or part of the vector along each axis.
[1, 2, 3] -> [2, 2, 1, 2, 3, 2, 2]
Median
Pads with the median value of all or part of the vector along each axis.
[1, 2, 3] -> [2, 2, 1, 2, 3, 2, 2]
Minimum
Pads with the minimum value of all or part of the vector along each axis.
[1, 2, 3] -> [1, 1, 1, 2, 3, 1, 1]
Reflect
Pads with the reflection of the vector mirrored on the first and last values of the vector along each axis.
[1, 2, 3] -> [3, 2, 1, 2, 3, 2, 1]
Symmetric
Pads with the reflection of the vector mirrored along the edge of the array.
[1, 2, 3] -> [2, 1, 1, 2, 3, 3, 2]
Wrap
Pads with the wrap of the vector along the axis. The first values are used to pad the end and the end values are used to pad the beginning.
[1, 2, 3] -> [2, 3, 1, 2, 3, 1, 2]
Trait Implementations§
impl<T: Copy> Copy for PadMode<T>
impl<T> StructuralPartialEq for PadMode<T>
Auto Trait Implementations§
impl<T> Freeze for PadMode<T>where
T: Freeze,
impl<T> RefUnwindSafe for PadMode<T>where
T: RefUnwindSafe,
impl<T> Send for PadMode<T>where
T: Send,
impl<T> Sync for PadMode<T>where
T: Sync,
impl<T> Unpin for PadMode<T>where
T: Unpin,
impl<T> UnwindSafe for PadMode<T>where
T: UnwindSafe,
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more