Skip to main content

Gen

Struct Gen 

Source
pub struct Gen;
Expand description

General tensor implementation with no symmetries of the form Tᵢⱼₖ…

Trait Implementations§

Source§

impl<const N: usize, const R: usize> TensorIndex<N, R> for Gen

Source§

type Indices = GenIndices<N, R>

Type of iterator over valid tensor indices.
Source§

fn offset_from_index(index: [usize; R]) -> 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 for_each_index(f: impl FnMut([usize; R]))

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

fn count() -> usize

Counts all unique indices used to store the tensor.

Auto Trait Implementations§

§

impl Freeze for Gen

§

impl RefUnwindSafe for Gen

§

impl Send for Gen

§

impl Sync for Gen

§

impl Unpin for Gen

§

impl UnsafeUnpin for Gen

§

impl UnwindSafe for Gen

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.