[][src]Struct quick_maths::DynTensor

pub struct DynTensor<const D: usize, T = f32> { /* fields omitted */ }

A Tensor which only specifies the number of dimensions

Implementations

impl<T, const D: usize> DynTensor<D, T>[src]

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

pub fn shape(&self) -> &[usize; D][src]

pub fn iter(&self) -> impl Iterator<Item = &T>[src]

pub fn reshape<const D2: usize>(
    self,
    new_shape: Vector<D2, usize>
) -> DynTensor<D2, T>
[src]

pub fn from_iter(shape: [usize; D], iter: impl Iterator<Item = T>) -> Self[src]

Trait Implementations

impl<T: Add + Copy, const D: usize> Add<DynTensor<D, T>> for DynTensor<D, T>[src]

type Output = DynTensor<D, T::Output>

The resulting type after applying the + operator.

impl<const D: usize, T: Clone> Clone for DynTensor<D, T>[src]

impl<const D: usize, T: Debug> Debug for DynTensor<D, T>[src]

impl<T: Div + Copy, const D: usize> Div<DynTensor<D, T>> for DynTensor<D, T>[src]

type Output = DynTensor<D, T::Output>

The resulting type after applying the / operator.

impl<T: Mul + Copy, const D: usize> Mul<DynTensor<D, T>> for DynTensor<D, T>[src]

type Output = DynTensor<D, T::Output>

The resulting type after applying the * operator.

impl<T: Sub + Copy, const D: usize> Sub<DynTensor<D, T>> for DynTensor<D, T>[src]

type Output = DynTensor<D, T::Output>

The resulting type after applying the - operator.

Auto Trait Implementations

impl<const D: usize, T> RefUnwindSafe for DynTensor<D, T> where
    T: RefUnwindSafe

impl<const D: usize, T> Send for DynTensor<D, T> where
    T: Send

impl<const D: usize, T> Sync for DynTensor<D, T> where
    T: Sync

impl<const D: usize, T> Unpin for DynTensor<D, T>

impl<const D: usize, T> UnwindSafe for DynTensor<D, T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.