[][src]Struct math::tensor::Tensor

pub struct Tensor<Dtype> { /* fields omitted */ }

An N-dimensional Tensor

Examples

use math::tensor::{IntoTensor, ShapableData};

let tensor =
    vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].into_tensor([3, 4]);
assert_eq!(tensor.shape().ndim(), 2);
assert_eq!(tensor.shape().dims(), vec![3, 4]);

Trait Implementations

impl<Dtype: Clone> Clone for Tensor<Dtype>[src]

impl<Dtype: Debug> Debug for Tensor<Dtype>[src]

impl<Dtype: Eq> Eq for Tensor<Dtype>[src]

impl<'a, Dtype> From<&'a Tensor<Dtype>> for EphemeralView<'a, Dtype>[src]

A Tensor can be viewed as an EphemeralView with the same shape.

impl<Dtype: PartialEq> PartialEq<Tensor<Dtype>> for Tensor<Dtype>[src]

impl<Dtype> ShapableData<Dtype> for Tensor<Dtype>[src]

A Tensor provides an interface for the underlying data and shape.

impl<Dtype> StructuralEq for Tensor<Dtype>[src]

impl<Dtype> StructuralPartialEq for Tensor<Dtype>[src]

impl<'a, Dtype> ToIterator<'a, TensorIter<'a, Dtype>, Dtype> for Tensor<Dtype> where
    Dtype: Copy
[src]

impl<'a, Dtype> ToView<'a, Dtype> for Tensor<Dtype>[src]

Auto Trait Implementations

impl<Dtype> RefUnwindSafe for Tensor<Dtype> where
    Dtype: RefUnwindSafe

impl<Dtype> Send for Tensor<Dtype> where
    Dtype: Send

impl<Dtype> Sync for Tensor<Dtype> where
    Dtype: Sync

impl<Dtype> Unpin for Tensor<Dtype> where
    Dtype: Unpin

impl<Dtype> UnwindSafe for Tensor<Dtype> where
    Dtype: 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> Pointable for T

type Init = T

The type for initializers.

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.

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