Struct afarray::ArrayExt [−][src]
pub struct ArrayExt<T: HasAfEnum>(_);
Expand description
A wrapper around af::Array
which defines common operations.
Implementations
Construct a new ArrayExt with the given value and length.
Concatenate two instances of ArrayExt<T>
.
Return true
if the elements of this ArrayExt
are in sorted order.
Cast the values of this ArrayExt
into a destination type D
.
Get the values specified by the given af::Indexer
.
Deconstruct this ArrayExt<T>
into its underlying af::Array
.
Return a slice of this ArrayExt
.
Panics: if end
is out of bounds
Sort this ArrayExt
.
Return a sorted copy of this ArrayExt
.
Split this ArrayExt<T>
into two new instances at the given pivot.
Return only the unique values from this ArrayExt
.
Pass true
for sorted
if this ArrayExt
is known to be in sorted order.
Trait Implementations
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> Add<&'_ ArrayExt<T>> for &ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> Add<&'_ ArrayExt<T>> for &ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
type Output = ArrayExt<<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output>
type Output = ArrayExt<<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output>
The resulting type after applying the +
operator.
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> Add<ArrayExt<T>> for ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> Add<ArrayExt<T>> for ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
type Output = ArrayExt<<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output>
type Output = ArrayExt<<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output>
The resulting type after applying the +
operator.
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> AddAssign<ArrayExt<T>> for ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> AddAssign<ArrayExt<T>> for ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
Performs the +=
operation. Read more
type DType = T
Get the values specified by the given af::Indexer
.
Set the values specified by the given af::Indexer
to the corresponding values in T
.
Set the value at the specified index to value
.
Element-wise check for infinite values.
impl<'de, T: HasAfEnum + Deserialize<'de> + 'de> Deserialize<'de> for ArrayExt<T> where
ArrayExt<T>: From<Vec<T>>,
impl<'de, T: HasAfEnum + Deserialize<'de> + 'de> Deserialize<'de> for ArrayExt<T> where
ArrayExt<T>: From<Vec<T>>,
Deserialize this value from the given Serde deserializer. Read more
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> Div<&'_ ArrayExt<T>> for &ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> Div<&'_ ArrayExt<T>> for &ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
type Output = ArrayExt<<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output>
type Output = ArrayExt<<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output>
The resulting type after applying the /
operator.
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> Div<ArrayExt<T>> for ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> Div<ArrayExt<T>> for ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
type Output = ArrayExt<<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output>
type Output = ArrayExt<<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output>
The resulting type after applying the /
operator.
Creates a value from an iterator. Read more
The decoding context of this type, useful in situations where the stream to be decoded may be too large to hold in main memory. Read more
The decoding context of this type, useful in situations where the stream to be decoded may be too large to hold in main memory. Read more
The decoding context of this type, useful in situations where the stream to be decoded may be too large to hold in main memory. Read more
The decoding context of this type, useful in situations where the stream to be decoded may be too large to hold in main memory. Read more
The decoding context of this type, useful in situations where the stream to be decoded may be too large to hold in main memory. Read more
The decoding context of this type, useful in situations where the stream to be decoded may be too large to hold in main memory. Read more
The decoding context of this type, useful in situations where the stream to be decoded may be too large to hold in main memory. Read more
The decoding context of this type, useful in situations where the stream to be decoded may be too large to hold in main memory. Read more
The decoding context of this type, useful in situations where the stream to be decoded may be too large to hold in main memory. Read more
The decoding context of this type, useful in situations where the stream to be decoded may be too large to hold in main memory. Read more
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> Mul<&'_ ArrayExt<T>> for &ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> Mul<&'_ ArrayExt<T>> for &ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
type Output = ArrayExt<<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output>
type Output = ArrayExt<<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output>
The resulting type after applying the *
operator.
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> Mul<ArrayExt<T>> for ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> Mul<ArrayExt<T>> for ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
type Output = ArrayExt<<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output>
type Output = ArrayExt<<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output>
The resulting type after applying the *
operator.
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> MulAssign<ArrayExt<T>> for ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> MulAssign<ArrayExt<T>> for ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
Performs the *=
operation. Read more
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> Rem<&'_ ArrayExt<T>> for &ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> Rem<&'_ ArrayExt<T>> for &ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
type Output = ArrayExt<<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output>
type Output = ArrayExt<<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output>
The resulting type after applying the %
operator.
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> Rem<ArrayExt<T>> for ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> Rem<ArrayExt<T>> for ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
type Output = ArrayExt<<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output>
type Output = ArrayExt<<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output>
The resulting type after applying the %
operator.
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> Sub<&'_ ArrayExt<T>> for &ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> Sub<&'_ ArrayExt<T>> for &ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
type Output = ArrayExt<<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output>
type Output = ArrayExt<<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output>
The resulting type after applying the -
operator.
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> Sub<ArrayExt<T>> for ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> Sub<ArrayExt<T>> for ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
type Output = ArrayExt<<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output>
type Output = ArrayExt<<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output>
The resulting type after applying the -
operator.
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> SubAssign<ArrayExt<T>> for ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
impl<T: HasAfEnum + ImplicitPromote<T> + Convertable<OutType = T>> SubAssign<ArrayExt<T>> for ArrayExt<T> where
<T as ImplicitPromote<T>>::Output: HasAfEnum + Default,
<T as Convertable>::OutType: ImplicitPromote<<T as Convertable>::OutType>,
<<T as Convertable>::OutType as ImplicitPromote<<T as Convertable>::OutType>>::Output: HasAfEnum,
Performs the -=
operation. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for ArrayExt<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for ArrayExt<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns true
if self
can be cast into the target type T
.
Test if value
can be cast into Self
.
Returns Some(Self)
if the source value can be cast into Self
, otherwise None
.
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
Test if self
can be cast into T
.
Returns Some(T)
if self
can be cast into T
, otherwise None
.
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
Returns Ok(T)
if self
can be cast into T
, otherwise calls on_err
.