Struct Vector

Source
pub struct Vector(/* private fields */);
Expand description

A vector.

Implementations§

Source§

impl Vector

Source

pub fn ones(len: usize) -> Self

Trait Implementations§

Source§

impl Add<&Vector> for Vector

Source§

type Output = Vector

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add for Vector

Source§

type Output = Vector

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl AddAssign<&Vector> for Vector

Source§

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

Performs the += operation. Read more
Source§

impl AddAssign for Vector

Source§

fn add_assign(&mut self, vector: Self)

Performs the += operation. Read more
Source§

impl Clone for Vector

Source§

fn clone(&self) -> Vector

Returns a copy 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 Debug for Vector

Source§

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

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

impl Display for Vector

Source§

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

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

impl Div<&f64> for Vector

Source§

type Output = Vector

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<f64> for Vector

Source§

type Output = Vector

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl DivAssign<&f64> for Vector

Source§

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

Performs the /= operation. Read more
Source§

impl DivAssign<f64> for Vector

Source§

fn div_assign(&mut self, tensor_rank_0: TensorRank0)

Performs the /= operation. Read more
Source§

impl<const D: usize, const I: usize> From<&Vector> for TensorRank1Vec<D, I>

Source§

fn from(vector: &Vector) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize, const I: usize> From<TensorRank1Vec<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, const I: usize, const J: usize> From<TensorRank2<D, I, J>> for Vector

Source§

fn from(tensor_rank_2: TensorRank2<D, I, J>) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize, const I: usize, const J: usize, const K: usize, const L: usize> From<TensorRank4<D, I, J, K, L>> for Vector

Source§

fn from(tensor_rank_4: TensorRank4<D, I, J, K, L>) -> Self

Converts to this type from the input type.
Source§

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

Source§

fn from(vector: Vector) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for Vector

Source§

fn from(tensor_rank_0: TensorRank0) -> Self

Converts to this type from the input type.
Source§

impl FromIterator<Vector> for Matrix

Source§

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

Creates a value from an iterator. Read more
Source§

impl FromIterator<Vector> for SquareMatrix

Source§

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

Creates a value from an iterator. Read more
Source§

impl FromIterator<f64> for Vector

Source§

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

Creates a value from an iterator. Read more
Source§

impl Index<RangeFrom<usize>> for Vector

Source§

type Output = [f64]

The returned type after indexing.
Source§

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

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

impl Index<RangeTo<usize>> for Vector

Source§

type Output = [f64]

The returned type after indexing.
Source§

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

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

impl Index<usize> for Vector

Source§

type Output = f64

The returned type after indexing.
Source§

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

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

impl IndexMut<usize> for Vector

Source§

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

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

impl IntoIterator for Vector

Source§

type Item = f64

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<<Vector 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 Jacobian for Vector

Source§

fn fill_into(self, vector: &mut Vector)

Fills the Jacobian into a vector.
Source§

fn fill_into_chained(self, other: Self, vector: &mut Self)

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

impl Mul<&Matrix> for &Vector

Source§

type Output = Vector

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<const D: usize, const I: usize> Mul<&TensorRank1Vec<D, I>> for &Vector

Source§

type Output = f64

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, const I: usize, const J: usize> Mul<&TensorRank2<D, I, J>> for &Vector

Source§

type Output = f64

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Vector> for &Matrix

Source§

type Output = Vector

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Vector> for SquareMatrix

Source§

type Output = Vector

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Vector> for Vector

Source§

type Output = f64

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&f64> for &Vector

Source§

type Output = Vector

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&f64> for Vector

Source§

type Output = Vector

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Vector> for &Matrix

Source§

type Output = Vector

The resulting type after applying the * operator.
Source§

fn mul(self, vector: Vector) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Vector> for SquareMatrix

Source§

type Output = Vector

The resulting type after applying the * operator.
Source§

fn mul(self, vector: Vector) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<f64> for Vector

Source§

type Output = Vector

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul for &Vector

Source§

type Output = f64

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul for Vector

Source§

type Output = f64

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl MulAssign<&f64> for Vector

Source§

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

Performs the *= operation. Read more
Source§

impl MulAssign<f64> for Vector

Source§

fn mul_assign(&mut self, tensor_rank_0: TensorRank0)

Performs the *= operation. Read more
Source§

impl PartialEq for Vector

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 Solution for Vector

Source§

fn decrement_from_chained(&mut self, other: &mut Self, vector: Vector)

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

impl Sub<&Vector> for Vector

Source§

type Output = Vector

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<Vector> for &Vector

Source§

type Output = Vector

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, const I: usize> Sub<Vector> for TensorRank1Vec<D, I>

Source§

type Output = TensorRank1Vec<D, I>

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, const I: usize, const J: usize> Sub<Vector> for TensorRank2<D, I, J>

Source§

type Output = TensorRank2<D, I, J>

The resulting type after applying the - operator.
Source§

fn sub(self, vector: Vector) -> 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 Sub for Vector

Source§

type Output = Vector

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl SubAssign<&[f64]> for Vector

Source§

fn sub_assign(&mut self, slice: &[TensorRank0])

Performs the -= operation. Read more
Source§

impl SubAssign<&Vector> for Vector

Source§

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

Performs the -= operation. Read more
Source§

impl SubAssign for Vector

Source§

fn sub_assign(&mut self, vector: Self)

Performs the -= operation. Read more
Source§

impl Tensor for Vector

Source§

type Item = f64

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 full_contraction(&self, tensor: &Self) -> TensorRank0

Returns the full contraction with another tensor.
Source§

fn get_at(&self, _indices: &[usize]) -> &TensorRank0

Returns a reference to the entry at the specified indices.
Source§

fn get_at_mut(&mut self, _indices: &[usize]) -> &mut TensorRank0

Returns a mutable reference to the entry at the specified indices.
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_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 num_entries(&self) -> usize

Returns the total number of entries.
Source§

impl TensorVec for Vector

Source§

type Item = f64

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

type Slice<'a> = &'a [f64]

The type of slice corresponding to the tensor.
Source§

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

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

fn is_empty(&self) -> bool

Returns true if the vector contains no items.
Source§

fn len(&self) -> usize

Returns the number of items in the vector, also referred to as its ‘length’.
Source§

fn new(slice: Self::Slice<'_>) -> Self

Returns a tensor given a slice.
Source§

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

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

fn zero(len: usize) -> Self

Returns the zero tensor.
Source§

impl StructuralPartialEq for Vector

Auto Trait Implementations§

§

impl Freeze for Vector

§

impl RefUnwindSafe for Vector

§

impl Send for Vector

§

impl Sync for Vector

§

impl Unpin for Vector

§

impl UnwindSafe for Vector

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>,