Skip to main content

TensorRank0

Type Alias TensorRank0 

Source
pub type TensorRank0 = f64;
Expand description

A tensor of rank 0 (a scalar).

Trait Implementations§

Source§

impl Add<Quantity> for TensorRank0

Source§

type Output = Quantity

The resulting type after applying the + operator.
Source§

fn add(self, quantity: Quantity<Dimensionless>) -> Self::Output

Performs the + operation. Read more
Source§

impl AssertEq for TensorRank0

Source§

impl AssertFd for TensorRank0

Source§

impl<U> Div<Quantity<U>> for TensorRank0
where U: UnitInv,

Source§

type Output = Quantity<<U as UnitInv>::Output>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Erase for TensorRank0

Source§

type Erased = f64

The tensor with its configurations and unit discarded.
Source§

fn erase(&self) -> &Self

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

impl FiniteDifference for TensorRank0

Source§

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

Source§

impl From<Vector> for TensorRank0

Source§

fn from(_vector: Vector) -> Self

Converts to this type from the input type.
Source§

impl Hessian for TensorRank0

Source§

fn quadratic_form(&self, vector: &Vector) -> TensorRank0

The quadratic form of the Hessian with a vector. Read more
Source§

fn entry(&self, _row: usize, _column: usize) -> TensorRank0

The entry at the given (row, column) position.
Source§

fn fill_into(self, _square_matrix: &mut SquareMatrix)

Fills the Hessian into a square matrix.
Source§

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

Return only the retained indices.
Source§

impl HessianBlock for TensorRank0

Source§

fn entry(&self, _row: usize, _column: usize) -> TensorRank0

The entry of the block at the given row and column within it.
Source§

fn height(&self) -> usize

The number of rows the block occupies.
Source§

fn width(&self) -> usize

The number of columns the block occupies.
Source§

fn fill_into_block<M>(&self, matrix: &mut M, row: usize, column: usize)
where M: IndexMut<usize, Output = Vector>,

Fills the block into a matrix at the given row and column offsets.
Source§

impl Jacobian for TensorRank0

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<V> Mul<&Quantity<V>> for TensorRank0

Source§

type Output = Quantity<V>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<V> Mul<&Quantity<V>> for &TensorRank0

Source§

type Output = Quantity<V>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<U> Mul<Quantity<U>> for TensorRank0

Source§

type Output = Quantity<U>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Quantity> for &TensorRank0

Scaling a bare scalar by a dimensionless quantity leaves it bare.

Source§

type Output = f64

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl PartialEq<Quantity> for TensorRank0

Source§

fn eq(&self, quantity: &Quantity<Dimensionless>) -> 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 PartialOrd<Quantity> for TensorRank0

Source§

fn partial_cmp(&self, quantity: &Quantity<Dimensionless>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Solution for TensorRank0

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 Sub<&Vector> for TensorRank0

Source§

type Output = f64

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<Quantity> for TensorRank0

Source§

type Output = Quantity

The resulting type after applying the - operator.
Source§

fn sub(self, quantity: Quantity<Dimensionless>) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<Vector> for TensorRank0

Source§

type Output = f64

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Tensor for TensorRank0

Source§

type Item = f64

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

type Unit = Dimensionless

The physical unit the tensor carries.
Source§

fn error_count_zero( &self, tol_abs: TensorRank0, tol_rel: TensorRank0, ) -> Option<usize>

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

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

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

fn full_contraction(&self, tensor_rank_0: &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 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 norm_inf(&self) -> Quantity<Dimensionless>

Returns the infinity norm.
Source§

fn norm_l1(&self) -> Quantity<Dimensionless>

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 size(&self) -> usize

Returns the total number of entries.
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§

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

Returns the tensor norm.
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§

impl TensorArray for TensorRank0

Source§

type Array = f64

The type of array corresponding to the tensor.
Source§

type Item = f64

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.