Skip to main content

TensorRank1

Struct TensorRank1 

Source
pub struct TensorRank1<const D: usize, I, U = Dimensionless>(/* private fields */);
Expand description

A d-dimensional tensor of rank 1.

D is the dimension, I is the configuration.

Implementations§

Source§

impl<const D: usize, I, U> TensorRank1<D, I, U>

Source

pub fn with_unit<V>(self) -> TensorRank1<D, I, V>

Asserts that the tensor carries the given unit.

Source

pub fn normalized(self) -> TensorRank1<D, I, Dimensionless>

Returns the direction the tensor points in.

Source§

impl<const D: usize, I, U> TensorRank1<D, I, U>

Source

pub const fn const_from(array: [TensorRank0; D]) -> Self

Associated function for const type conversion.

Source§

impl<const D: usize, I, U> TensorRank1<D, I, U>

Source

pub const fn as_ptr(&self) -> *const TensorRank0

Returns a raw pointer to the slice’s buffer.

Source

pub fn orthonormal_basis(&self) -> TensorRank1List<D, I, D, Dimensionless>

Returns an orthonormal basis whose first vector is this one’s direction.

Trait Implementations§

Source§

impl<const D: usize, I, U> Add<&TensorRank1<D, I, U>> for TensorRank1<D, I, U>

Source§

type Output = TensorRank1<D, I, U>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<const D: usize, I, U> Add<TensorRank1<D, I, U>> for &TensorRank1<D, I, U>

Source§

type Output = TensorRank1<D, I, U>

The resulting type after applying the + operator.
Source§

fn add(self, tensor_rank_1: TensorRank1<D, I, U>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const D: usize, I, U> Add for &TensorRank1<D, I, U>

Source§

type Output = TensorRank1<D, I, U>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<const D: usize, I, U> Add for TensorRank1<D, I, U>

Source§

type Output = TensorRank1<D, I, U>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<const D: usize, I, U> AddAssign<&TensorRank1<D, I, U>> for TensorRank1<D, I, U>

Source§

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

Performs the += operation. Read more
Source§

impl<const D: usize, I, U> AddAssign for TensorRank1<D, I, U>

Source§

fn add_assign(&mut self, tensor_rank_1: Self)

Performs the += operation. Read more
Source§

impl<const D: usize, I> AssertEq for TensorRank1<D, I>

Source§

fn eq(a: Self, b: TensorRank1<D, I>) -> Result<(), AssertionError>

Source§

fn eq_within_tols( tols: &Assert, a: Self, b: TensorRank1<D, I>, ) -> Result<(), AssertionError>

Source§

impl<const D: usize, I> AssertFd for TensorRank1<D, I>

Source§

fn eq_within_fd_tol( tols: &Assert, a: Self, b: TensorRank1<D, I>, ) -> Result<(), AssertionError>

Source§

impl<const D: usize, I, U> Clone for TensorRank1<D, I, U>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<const D: usize, I, J, K, L, U, V, W> ContractSecondFourthWithFirst<&TensorRank1<D, J, V>, &TensorRank1<D, L, W>> for TensorRank4<D, I, J, K, L, U>
where U: UnitMul<V>, <U as UnitMul<V>>::Output: UnitMul<W>,

Source§

type Output = TensorRank2<D, I, K, <<U as UnitMul<V>>::Output as UnitMul<W>>::Output>

Source§

fn contract_second_fourth_with_first( &self, tensor_rank_1_a: &TensorRank1<D, J, V>, tensor_rank_1_b: &TensorRank1<D, L, W>, ) -> Self::Output

Source§

impl<const D: usize, I, U, V> ContractWith<TensorRank1<D, I, V>> for TensorRank1<D, I, U>
where U: UnitMul<V>,

Source§

type Output = Quantity<<U as UnitMul<V>>::Output>

The quantity the contraction gives.
Source§

fn contract_with(&self, tensor_rank_1: &TensorRank1<D, I, V>) -> Self::Output

Returns the full contraction with the other tensor.
Source§

impl<'a, I, U, V> CrossProduct<&'a TensorRank1<3, I, V>> for &TensorRank1<3, I, U>
where U: UnitMul<V>,

Source§

type Output = TensorRank1<3, I, <U as UnitMul<V>>::Output>

The specific return type.
Source§

fn cross(self, other: &'a TensorRank1<3, I, V>) -> Self::Output

Returns the cross product with another rank-1 tensor.
Source§

impl<I, U, V> CrossProduct<TensorRank1<3, I, V>> for &TensorRank1<3, I, U>
where U: UnitMul<V>,

Source§

type Output = TensorRank1<3, I, <U as UnitMul<V>>::Output>

The specific return type.
Source§

fn cross(self, other: TensorRank1<3, I, V>) -> Self::Output

Returns the cross product with another rank-1 tensor.
Source§

impl<const D: usize, I, U> Debug for TensorRank1<D, I, U>

Source§

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

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

impl<const D: usize, I, U> Default for TensorRank1<D, I, U>

Source§

fn default() -> Self

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

impl<const D: usize, I, U, T> Differentiate<T> for TensorRank1<D, I, U>
where U: UnitDiv<T>,

Source§

type Derivative = TensorRank1<D, I, <U as UnitDiv<T>>::Output>

The derivative with respect to the variable of integration.
Source§

impl<const D: usize, I, U> Display for TensorRank1<D, I, U>

Source§

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

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

impl<const D: usize, I, U> Div<&f64> for &TensorRank1<D, I, U>

Source§

type Output = TensorRank1<D, I, U>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl<const D: usize, I, U> Div<&f64> for TensorRank1<D, I, U>

Source§

type Output = TensorRank1<D, I, U>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl<const D: usize, I, U, V> Div<Quantity<V>> for &TensorRank1<D, I, U>
where U: UnitDiv<V>,

Source§

type Output = TensorRank1<D, I, <U as UnitDiv<V>>::Output>

The resulting type after applying the / operator.
Source§

fn div(self, quantity: Quantity<V>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const D: usize, I, U, V> Div<Quantity<V>> for TensorRank1<D, I, U>
where U: UnitDiv<V>,

Source§

type Output = TensorRank1<D, I, <U as UnitDiv<V>>::Output>

The resulting type after applying the / operator.
Source§

fn div(self, quantity: Quantity<V>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const D: usize, I, J, U, V> Div<TensorRank2<D, I, J, V>> for &TensorRank1<D, I, U>
where U: UnitDiv<V>,

Source§

type Output = TensorRank1<D, J, <U as UnitDiv<V>>::Output>

The resulting type after applying the / operator.
Source§

fn div(self, tensor_rank_2: TensorRank2<D, I, J, V>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const D: usize, I, U> Div<f64> for &TensorRank1<D, I, U>

Source§

type Output = TensorRank1<D, I, U>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl<const D: usize, I, U> Div<f64> for TensorRank1<D, I, U>

Source§

type Output = TensorRank1<D, I, U>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl<const D: usize, I, U> DivAssign<&f64> for TensorRank1<D, I, U>

Source§

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

Performs the /= operation. Read more
Source§

impl<const D: usize, I, U> DivAssign<f64> for TensorRank1<D, I, U>

Source§

fn div_assign(&mut self, tensor_rank_0: TensorRank0)

Performs the /= operation. Read more
Source§

impl<const D: usize, I, U> Erase for TensorRank1<D, I, U>

Source§

type Erased = TensorRank1<D, Reference>

The tensor with its configurations and unit discarded.
Source§

fn erase(&self) -> &Self::Erased

Views the tensor with its configurations and unit discarded.
Source§

impl<const D: usize, I, U> FiniteDifference for TensorRank1<D, I, U>

Source§

fn error_fd( &self, comparator: &Self, epsilon: TensorRank0, ) -> Option<(bool, usize)>

Source§

impl<const D: usize, U> From<&TensorRank1<D, Current, U>> for TensorRank1<D, Reference, U>

Source§

fn from(tensor_rank_1: &TensorRank1<D, Current, U>) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize, U> From<&TensorRank1<D, Projection, U>> for TensorRank1<D, Reference, U>

Source§

fn from(tensor_rank_1: &TensorRank1<D, Projection, U>) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize, U> From<&TensorRank1<D, Reference, U>> for TensorRank1<D, Current, U>

Source§

fn from(tensor_rank_1: &TensorRank1<D, Reference, U>) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize, I, U> From<[Quantity<U>; D]> for TensorRank1<D, I, U>

Source§

fn from(array: [Quantity<U>; D]) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize, I, U> From<[f64; D]> for TensorRank1<D, I, U>

Source§

fn from(array: [TensorRank0; D]) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize, U> From<TensorRank1<D, Current, U>> for TensorRank1<D, Reference, U>

Source§

fn from(tensor_rank_1: TensorRank1<D, Current, U>) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize, I, U> From<TensorRank1<D, I, U>> for [TensorRank0; D]

Source§

fn from(tensor_rank_1: TensorRank1<D, I, U>) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize, I, U> From<TensorRank1<D, I, U>> for Vec<TensorRank0>

Source§

fn from(tensor_rank_1: TensorRank1<D, I, U>) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize, U> From<TensorRank1<D, Projection, U>> for TensorRank1<D, Reference, U>

Source§

fn from(tensor_rank_1: TensorRank1<D, Projection, U>) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize, U> From<TensorRank1<D, Reference, U>> for TensorRank1<D, Current, U>

Source§

fn from(tensor_rank_1: TensorRank1<D, Reference, U>) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize, I, U> From<Vec<f64>> for TensorRank1<D, I, U>

Source§

fn from(vec: Vec<TensorRank0>) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize, I, U> From<Vector> for TensorRank1<D, I, U>

Source§

fn from(_vector: Vector) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize, I, U> FromIterator<Quantity<U>> for TensorRank1<D, I, U>

Source§

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

Creates a value from an iterator. Read more
Source§

impl<const D: usize, I, J, U> FromIterator<TensorRank1<D, J, U>> for TensorRank2<D, I, J, U>

Source§

fn from_iter<Ii: IntoIterator<Item = TensorRank1<D, J, U>>>( into_iterator: Ii, ) -> Self

Creates a value from an iterator. Read more
Source§

impl<const D: usize, I, U> FromIterator<f64> for TensorRank1<D, I, U>

Source§

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

Creates a value from an iterator. Read more
Source§

impl<const D: usize, I, U> Index<usize> for TensorRank1<D, I, U>

Source§

type Output = Quantity<U>

The returned type after indexing.
Source§

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

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

impl<const D: usize, I, U> IndexMut<usize> for TensorRank1<D, I, U>

Source§

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

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

impl<const D: usize, I, U> IntoIterator for TensorRank1<D, I, U>

Source§

type Item = Quantity<U>

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<<TensorRank1<D, I, U> as IntoIterator>::Item, D>

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, I, U> Jacobian for TensorRank1<D, I, U>

Source§

fn fill_into(&self, _vector: &mut Vector)

Fills the Jacobian into a vector.
Source§

fn fill_into_chained(self, _other: Vector, _vector: &mut Vector)

Fills the Jacobian chained with a vector into another vector.
Source§

fn retain_from(self, _retained: &[bool]) -> Vector

Return only the retained indices.
Source§

fn zero_out(&mut self, _indices: &[usize])

Zero out the specified indices.
Source§

impl<const D: usize, I, U, V> Mul<&Quantity<V>> for &TensorRank1<D, I, U>
where U: UnitMul<V>,

Source§

type Output = TensorRank1<D, I, <U as UnitMul<V>>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, quantity: &Quantity<V>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, I, U, V> Mul<&Quantity<V>> for TensorRank1<D, I, U>
where U: UnitMul<V>,

Source§

type Output = TensorRank1<D, I, <U as UnitMul<V>>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, quantity: &Quantity<V>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, I, U> Mul<&TensorRank1<D, I, U>> for &Matrix

Source§

type Output = Vector

The resulting type after applying the * operator.
Source§

fn mul(self, _tensor_rank_1: &TensorRank1<D, I, U>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, I, U, V> Mul<&TensorRank1<D, I, V>> for &TensorRank1<D, I, U>
where U: UnitMul<V>,

Source§

type Output = Quantity<<U as UnitMul<V>>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_1: &TensorRank1<D, I, V>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, I, U, V> Mul<&TensorRank1<D, I, V>> for TensorRank1<D, I, U>
where U: UnitMul<V>,

Source§

type Output = Quantity<<U as UnitMul<V>>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_1: &TensorRank1<D, I, V>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, I, J, U, V> Mul<&TensorRank1<D, J, V>> for &TensorRank2<D, I, J, U>
where U: UnitMul<V>,

Source§

type Output = TensorRank1<D, I, <U as UnitMul<V>>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_1: &TensorRank1<D, J, V>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, I, J, U, V> Mul<&TensorRank1<D, J, V>> for TensorRank2<D, I, J, U>
where U: UnitMul<V>,

Source§

type Output = TensorRank1<D, I, <U as UnitMul<V>>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_1: &TensorRank1<D, J, V>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, J, K, L, M, U, V> Mul<&TensorRank4<D, M, J, K, L, V>> for &TensorRank1<D, M, U>
where U: UnitMul<V>,

Source§

type Output = TensorRank3<D, J, K, L, <U as UnitMul<V>>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_4: &TensorRank4<D, M, J, K, L, V>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, J, K, L, M, U, V> Mul<&TensorRank4<D, M, J, K, L, V>> for TensorRank1<D, M, U>
where U: UnitMul<V>,

Source§

type Output = TensorRank3<D, J, K, L, <U as UnitMul<V>>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_4: &TensorRank4<D, M, J, K, L, V>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, I, U> Mul<&f64> for &TensorRank1<D, I, U>

Source§

type Output = TensorRank1<D, I, U>

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, I, U> Mul<&f64> for TensorRank1<D, I, U>

Source§

type Output = TensorRank1<D, I, U>

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, I, U, V> Mul<Quantity<V>> for &TensorRank1<D, I, U>
where U: UnitMul<V>,

Source§

type Output = TensorRank1<D, I, <U as UnitMul<V>>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, quantity: Quantity<V>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, I, U, V> Mul<Quantity<V>> for TensorRank1<D, I, U>
where U: UnitMul<V>,

Source§

type Output = TensorRank1<D, I, <U as UnitMul<V>>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, quantity: Quantity<V>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, I, U, V> Mul<TensorRank1<D, I, V>> for &TensorRank1<D, I, U>
where U: UnitMul<V>,

Source§

type Output = Quantity<<U as UnitMul<V>>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_1: TensorRank1<D, I, V>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, I, J, U, V> Mul<TensorRank1<D, J, V>> for &TensorRank2<D, I, J, U>
where U: UnitMul<V>,

Source§

type Output = TensorRank1<D, I, <U as UnitMul<V>>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_1: TensorRank1<D, J, V>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, I, J, U, V> Mul<TensorRank1<D, J, V>> for TensorRank2<D, I, J, U>
where U: UnitMul<V>,

Source§

type Output = TensorRank1<D, I, <U as UnitMul<V>>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_1: TensorRank1<D, J, V>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, J, K, L, M, U, V> Mul<TensorRank4<D, M, J, K, L, V>> for &TensorRank1<D, M, U>
where U: UnitMul<V>,

Source§

type Output = TensorRank3<D, J, K, L, <U as UnitMul<V>>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_4: TensorRank4<D, M, J, K, L, V>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, J, K, L, M, U, V> Mul<TensorRank4<D, M, J, K, L, V>> for TensorRank1<D, M, U>
where U: UnitMul<V>,

Source§

type Output = TensorRank3<D, J, K, L, <U as UnitMul<V>>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_4: TensorRank4<D, M, J, K, L, V>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, I, U> Mul<f64> for &TensorRank1<D, I, U>

Source§

type Output = TensorRank1<D, I, U>

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, I, U> Mul<f64> for TensorRank1<D, I, U>

Source§

type Output = TensorRank1<D, I, U>

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, I, U> Mul for TensorRank1<D, I, U>

Source§

type Output = f64

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_1: Self) -> Self::Output

Performs the * operation. Read more
Source§

impl<const D: usize, I, U> MulAssign<&f64> for TensorRank1<D, I, U>

Source§

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

Performs the *= operation. Read more
Source§

impl<const D: usize, I, U> MulAssign<f64> for TensorRank1<D, I, U>

Source§

fn mul_assign(&mut self, tensor_rank_0: TensorRank0)

Performs the *= operation. Read more
Source§

impl<const D: usize, I, U> Neg for &TensorRank1<D, I, U>

Source§

type Output = TensorRank1<D, I, U>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<const D: usize, I, U> Neg for TensorRank1<D, I, U>

Source§

type Output = TensorRank1<D, I, U>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<const D: usize, I, U> PartialEq for TensorRank1<D, I, U>

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<const D: usize, I, U> Solution for TensorRank1<D, I, U>

Source§

fn decrement_from(&mut self, _other: &Vector)

Decrements the solution from another vector.
Source§

fn decrement_from_chained(&mut self, _other: &mut Vector, _vector: &Vector)

Decrements the solution chained with a vector from another vector.
Source§

fn decrement_from_retained(&mut self, _retained: &[bool], _other: &Vector)

Decrements the solution from another vector on retained entries.
Source§

impl<const D: usize, I, U> Sub<&TensorRank1<D, I, U>> for TensorRank1<D, I, U>

Source§

type Output = TensorRank1<D, I, U>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<const D: usize, I, U> Sub<&Vector> for TensorRank1<D, I, U>

Source§

type Output = TensorRank1<D, I, U>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<const D: usize, I, U> Sub<TensorRank1<D, I, U>> for &TensorRank1<D, I, U>

Source§

type Output = TensorRank1<D, I, U>

The resulting type after applying the - operator.
Source§

fn sub(self, tensor_rank_1: TensorRank1<D, I, U>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const D: usize, I, U> Sub<Vector> for TensorRank1<D, I, U>

Source§

type Output = TensorRank1<D, I, U>

The resulting type after applying the - operator.
Source§

fn sub(self, _vector: Vector) -> Self::Output

Performs the - operation. Read more
Source§

impl<const D: usize, I, U> Sub for &TensorRank1<D, I, U>

Source§

type Output = TensorRank1<D, I, U>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<const D: usize, I, U> Sub for TensorRank1<D, I, U>

Source§

type Output = TensorRank1<D, I, U>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<const D: usize, I, U> SubAssign<&TensorRank1<D, I, U>> for TensorRank1<D, I, U>

Source§

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

Performs the -= operation. Read more
Source§

impl<const D: usize, I, U> SubAssign for TensorRank1<D, I, U>

Source§

fn sub_assign(&mut self, tensor_rank_1: Self)

Performs the -= operation. Read more
Source§

impl<'a, const D: usize, I, U> Sum<&'a TensorRank1<D, I, U>> for TensorRank1<D, I, U>

Source§

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

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

impl<const D: usize, I, U> Sum for TensorRank1<D, I, U>

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<const D: usize, I, U> Tensor for TensorRank1<D, I, U>

Source§

type Item = Quantity<U>

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

type Unit = U

The physical unit the tensor carries.
Source§

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

Returns the full contraction with another 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_zero(&self, tol_abs: Scalar, tol_rel: Scalar) -> Option<usize>

Returns number of nonzero entries given absolute and relative tolerances.
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 is_zero(&self) -> bool

Checks whether the tensor is the zero tensor.
Source§

fn norm(&self) -> Quantity<Self::Unit>

Returns the tensor norm.
Source§

fn norm_inf(&self) -> Quantity<Self::Unit>

Returns the infinity norm.
Source§

fn norm_l1(&self) -> Quantity<Self::Unit>

Returns the L1 (Manhattan) norm.
Source§

fn norm_p_sum(&self, p: TensorRank0) -> TensorRank0

Returns the sum of p-th powers of absolute values (used internally by norm_p).
Source§

fn norm_p(&self, p: TensorRank0) -> Quantity<Self::Unit>

Returns the Minkowski (Lp) norm.
Source§

fn norm_squared(&self) -> Quantity<Square<Self::Unit>>
where Self::Unit: UnitMul<Self::Unit>,

Returns the tensor norm squared, which carries the square of its unit.
Source§

fn normalize(&mut self)

Normalizes the tensor in place.
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<const D: usize, I, U> TensorArray for TensorRank1<D, I, U>

Source§

type Array = [Quantity<U>; D]

The type of array corresponding to the tensor.
Source§

type Item = Quantity<U>

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 zero() -> Self

Returns the zero tensor.

Auto Trait Implementations§

§

impl<const D: usize, I, U> Freeze for TensorRank1<D, I, U>

§

impl<const D: usize, I, U> RefUnwindSafe for TensorRank1<D, I, U>

§

impl<const D: usize, I, U> Send for TensorRank1<D, I, U>
where I: Send, U: Send,

§

impl<const D: usize, I, U> Sync for TensorRank1<D, I, U>
where I: Sync, U: Sync,

§

impl<const D: usize, I, U> Unpin for TensorRank1<D, I, U>
where I: Unpin, U: Unpin,

§

impl<const D: usize, I, U> UnsafeUnpin for TensorRank1<D, I, U>

§

impl<const D: usize, I, U> UnwindSafe for TensorRank1<D, I, U>
where I: UnwindSafe, U: 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<'a, T> AssertEq<&'a T> for T
where T: Display + PartialEq + Tensor,

Source§

impl<'a, T> AssertFd<&'a T> for T

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<T> Is<T> for T