Skip to main content

TensorVector

Struct TensorVector 

Source
pub struct TensorVector<T>(/* private fields */);
Expand description

A resizable collection of tensors.

Implementations§

Source§

impl<U> TensorVector<QuantitySparseVec<U>>

Source

pub fn zero(len: usize) -> Self

Source§

impl<U> TensorVector<Quantity<U>>

Source

pub fn zero(len: usize) -> Self

Source§

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

Source

pub fn bounding_box(&self) -> TensorRank1List<D, I, 2, U>

Source

pub fn zero(len: usize) -> Self

Source§

impl<const D: usize, I, J, U> TensorVector<TensorRank2SparseVec<D, I, J, U>>

Source

pub fn zero(len: usize) -> Self

Source§

impl<const D: usize, I, J, U> TensorVector<TensorRank2<D, I, J, U>>

Source

pub fn zero(len: usize) -> Self

Source§

impl<const D: usize, I, J, U> TensorVector<TensorVector<TensorRank2<D, I, J, U>>>

Source

pub fn zero(len: usize) -> Self

Source§

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

Source

pub fn bounding_box(&self) -> TensorRank1List<D, I, 2, U>

Source

pub fn iter(&self) -> impl Iterator<Item = &&TensorRank1<D, I, U>>

Source

pub fn is_empty(&self) -> bool

Source

pub fn len(&self) -> usize

Source§

impl<T> TensorVector<T>
where T: Tensor,

Source

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

Returns a raw pointer to the vector’s buffer, or a dangling raw pointer valid for zero sized reads if the vector didn’t allocate.

Source

pub fn as_mut_slice(&mut self) -> &mut [T]

Source

pub fn as_slice(&self) -> &[T]

Trait Implementations§

Source§

impl<T> Add for TensorVector<T>
where T: Tensor,

Source§

type Output = TensorVector<T>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<T> Add<&TensorVector<T>> for TensorVector<T>
where T: Tensor,

Source§

type Output = TensorVector<T>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<T> AddAssign for TensorVector<T>
where T: Tensor,

Source§

fn add_assign(&mut self, tensor_vec: Self)

Performs the += operation. Read more
Source§

impl<T> AddAssign<&TensorVector<T>> for TensorVector<T>
where T: Tensor,

Source§

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

Performs the += operation. Read more
Source§

impl<T> AssertEq for TensorVector<T>
where T: Display + PartialEq + Tensor,

Source§

impl<T: Clone> Clone for TensorVector<T>

Source§

fn clone(&self) -> TensorVector<T>

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<T, V> ContractWith<TensorVector<V>> for TensorVector<T>
where T: ContractWith<V> + Tensor, V: Tensor, <T as ContractWith<V>>::Output: Sum,

Source§

type Output = <T as ContractWith<V>>::Output

The quantity the contraction gives.
Source§

fn contract_with(&self, tensor_vector: &TensorVector<V>) -> Self::Output

Returns the full contraction with the other tensor.
Source§

impl<T: Debug> Debug for TensorVector<T>

Source§

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

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

impl<T> Default for TensorVector<T>
where T: Tensor,

Source§

fn default() -> Self

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

impl<E, T> Differentiable<T> for TensorVector<E>

Source§

type Derivative = TensorVector<<E as Differentiable<T>>::Derivative>

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

impl<T> Display for TensorVector<T>
where T: Tensor,

Source§

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

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

impl<T> Div<&f64> for TensorVector<T>
where T: Tensor,

Source§

type Output = TensorVector<T>

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, V> Div<Quantity<V>> for TensorVector<T>
where T: Div<Quantity<V>> + Tensor, <T as Div<Quantity<V>>>::Output: Tensor,

Source§

type Output = TensorVector<<T as Div<Quantity<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<T, V> Div<Quantity<V>> for &TensorVector<T>
where T: Clone + Div<Quantity<V>> + Tensor, <T as Div<Quantity<V>>>::Output: Tensor,

Source§

type Output = TensorVector<<T as Div<Quantity<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<U, V> Div<TensorVector<QuantitySparseVec<V>>> for &QuantityVector<U>
where U: UnitDiv<V>,

Source§

type Output = TensorVector<Quantity<<U as UnitDiv<V>>::Output>>

The resulting type after applying the / operator.
Source§

fn div(self, _quantity_sparse_vec_2d: QuantitySparseVec2D<V>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const D: usize, I, J, U, V> Div<TensorVector<TensorRank2SparseVec<D, I, J, V>>> for &TensorRank1Vec<D, I, U>
where U: UnitDiv<V>,

Source§

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

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl<const D: usize, I, J, U> Div<TensorVector<TensorVector<TensorRank2<D, I, J, U>>>> for &TensorRank1Vec<D, I, U>

Source§

type Output = TensorVector<TensorRank1<D, J, U>>

The resulting type after applying the / operator.
Source§

fn div( self, _tensor_rank_2_vec_2d: TensorRank2Vec2D<D, I, J, U>, ) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<f64> for TensorVector<T>
where T: Tensor,

Source§

type Output = TensorVector<T>

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> DivAssign<&f64> for TensorVector<T>
where T: Tensor,

Source§

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

Performs the /= operation. Read more
Source§

impl<T> DivAssign<f64> for TensorVector<T>
where T: Tensor,

Source§

fn div_assign(&mut self, tensor_rank_0: TensorRank0)

Performs the /= operation. Read more
Source§

impl<C, Y> ElasticViscoplasticElements<TensorVector<TensorList<TensorTuple<TensorRank2<3, Intermediate, Reference>, Y>, 1>>, 3> for Block<C>

Source§

fn initial_state(&self) -> ViscoplasticStateVariables<1, Y>

Source§

fn nodal_forces_into( &self, nodal_coordinates: &NodalCoordinates<3>, state_variables: &ViscoplasticStateVariables<1, Y>, nodal_forces: &mut NodalForcesSolid<3>, ) -> Result<(), ElementModelError>

Source§

fn nodal_stiffnesses_into( &self, nodal_coordinates: &NodalCoordinates<3>, state_variables: &ViscoplasticStateVariables<1, Y>, nodal_stiffnesses: &mut NodalStiffnessesSolid<3>, ) -> Result<(), ElementModelError>

Source§

fn state_variables_evolution( &self, nodal_coordinates: &NodalCoordinates<3>, state_variables: &ViscoplasticStateVariables<1, Y>, ) -> Result<ViscoplasticEvolution<1, Y>, ElementModelError>

Source§

fn nodal_forces( &self, nodal_coordinates: &NodalCoordinates<D>, state_variables: &S, ) -> Result<NodalForcesSolid<D>, ElementModelError>

Source§

fn nodal_stiffnesses( &self, nodal_coordinates: &NodalCoordinates<D>, state_variables: &S, ) -> Result<NodalStiffnessesSolid<D>, ElementModelError>

Source§

impl<C, F, Y> ElasticViscoplasticElements<TensorVector<TensorList<TensorTuple<TensorRank2<3, Intermediate, Reference>, Y>, 1>>, 3> for Block<C, F>

Source§

fn initial_state(&self) -> ViscoplasticStateVariables<1, Y>

Source§

fn nodal_forces_into( &self, nodal_coordinates: &NodalCoordinates, state_variables: &ViscoplasticStateVariables<1, Y>, nodal_forces: &mut NodalForcesSolid, ) -> Result<(), ElementModelError>

Source§

fn nodal_stiffnesses_into( &self, nodal_coordinates: &NodalCoordinates, state_variables: &ViscoplasticStateVariables<1, Y>, nodal_stiffnesses: &mut NodalStiffnessesSolid, ) -> Result<(), ElementModelError>

Source§

fn state_variables_evolution( &self, nodal_coordinates: &NodalCoordinates, state_variables: &ViscoplasticStateVariables<1, Y>, ) -> Result<ViscoplasticEvolution<1, Y>, ElementModelError>

Source§

fn nodal_forces( &self, nodal_coordinates: &NodalCoordinates<D>, state_variables: &S, ) -> Result<NodalForcesSolid<D>, ElementModelError>

Source§

fn nodal_stiffnesses( &self, nodal_coordinates: &NodalCoordinates<D>, state_variables: &S, ) -> Result<NodalStiffnessesSolid<D>, ElementModelError>

Source§

impl<C, F, const G: usize, const M: usize, const N: usize, const P: usize, Y> ElasticViscoplasticElements<TensorVector<TensorList<TensorTuple<TensorRank2<3, Intermediate, Reference>, Y>, G>>, 3> for Block<C, F, G, M, N, P>

Source§

fn initial_state(&self) -> ViscoplasticStateVariables<G, Y>

Source§

fn nodal_forces_into( &self, nodal_coordinates: &NodalCoordinates<3>, state_variables: &ViscoplasticStateVariables<G, Y>, nodal_forces: &mut NodalForcesSolid<3>, ) -> Result<(), ElementModelError>

Source§

fn nodal_stiffnesses_into( &self, nodal_coordinates: &NodalCoordinates<3>, state_variables: &ViscoplasticStateVariables<G, Y>, nodal_stiffnesses: &mut NodalStiffnessesSolid<3>, ) -> Result<(), ElementModelError>

Source§

fn state_variables_evolution( &self, nodal_coordinates: &NodalCoordinates<3>, state_variables: &ViscoplasticStateVariables<G, Y>, ) -> Result<ViscoplasticEvolution<G, Y>, ElementModelError>

Source§

fn nodal_forces( &self, nodal_coordinates: &NodalCoordinates<D>, state_variables: &S, ) -> Result<NodalForcesSolid<D>, ElementModelError>

Source§

fn nodal_stiffnesses( &self, nodal_coordinates: &NodalCoordinates<D>, state_variables: &S, ) -> Result<NodalStiffnessesSolid<D>, ElementModelError>

Source§

impl<T> Erase for TensorVector<T>
where T: Erase + Tensor,

Source§

type Erased = TensorVector<<T as Erase>::Erased>

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<T> Extend<T> for TensorVector<T>
where T: Tensor,

Source§

fn extend<I>(&mut self, iter: I)
where I: IntoIterator<Item = T>,

Extends a collection with the contents of an iterator. Read more
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl<B, const D: usize> FirstOrderMinimize<Quantity<Energy>, TensorVector<TensorRank1<D, Current, Force>>, TensorVector<TensorRank1<D, Current, Length>>> for Model<B, D>

Source§

impl<B, const D: usize> FirstOrderMinimize<Quantity<PowerTemperature>, TensorVector<Quantity<Power>>, TensorVector<Quantity<Temperature>>> for Model<B, D>

Source§

impl<B, const D: usize> FirstOrderRoot<TensorVector<Quantity<Power>>, TensorVector<QuantitySparseVec<PowerPerTemperature>>, TensorVector<Quantity<Temperature>>> for Model<B, D>

Source§

impl<B, const D: usize> FirstOrderRoot<TensorVector<TensorRank1<D, Current, Force>>, TensorVector<TensorRank2SparseVec<D, Current, Current, ForcePerLength>>, TensorVector<TensorRank1<D, Current, Length>>> for Model<B, D>
where B: ElasticElements<D>,

Source§

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

Source§

fn from(tensor_rank_1_vec: &TensorRank1Vec<D, Current, U>) -> Self

Converts to this type from the input type.
Source§

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

Source§

fn from(tensor_rank_1_vec: &TensorRank1Vec<D, I, U>) -> Self

Converts to this type from the input type.
Source§

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

Source§

fn from(tensor_rank_1_vec: &TensorRank1Vec<D, Reference, U>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<&[T]> for TensorVector<T>
where T: Tensor,

Source§

fn from(slice: &[T]) -> Self

Converts to this type from the input type.
Source§

impl<'a, const D: usize> From<TensorVector<&'a TensorRank1<D, Reference, Length>>> for BoundingBox<D>

Source§

fn from(coordinates: CoordinatesRef<'a, D>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<TensorVector<T>> for Vec<T>
where T: Tensor,

Source§

fn from(tensor_vector: TensorVector<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<TensorVector<T>> for VecDeque<T>
where T: Tensor,

Source§

fn from(tensor_vector: TensorVector<T>) -> Self

Converts to this type from the input type.
Source§

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

Source§

fn from(tensor_rank_1_vec: TensorRank1Vec<D, Current, U>) -> Self

Converts to this type from the input type.
Source§

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

Source§

fn from(tensor_rank_1_vec: TensorRank1Vec<D, I, U>) -> Self

Converts to this type from the input type.
Source§

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

Source§

fn from(tensor_rank_1_vec: TensorRank1Vec<D, I, U>) -> Self

Converts to this type from the input type.
Source§

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

Source§

fn from(tensor_rank_1_vec: TensorRank1Vec<D, I, U>) -> Self

Converts to this type from the input type.
Source§

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

Source§

fn from(tensor_rank_1_vec: TensorRank1Vec<D, I>) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize> From<TensorVector<TensorRank1<D, Reference, Length>>> for BoundingBox<D>

Source§

fn from(coordinates: Coordinates<D>) -> Self

Converts to this type from the input type.
Source§

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

Source§

fn from(tensor_rank_1_vec: TensorRank1Vec<D, Reference, U>) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize, I, J, U> From<TensorVector<TensorVector<TensorRank2<D, I, J, U>>>> for Vec<TensorRank0>

Source§

fn from(tensor_rank_2_vec_2d: TensorRank2Vec2D<D, I, J, U>) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize, I, J> From<TensorVector<TensorVector<TensorRank2<D, I, J>>>> for SquareMatrix

Source§

fn from(tensor_rank_2_vec_2d: TensorRank2Vec2D<D, I, J>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<Vec<T>> for TensorVector<T>
where T: Tensor,

Source§

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

Converts to this type from the input type.
Source§

impl<T> From<VecDeque<T>> for TensorVector<T>
where T: Tensor,

Source§

fn from(vec_deque: VecDeque<T>) -> Self

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

impl<T> FromIterator<T> for TensorVector<T>

Source§

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

Creates a value from an iterator. Read more
Source§

impl<C, Y> HyperelasticViscoplasticElements<TensorVector<TensorList<TensorTuple<TensorRank2<3, Intermediate, Reference>, Y>, 1>>, 3> for Block<C>

Source§

fn helmholtz_free_energy( &self, nodal_coordinates: &NodalCoordinates<3>, state_variables: &ViscoplasticStateVariables<1, Y>, ) -> Result<Quantity<Energy>, ElementModelError>

Source§

impl<C, F, Y> HyperelasticViscoplasticElements<TensorVector<TensorList<TensorTuple<TensorRank2<3, Intermediate, Reference>, Y>, 1>>, 3> for Block<C, F>

Source§

impl<C, F, const G: usize, const M: usize, const N: usize, const P: usize, Y> HyperelasticViscoplasticElements<TensorVector<TensorList<TensorTuple<TensorRank2<3, Intermediate, Reference>, Y>, G>>, 3> for Block<C, F, G, M, N, P>

Source§

fn helmholtz_free_energy( &self, nodal_coordinates: &NodalCoordinates<3>, state_variables: &ViscoplasticStateVariables<G, Y>, ) -> Result<Quantity<Energy>, ElementModelError>

Source§

impl<T> Index<usize> for TensorVector<T>
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> IndexMut<usize> for TensorVector<T>
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> IntoIterator for TensorVector<T>
where T: Tensor,

Source§

type Item = T

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<<TensorVector<T> as IntoIterator>::Item>

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<'a, T> IntoIterator for &'a TensorVector<T>
where T: Tensor,

Source§

type Item = &'a T

The type of the elements being iterated over.
Source§

type IntoIter = Iter<'a, T>

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<U> Mul<&TensorVector<Quantity<U>>> for &Vector

Source§

type Output = f64

The resulting type after applying the * operator.
Source§

fn mul(self, quantity_vector: &QuantityVector<U>) -> Self::Output

Performs the * operation. Read more
Source§

impl<U> Mul<&TensorVector<Quantity<U>>> for &Matrix

Source§

type Output = Vector

The resulting type after applying the * operator.
Source§

fn mul(self, quantity_vector: &QuantityVector<U>) -> Self::Output

Performs the * operation. Read more
Source§

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

Source§

type Output = f64

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

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

Source§

type Output = Vector

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<const D: usize, I> Mul<&TensorVector<TensorRank1<D, I>>> for &CscMatrix

Source§

type Output = Vector

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_1_vec: &TensorRank1Vec<D, I>) -> Self::Output

Performs the * operation. Read more
Source§

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

Source§

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

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

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

Source§

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

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<T> Mul<&f64> for TensorVector<T>
where T: Tensor,

Source§

type Output = TensorVector<T>

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, V> Mul<Quantity<V>> for TensorVector<T>
where T: Mul<Quantity<V>> + Tensor, <T as Mul<Quantity<V>>>::Output: Tensor,

Source§

type Output = TensorVector<<T as Mul<Quantity<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<T, V> Mul<Quantity<V>> for &TensorVector<T>
where T: Mul<Quantity<V>> + Tensor, <T as Mul<Quantity<V>>>::Output: Tensor,

Source§

type Output = TensorVector<<T as Mul<Quantity<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, J, U, V> Mul<TensorVector<TensorRank1<D, J, V>>> for TensorRank2<D, I, J, U>
where U: UnitMul<V>,

Source§

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

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_1_vec: TensorRank1Vec<D, J, V>) -> Self::Output

Performs the * operation. Read more
Source§

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

Source§

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

The resulting type after applying the * operator.
Source§

fn mul(self, tensor_rank_1_vec: TensorRank1Vec<D, J, V>) -> Self::Output

Performs the * operation. Read more
Source§

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

Source§

type Output = TensorVector<TensorRank2SparseVec<D, I, K, <U as UnitMul<V>>::Output>>

The resulting type after applying the * operator.
Source§

fn mul( self, tensor_rank_2_sparse_vec_2d: TensorRank2SparseVec2D<D, J, K, V>, ) -> Self::Output

Performs the * operation. Read more
Source§

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

Source§

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

The resulting type after applying the * operator.
Source§

fn mul( self, tensor_rank_2_list_2d: TensorRank2Vec2D<D, J, K, V>, ) -> Self::Output

Performs the * operation. Read more
Source§

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

Source§

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

The resulting type after applying the * operator.
Source§

fn mul( self, tensor_rank_2_list_2d: TensorRank2Vec2D<D, J, K, V>, ) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<f64> for TensorVector<T>
where T: Tensor,

Source§

type Output = TensorVector<T>

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> Mul<f64> for &TensorVector<T>
where T: Tensor, for<'a> &'a T: Mul<&'a TensorRank0, Output = T>,

Source§

type Output = TensorVector<T>

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> MulAssign<&f64> for TensorVector<T>
where T: Tensor,

Source§

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

Performs the *= operation. Read more
Source§

impl<T> MulAssign<f64> for TensorVector<T>
where T: Tensor,

Source§

fn mul_assign(&mut self, tensor_rank_0: TensorRank0)

Performs the *= operation. Read more
Source§

impl<T: PartialEq> PartialEq for TensorVector<T>

Source§

fn eq(&self, other: &TensorVector<T>) -> 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<B, const D: usize> SecondOrderMinimize<Quantity<Energy>, TensorVector<TensorRank1<D, Current, Force>>, TensorRank2SparseVec2DSymmetric<D, Current, Current, ForcePerLength>, TensorVector<TensorRank1<D, Current, Length>>> for Model<B, D>

Source§

impl<B, const D: usize> SecondOrderMinimize<Quantity<PowerTemperature>, TensorVector<Quantity<Power>>, TensorVector<QuantitySparseVec<PowerPerTemperature>>, TensorVector<Quantity<Temperature>>> for Model<B, D>

Source§

impl<T: PartialEq> StructuralPartialEq for TensorVector<T>

Source§

impl<T> Sub for TensorVector<T>
where T: Tensor,

Source§

type Output = TensorVector<T>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<T> Sub for &TensorVector<T>
where T: Tensor,

Source§

type Output = TensorVector<T>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<T> Sub<&TensorVector<T>> for TensorVector<T>
where T: Tensor,

Source§

type Output = TensorVector<T>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<T> SubAssign for TensorVector<T>
where T: Tensor,

Source§

fn sub_assign(&mut self, tensor_vec: Self)

Performs the -= operation. Read more
Source§

impl<T> SubAssign<&TensorVector<T>> for TensorVector<T>
where T: Tensor,

Source§

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

Performs the -= operation. Read more
Source§

impl<T> Sum for TensorVector<T>
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> Tensor for TensorVector<T>
where T: Tensor,

Source§

type Item = T

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

type Unit = <T as Tensor>::Unit

The physical unit the tensor carries.
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 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) -> 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<T> TensorVec for TensorVector<T>
where T: Tensor,

Source§

type Item = T

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

fn append(&mut self, other: &mut Self)

Moves all the elements of other into self, leaving other empty.
Source§

fn capacity(&self) -> usize

Returns the total number of elements the vector can hold without reallocating.
Source§

fn is_empty(&self) -> bool

Returns true if the vector contains no elements.
Source§

fn new() -> Self

Constructs a new, empty Vec, not allocating until elements are pushed onto it.
Source§

fn push(&mut self, item: Self::Item)

Appends an element to the back of the Vec.
Source§

fn remove(&mut self, index: usize) -> Self::Item

Removes an element from the Vec and returns it, shifting elements to the left.
Source§

fn reserve(&mut self, additional: usize)

Reserves capacity for at least additional more elements to be inserted in the given Vec.
Source§

fn retain<F>(&mut self, f: F)
where F: FnMut(&Self::Item) -> bool,

Retains only the elements specified by the predicate.
Source§

fn swap_remove(&mut self, index: usize) -> Self::Item

Removes an element from the Vec and returns it, replacing it with the last element.
Source§

fn with_capacity(capacity: usize) -> Self

Constructs a new, empty vector with at least the specified capacity.
Source§

impl<B, const D: usize> ZerothOrderRoot<TensorVector<Quantity<Power>>, TensorVector<Quantity<Temperature>>> for Model<B, D>

Source§

impl<B, const D: usize> ZerothOrderRoot<TensorVector<TensorRank1<D, Current, Force>>, TensorVector<TensorRank1<D, Current, Length>>> for Model<B, D>
where B: ElasticElements<D>,

Auto Trait Implementations§

§

impl<T> Freeze for TensorVector<T>

§

impl<T> RefUnwindSafe for TensorVector<T>
where T: RefUnwindSafe,

§

impl<T> Send for TensorVector<T>
where T: Send,

§

impl<T> Sync for TensorVector<T>
where T: Sync,

§

impl<T> Unpin for TensorVector<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for TensorVector<T>

§

impl<T> UnwindSafe for TensorVector<T>
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<'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> Is<T> for T

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.