Struct TensorList

Source
pub struct TensorList<T, const N: usize>(/* private fields */)
where
    T: Tensor;

Implementations§

Source§

impl<T, const N: usize> TensorList<T, N>
where T: Tensor,

Source

pub const fn const_from(array: [T; N]) -> Self

Associated function for const type conversion.

Trait Implementations§

Source§

impl<T, const N: usize> Add<&TensorList<T, N>> for TensorList<T, N>
where T: Tensor,

Source§

type Output = TensorList<T, N>

The resulting type after applying the + operator.
Source§

fn add(self, tensor_list: &Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, const N: usize> Add for TensorList<T, N>
where T: Tensor,

Source§

type Output = TensorList<T, N>

The resulting type after applying the + operator.
Source§

fn add(self, tensor_list: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, const N: usize> AddAssign<&TensorList<T, N>> for TensorList<T, N>
where T: Tensor,

Source§

fn add_assign(&mut self, tensor_list: &Self)

Performs the += operation. Read more
Source§

impl<T, const N: usize> AddAssign for TensorList<T, N>
where T: Tensor,

Source§

fn add_assign(&mut self, tensor_list: Self)

Performs the += operation. Read more
Source§

impl<T, const N: usize> Clone for TensorList<T, N>
where T: Tensor + Clone,

Source§

fn clone(&self) -> TensorList<T, N>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T, const N: usize> Debug for TensorList<T, N>
where T: Tensor + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T, const N: usize> Default for TensorList<T, N>
where T: Tensor,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<T, const N: usize> Display for TensorList<T, N>
where T: Tensor,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T, const N: usize> Div<&f64> for TensorList<T, N>
where T: Tensor,

Source§

type Output = TensorList<T, N>

The resulting type after applying the / operator.
Source§

fn div(self, tensor_rank_0: &TensorRank0) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, const N: usize> Div<f64> for TensorList<T, N>
where T: Tensor,

Source§

type Output = TensorList<T, N>

The resulting type after applying the / operator.
Source§

fn div(self, tensor_rank_0: TensorRank0) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, const N: usize> DivAssign<&f64> for TensorList<T, N>
where T: Tensor,

Source§

fn div_assign(&mut self, tensor_rank_0: &TensorRank0)

Performs the /= operation. Read more
Source§

impl<T, const N: usize> DivAssign<f64> for TensorList<T, N>
where T: Tensor,

Source§

fn div_assign(&mut self, tensor_rank_0: TensorRank0)

Performs the /= operation. Read more
Source§

impl<T, const N: usize> From<[T; N]> for TensorList<T, N>
where T: Tensor,

Source§

fn from(tensor_array: [T; N]) -> Self

Converts to this type from the input type.
Source§

impl From<TensorList<TensorRank1<3, 0>, 10>> for TensorRank1List<3, 1, 10>

Source§

fn from(tensor_rank_1_list: TensorRank1List<3, 0, 10>) -> Self

Converts to this type from the input type.
Source§

impl From<TensorList<TensorRank1<3, 0>, 3>> for TensorRank1List<3, 1, 3>

Source§

fn from(tensor_rank_1_list: TensorRank1List<3, 0, 3>) -> Self

Converts to this type from the input type.
Source§

impl From<TensorList<TensorRank1<3, 0>, 4>> for TensorRank1List<3, 1, 4>

Source§

fn from(tensor_rank_1_list: TensorRank1List<3, 0, 4>) -> Self

Converts to this type from the input type.
Source§

impl From<TensorList<TensorRank1<3, 0>, 8>> for TensorRank1List<3, 1, 8>

Source§

fn from(tensor_rank_1_list: TensorRank1List<3, 0, 8>) -> Self

Converts to this type from the input type.
Source§

impl<T, const N: usize> FromIterator<T> for TensorList<T, N>
where T: Tensor,

Source§

fn from_iter<Ii: IntoIterator<Item = T>>(into_iterator: Ii) -> Self

Creates a value from an iterator. Read more
Source§

impl<T, const N: usize> Index<usize> for TensorList<T, N>
where T: Tensor,

Source§

type Output = T

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<T, const N: usize> IndexMut<usize> for TensorList<T, N>
where T: Tensor,

Source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<T, const N: usize> IntoIterator for TensorList<T, N>
where T: Tensor,

Source§

type Item = T

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<<TensorList<T, N> as IntoIterator>::Item, N>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<const D: usize, const I: usize, const J: usize, const W: usize> Mul<&TensorList<TensorRank1<D, J>, W>> for &TensorRank1List<D, I, W>

Source§

type Output = TensorRank2<D, I, J>

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_1_list: &TensorRank1List<D, J, W>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, const I: usize, const J: usize, const W: usize> Mul<&TensorList<TensorRank1<D, J>, W>> for &TensorRank2<D, I, J>

Source§

type Output = TensorList<TensorRank1<D, I>, W>

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_1_list: &TensorRank1List<D, J, W>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, const I: usize, const J: usize, const W: usize> Mul<&TensorList<TensorRank1<D, J>, W>> for TensorRank1List<D, I, W>

Source§

type Output = TensorRank2<D, I, J>

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_1_list: &TensorRank1List<D, J, W>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, const I: usize, const J: usize, const W: usize> Mul<&TensorList<TensorRank1<D, J>, W>> for TensorRank2<D, I, J>

Source§

type Output = TensorList<TensorRank1<D, I>, W>

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_1_list: &TensorRank1List<D, J, W>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const W: usize> Mul<&TensorList<f64, W>> for TensorRank0List<W>

Source§

type Output = f64

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_0_list: &Self) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, const N: usize> Mul<&f64> for TensorList<T, N>
where T: Tensor,

Source§

type Output = TensorList<T, N>

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_0: &TensorRank0) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, const I: usize, const J: usize, const K: usize, const W: usize, const X: usize> Mul<TensorList<TensorList<TensorRank2<D, J, K>, W>, X>> for &TensorRank2<D, I, J>

Source§

type Output = TensorList<TensorList<TensorRank2<D, I, K>, W>, X>

The resulting type after applying the * operator.
Source§

fn mul( self, tensor_rank_2_list_2d: TensorRank2List2D<D, J, K, W, X>, ) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, const I: usize, const J: usize, const K: usize, const W: usize, const X: usize> Mul<TensorList<TensorList<TensorRank2<D, J, K>, W>, X>> for TensorRank2<D, I, J>

Source§

type Output = TensorList<TensorList<TensorRank2<D, I, K>, W>, X>

The resulting type after applying the * operator.
Source§

fn mul( self, tensor_rank_2_list_2d: TensorRank2List2D<D, J, K, W, X>, ) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, const I: usize, const J: usize, const W: usize> Mul<TensorList<TensorRank1<D, J>, W>> for &TensorRank1List<D, I, W>

Source§

type Output = TensorRank2<D, I, J>

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_1_list: TensorRank1List<D, J, W>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, const I: usize, const J: usize, const W: usize> Mul<TensorList<TensorRank1<D, J>, W>> for &TensorRank2<D, I, J>

Source§

type Output = TensorList<TensorRank1<D, I>, W>

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_1_list: TensorRank1List<D, J, W>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, const I: usize, const J: usize, const W: usize> Mul<TensorList<TensorRank1<D, J>, W>> for TensorRank1List<D, I, W>

Source§

type Output = TensorRank2<D, I, J>

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_1_list: TensorRank1List<D, J, W>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, const I: usize, const J: usize, const W: usize> Mul<TensorList<TensorRank1<D, J>, W>> for TensorRank2<D, I, J>

Source§

type Output = TensorList<TensorRank1<D, I>, W>

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_1_list: TensorRank1List<D, J, W>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const W: usize> Mul<TensorList<f64, W>> for &TensorRank0List<W>

Source§

type Output = f64

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_0_list: TensorRank0List<W>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, const N: usize> Mul<f64> for TensorList<T, N>
where T: Tensor,

Source§

type Output = TensorList<T, N>

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_0: TensorRank0) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, const N: usize> MulAssign<&f64> for TensorList<T, N>
where T: Tensor,

Source§

fn mul_assign(&mut self, tensor_rank_0: &TensorRank0)

Performs the *= operation. Read more
Source§

impl<T, const N: usize> MulAssign<f64> for TensorList<T, N>
where T: Tensor,

Source§

fn mul_assign(&mut self, tensor_rank_0: TensorRank0)

Performs the *= operation. Read more
Source§

impl<T, const N: usize> Sub<&TensorList<T, N>> for TensorList<T, N>
where T: Tensor,

Source§

type Output = TensorList<T, N>

The resulting type after applying the - operator.
Source§

fn sub(self, tensor_list: &Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, const N: usize> Sub for TensorList<T, N>
where T: Tensor,

Source§

type Output = TensorList<T, N>

The resulting type after applying the - operator.
Source§

fn sub(self, tensor_list: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, const N: usize> SubAssign<&TensorList<T, N>> for TensorList<T, N>
where T: Tensor,

Source§

fn sub_assign(&mut self, tensor_list: &Self)

Performs the -= operation. Read more
Source§

impl<T, const N: usize> SubAssign for TensorList<T, N>
where T: Tensor,

Source§

fn sub_assign(&mut self, tensor_list: Self)

Performs the -= operation. Read more
Source§

impl<T, const N: usize> Sum for TensorList<T, N>
where T: Tensor,

Source§

fn sum<Ii>(iter: Ii) -> Self
where Ii: Iterator<Item = Self>,

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<T, const N: usize> Tensor for TensorList<T, N>
where T: Tensor,

Source§

type Item = T

The type of item encountered when iterating over the tensor.
Source§

fn iter(&self) -> impl Iterator<Item = &Self::Item>

Returns an iterator. Read more
Source§

fn iter_mut(&mut self) -> impl Iterator<Item = &mut Self::Item>

Returns an iterator that allows modifying each value. Read more
Source§

fn len(&self) -> usize

Returns the number of elements, also referred to as the ‘length’.
Source§

fn size(&self) -> usize

Returns the total number of entries.
Source§

fn error_count( &self, other: &Self, tol_abs: &Scalar, tol_rel: &Scalar, ) -> Option<usize>

Returns number of different entries given absolute and relative tolerances.
Source§

fn full_contraction(&self, tensor: &Self) -> TensorRank0

Returns the full contraction with another tensor.
Source§

fn is_zero(&self) -> bool

Checks whether the tensor is the zero tensor.
Source§

fn norm(&self) -> TensorRank0

Returns the tensor norm.
Source§

fn norm_inf(&self) -> TensorRank0

Returns the infinity norm.
Source§

fn norm_squared(&self) -> TensorRank0

Returns the tensor norm squared.
Source§

fn normalize(&mut self)

Normalizes the tensor.
Source§

fn normalized(self) -> Self

Returns the tensor normalized.
Source§

fn sub_abs(&self, other: &Self) -> Self

Returns the positive difference of the two tensors.
Source§

fn sub_rel(&self, other: &Self) -> Self

Returns the relative difference of the two tensors.
Source§

impl<T, const N: usize> TensorArray for TensorList<T, N>
where T: Tensor + TensorArray,

Source§

type Array = [<T as TensorArray>::Array; N]

The type of array corresponding to the tensor.
Source§

type Item = T

The type of item encountered when iterating over the tensor.
Source§

fn as_array(&self) -> Self::Array

Returns the tensor as an array.
Source§

fn identity() -> Self

Returns the identity tensor.
Source§

fn new(array: Self::Array) -> Self

Returns a tensor given an array.
Source§

fn zero() -> Self

Returns the zero tensor.

Auto Trait Implementations§

§

impl<T, const N: usize> Freeze for TensorList<T, N>
where T: Freeze,

§

impl<T, const N: usize> RefUnwindSafe for TensorList<T, N>
where T: RefUnwindSafe,

§

impl<T, const N: usize> Send for TensorList<T, N>
where T: Send,

§

impl<T, const N: usize> Sync for TensorList<T, N>
where T: Sync,

§

impl<T, const N: usize> Unpin for TensorList<T, N>
where T: Unpin,

§

impl<T, const N: usize> UnwindSafe for TensorList<T, N>
where T: 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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<A, Y, U> OdeSolver<Y, U> for A
where A: Debug, Y: Tensor, U: TensorVec<Item = Y>,