ArrayTranspose

Struct ArrayTranspose 

Source
pub struct ArrayTranspose<ArrayImpl, const NDIM: usize> { /* private fields */ }
Expand description

Transpose array

Implementations§

Source§

impl<ArrayImpl, const NDIM: usize> ArrayTranspose<ArrayImpl, NDIM>
where ArrayImpl: Shape<NDIM>,

Source

pub fn new(arr: Array<ArrayImpl, NDIM>, permutation: [usize; NDIM]) -> Self

Create new transpose array

Trait Implementations§

Source§

impl<Item: Copy + Default, ArrayImpl, const NDIM: usize> BaseItem for ArrayTranspose<ArrayImpl, NDIM>
where ArrayImpl: BaseItem<Item = Item>,

Source§

type Item = Item

Item type.
Source§

impl<ArrayImpl, const NDIM: usize> ContainerType for ArrayTranspose<ArrayImpl, NDIM>
where ArrayImpl: ContainerType,

Source§

type Type = <ArrayImpl as ContainerType>::Type

The type for the container.
Source§

fn type_as_str(&self) -> &'static str

Returns the type hint for the container as string ref.
Source§

impl<ArrayImpl: Shape<NDIM>, const NDIM: usize> Shape<NDIM> for ArrayTranspose<ArrayImpl, NDIM>

Source§

fn shape(&self) -> [usize; NDIM]

Return the shape of the object.
Source§

fn len(&self) -> usize

Return the length, which for n dimension is the product of the dimensions.
Source§

fn is_empty(&self) -> bool

Return true if the array is empty. Read more
Source§

impl<ArrayImpl, const NDIM: usize> UnsafeRandom1DAccessByRef for ArrayTranspose<ArrayImpl, NDIM>
where ArrayImpl: UnsafeRandomAccessByRef<NDIM> + Shape<NDIM>,

Source§

unsafe fn get_1d_unchecked(&self, index: usize) -> &Self::Item

Return a reference to the element at position determined by index. Read more
Source§

impl<ArrayImpl, const NDIM: usize> UnsafeRandom1DAccessByValue for ArrayTranspose<ArrayImpl, NDIM>
where ArrayImpl: UnsafeRandomAccessByValue<NDIM> + Shape<NDIM>,

Source§

unsafe fn get_value_1d_unchecked(&self, index: usize) -> Self::Item

Return the element at position determined by index. Read more
Source§

impl<ArrayImpl, const NDIM: usize> UnsafeRandom1DAccessMut for ArrayTranspose<ArrayImpl, NDIM>
where ArrayImpl: UnsafeRandomAccessMut<NDIM> + Shape<NDIM>,

Source§

unsafe fn get_1d_unchecked_mut(&mut self, index: usize) -> &mut Self::Item

Return a mutable reference to the element at position determined by index. Read more
Source§

impl<ArrayImpl, const NDIM: usize> UnsafeRandomAccessByRef<NDIM> for ArrayTranspose<ArrayImpl, NDIM>
where ArrayImpl: UnsafeRandomAccessByRef<NDIM>,

Source§

unsafe fn get_unchecked(&self, multi_index: [usize; NDIM]) -> &Self::Item

Return a reference to the element at position determined by multi_index. Read more
Source§

impl<ArrayImpl, const NDIM: usize> UnsafeRandomAccessByValue<NDIM> for ArrayTranspose<ArrayImpl, NDIM>
where ArrayImpl: UnsafeRandomAccessByValue<NDIM>,

Source§

unsafe fn get_value_unchecked(&self, multi_index: [usize; NDIM]) -> Self::Item

Return the element at position determined by multi_index. Read more
Source§

impl<ArrayImpl, const NDIM: usize> UnsafeRandomAccessMut<NDIM> for ArrayTranspose<ArrayImpl, NDIM>
where ArrayImpl: UnsafeRandomAccessMut<NDIM>,

Source§

unsafe fn get_unchecked_mut( &mut self, multi_index: [usize; NDIM], ) -> &mut Self::Item

Return a mutable reference to the element at position determined by multi_index. Read more

Auto Trait Implementations§

§

impl<ArrayImpl, const NDIM: usize> Freeze for ArrayTranspose<ArrayImpl, NDIM>
where ArrayImpl: Freeze,

§

impl<ArrayImpl, const NDIM: usize> RefUnwindSafe for ArrayTranspose<ArrayImpl, NDIM>
where ArrayImpl: RefUnwindSafe,

§

impl<ArrayImpl, const NDIM: usize> Send for ArrayTranspose<ArrayImpl, NDIM>
where ArrayImpl: Send,

§

impl<ArrayImpl, const NDIM: usize> Sync for ArrayTranspose<ArrayImpl, NDIM>
where ArrayImpl: Sync,

§

impl<ArrayImpl, const NDIM: usize> Unpin for ArrayTranspose<ArrayImpl, NDIM>
where ArrayImpl: Unpin,

§

impl<ArrayImpl, const NDIM: usize> UnwindSafe for ArrayTranspose<ArrayImpl, NDIM>
where ArrayImpl: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<Item, Mat, const NDIM: usize> RandomAccessByRef<NDIM> for Mat
where Mat: UnsafeRandomAccessByRef<NDIM, Item = Item> + Shape<NDIM>,

Source§

fn get(&self, multi_index: [usize; NDIM]) -> Option<&<Mat as BaseItem>::Item>

Return a reference to the element at position determined by multi_index. If the value is out of bounds None is returned.
Source§

impl<Mat, const NDIM: usize> RandomAccessByValue<NDIM> for Mat
where Mat: UnsafeRandomAccessByValue<NDIM> + Shape<NDIM>,

Source§

fn get_value( &self, multi_index: [usize; NDIM], ) -> Option<<Mat as BaseItem>::Item>

Return the element at position determined by multi_index. If the value is out of bounds None is returned.
Source§

impl<Item, Mat, const NDIM: usize> RandomAccessMut<NDIM> for Mat
where Mat: UnsafeRandomAccessMut<NDIM, Item = Item> + Shape<NDIM>,

Source§

fn get_mut( &mut self, multi_index: [usize; NDIM], ) -> Option<&mut <Mat as BaseItem>::Item>

Return a mutable reference to the element at position determined by multi_index. If the value is out of bounds None is returned.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T, U> Imply<T> for U

Source§

impl<A, Item, const NDIM: usize> MutableArrayImpl<Item, NDIM> for A
where A: RefArrayImpl<Item, NDIM, Item = Item, Item = Item> + UnsafeRandom1DAccessMut + UnsafeRandomAccessMut<NDIM>,

Source§

impl<A, Item, const NDIM: usize> RefArrayImpl<Item, NDIM> for A
where A: ValueArrayImpl<Item, NDIM, Item = Item, Item = Item> + UnsafeRandom1DAccessByRef + UnsafeRandomAccessByRef<NDIM>,

Source§

impl<A, Item, const NDIM: usize> ValueArrayImpl<Item, NDIM> for A
where A: UnsafeRandom1DAccessByValue<Item = Item, Item = Item> + UnsafeRandomAccessByValue<NDIM> + Shape<NDIM> + ContainerType,