Skip to main content

Compound

Struct Compound 

Source
pub struct Compound<const T: usize, const L: usize, const R: usize, Left, Right>
where CSum: CompoundSum<T, L, R>,
{ /* private fields */ }
Expand description

Represents compound combinations of fundemental indices.

Trait Implementations§

Source§

impl<const N: usize, const T: usize, const L: usize, const R: usize, Left, Right> TensorIndex<N, T> for Compound<T, L, R, Left, Right>
where Left: TensorIndex<N, L>, Right: TensorIndex<N, R>, CSum: CompoundSum<T, L, R>,

Source§

type Indices = CompoundIndices<N, T, L, R, <Left as TensorIndex<N, L>>::Indices, <Right as TensorIndex<N, R>>::Indices>

Type of iterator over valid tensor indices.
Source§

fn offset_from_index(index: [usize; T]) -> usize

Converts a valid index into a buffer offset for tensor storage.
Source§

fn indices() -> Self::Indices

Iterates over all (unique) indices in the tensor. This must index the tensor in the same order as Self::offset_from_index.
Source§

fn count() -> usize

Counts all unique indices used to store the tensor.
Source§

fn for_each_index(f: impl FnMut([usize; T]))

Calls a function for each index in the tensor. Must index over the tensor in the same order as Self::indices.

Auto Trait Implementations§

§

impl<const T: usize, const L: usize, const R: usize, Left, Right> Freeze for Compound<T, L, R, Left, Right>

§

impl<const T: usize, const L: usize, const R: usize, Left, Right> RefUnwindSafe for Compound<T, L, R, Left, Right>

§

impl<const T: usize, const L: usize, const R: usize, Left, Right> Send for Compound<T, L, R, Left, Right>

§

impl<const T: usize, const L: usize, const R: usize, Left, Right> Sync for Compound<T, L, R, Left, Right>

§

impl<const T: usize, const L: usize, const R: usize, Left, Right> Unpin for Compound<T, L, R, Left, Right>

§

impl<const T: usize, const L: usize, const R: usize, Left, Right> UnsafeUnpin for Compound<T, L, R, Left, Right>

§

impl<const T: usize, const L: usize, const R: usize, Left, Right> UnwindSafe for Compound<T, L, R, Left, Right>

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.