Struct vectrs::Vector [−][src]
Represents a constant-size, n-dimensional vector.
See the crate root for usage examples.
Implementations
impl<T: Base, const N: usize> Vector<T, N> where
Self: X,
[src]
Self: X,
pub fn x(&self) -> T
[src]
Returns this component of the vector.
pub fn x_ref(&self) -> &Tⓘ
[src]
Returns a reference to this component of the vector.
pub fn x_mut(&mut self) -> &mut Tⓘ
[src]
Returns a mutable reference to this component of the vector.
impl<T: Base, const N: usize> Vector<T, N> where
Self: Y,
[src]
Self: Y,
pub fn y(&self) -> T
[src]
Returns this component of the vector.
pub fn y_ref(&self) -> &Tⓘ
[src]
Returns a reference to this component of the vector.
pub fn y_mut(&mut self) -> &mut Tⓘ
[src]
Returns a mutable reference to this component of the vector.
impl<T: Base, const N: usize> Vector<T, N> where
Self: Z,
[src]
Self: Z,
pub fn z(&self) -> T
[src]
Returns this component of the vector.
pub fn z_ref(&self) -> &Tⓘ
[src]
Returns a reference to this component of the vector.
pub fn z_mut(&mut self) -> &mut Tⓘ
[src]
Returns a mutable reference to this component of the vector.
impl<T: Base, const N: usize> Vector<T, N> where
Self: W,
[src]
Self: W,
pub fn w(&self) -> T
[src]
Returns this component of the vector.
pub fn w_ref(&self) -> &Tⓘ
[src]
Returns a reference to this component of the vector.
pub fn w_mut(&mut self) -> &mut Tⓘ
[src]
Returns a mutable reference to this component of the vector.
impl<T, const N: usize> Vector<T, N>
[src]
impl<T: Base, const N: usize> Vector<T, N>
[src]
pub fn zero() -> Self where
T: Zero,
[src]
T: Zero,
Returns a zero vector.
pub fn from_partial<U>(partial: U) -> Self where
Self: FromPartial<T, U>,
T: Zero,
[src]
Self: FromPartial<T, U>,
T: Zero,
Create a vector from various types, filling with zeroes as needed.
pub fn from_partial_with<U>(partial: U, fill: T) -> Self where
Self: FromPartial<T, U>,
[src]
Self: FromPartial<T, U>,
Create a vector from various types, filling with the given value as needed.
pub fn as_slice(&self) -> &[T]ⓘ
[src]
Views the underlying vector representation as a slice.
pub fn as_mut_slice(&mut self) -> &mut [T]ⓘ
[src]
Views the underlying vector representation as a mutable slice.
pub fn into_array(self) -> [T; N]
[src]
Consumes this vector and returns the underlying array.
pub fn map<F, U: Base>(self, mut f: F) -> Vector<U, N> where
F: FnMut(T) -> U,
[src]
F: FnMut(T) -> U,
Returns a vector of the same size as self, with function f
applied to
each element in order.
pub fn abs(self) -> Self where
T: Abs,
[src]
T: Abs,
Returns the absolute value of the vector.
pub fn reduced(self) -> Self where
T: PartialEq<T> + Div<Output = T> + Rem<Output = T> + Zero + Abs,
[src]
T: PartialEq<T> + Div<Output = T> + Rem<Output = T> + Zero + Abs,
Returns the reduced row echelon form of the vector.
This is the same as dividing each element by the greatest common divisor of all the elements.
pub fn dot(&self, other: &Self) -> T where
T: Mul<Output = T> + Sum<T>,
[src]
T: Mul<Output = T> + Sum<T>,
Calculates the dot-product between self
and other
.
pub fn l1_norm(&self) -> T where
T: Abs + Sum<T>,
[src]
T: Abs + Sum<T>,
Returns the L1 norm of the vector.
Also known as Manhattan Distance or Taxicab norm. L1 Norm is the sum of the magnitudes of the vectors in a space.
Methods from Deref<Target = [T; N]>
pub fn as_slice(&self) -> &[T]ⓘ
[src]
array_methods
)Returns a slice containing the entire array. Equivalent to &s[..]
.
pub fn as_mut_slice(&mut self) -> &mut [T]ⓘ
[src]
array_methods
)Returns a mutable slice containing the entire array. Equivalent to
&mut s[..]
.
pub fn each_ref(&self) -> [&T; N]
[src]
array_methods
)Borrows each element and returns an array of references with the same
size as self
.
Example
#![feature(array_methods)] let floats = [3.1, 2.7, -1.0]; let float_refs: [&f64; 3] = floats.each_ref(); assert_eq!(float_refs, [&3.1, &2.7, &-1.0]);
This method is particularly useful if combined with other methods, like
map
. This way, you can can avoid moving the original
array if its elements are not Copy
.
#![feature(array_methods, array_map)] let strings = ["Ferris".to_string(), "♥".to_string(), "Rust".to_string()]; let is_ascii = strings.each_ref().map(|s| s.is_ascii()); assert_eq!(is_ascii, [true, false, true]); // We can still access the original array: it has not been moved. assert_eq!(strings.len(), 3);
pub fn each_mut(&mut self) -> [&mut T; N]
[src]
array_methods
)Borrows each element mutably and returns an array of mutable references
with the same size as self
.
Example
#![feature(array_methods)] let mut floats = [3.1, 2.7, -1.0]; let float_refs: [&mut f64; 3] = floats.each_mut(); *float_refs[0] = 0.0; assert_eq!(float_refs, [&mut 0.0, &mut 2.7, &mut -1.0]); assert_eq!(floats, [0.0, 2.7, -1.0]);
Trait Implementations
impl<T: Base, const N: usize> Add<&'_ Vector<T, N>> for Vector<T, N> where
T: Add<Output = T>,
[src]
T: Add<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the +
operator.
fn add(self, other: &Vector<T, N>) -> Self::Output
[src]
impl<T: Base, const N: usize> Add<&'_ Vector<T, N>> for &Vector<T, N> where
T: Add<Output = T>,
[src]
T: Add<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the +
operator.
fn add(self, other: &Vector<T, N>) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> Add<&'a T> for Vector<T, N> where
T: Add<&'a T, Output = T>,
[src]
T: Add<&'a T, Output = T>,
type Output = Vector<T, N>
The resulting type after applying the +
operator.
fn add(self, other: &'a T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> Add<&'a T> for &Vector<T, N> where
T: Add<&'a T, Output = T>,
[src]
T: Add<&'a T, Output = T>,
type Output = Vector<T, N>
The resulting type after applying the +
operator.
fn add(self, other: &'a T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> Add<T> for Vector<T, N> where
T: Add<Output = T>,
[src]
T: Add<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the +
operator.
fn add(self, other: T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> Add<T> for &Vector<T, N> where
T: Add<Output = T>,
[src]
T: Add<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the +
operator.
fn add(self, other: T) -> Self::Output
[src]
impl<T: Base, const N: usize> Add<Vector<T, N>> for Vector<T, N> where
T: Add<Output = T>,
[src]
T: Add<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the +
operator.
fn add(self, other: Vector<T, N>) -> Self::Output
[src]
impl<T: Base, const N: usize> Add<Vector<T, N>> for &Vector<T, N> where
T: Add<Output = T>,
[src]
T: Add<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the +
operator.
fn add(self, other: Vector<T, N>) -> Self::Output
[src]
impl<T: Base, const N: usize> AddAssign<&'_ Vector<T, N>> for Vector<T, N> where
T: AddAssign,
[src]
T: AddAssign,
fn add_assign(&mut self, other: &Vector<T, N>)
[src]
impl<'a, T: Base, const N: usize> AddAssign<&'a T> for Vector<T, N> where
T: AddAssign<&'a T>,
[src]
T: AddAssign<&'a T>,
fn add_assign(&mut self, other: &'a T)
[src]
impl<'a, T: Base, const N: usize> AddAssign<T> for Vector<T, N> where
T: AddAssign,
[src]
T: AddAssign,
fn add_assign(&mut self, other: T)
[src]
impl<T: Base, const N: usize> AddAssign<Vector<T, N>> for Vector<T, N> where
T: AddAssign,
[src]
T: AddAssign,
fn add_assign(&mut self, other: Vector<T, N>)
[src]
impl<'a, T: Base, const N: usize> BitAnd<&'a T> for Vector<T, N> where
T: BitAnd<&'a T, Output = T>,
[src]
T: BitAnd<&'a T, Output = T>,
type Output = Vector<T, N>
The resulting type after applying the &
operator.
fn bitand(self, other: &'a T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> BitAnd<&'a T> for &Vector<T, N> where
T: BitAnd<&'a T, Output = T>,
[src]
T: BitAnd<&'a T, Output = T>,
type Output = Vector<T, N>
The resulting type after applying the &
operator.
fn bitand(self, other: &'a T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> BitAnd<T> for Vector<T, N> where
T: BitAnd<Output = T>,
[src]
T: BitAnd<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the &
operator.
fn bitand(self, other: T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> BitAnd<T> for &Vector<T, N> where
T: BitAnd<Output = T>,
[src]
T: BitAnd<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the &
operator.
fn bitand(self, other: T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> BitAndAssign<&'a T> for Vector<T, N> where
T: BitAndAssign<&'a T>,
[src]
T: BitAndAssign<&'a T>,
fn bitand_assign(&mut self, other: &'a T)
[src]
impl<'a, T: Base, const N: usize> BitAndAssign<T> for Vector<T, N> where
T: BitAndAssign,
[src]
T: BitAndAssign,
fn bitand_assign(&mut self, other: T)
[src]
impl<'a, T: Base, const N: usize> BitOr<&'a T> for Vector<T, N> where
T: BitOr<&'a T, Output = T>,
[src]
T: BitOr<&'a T, Output = T>,
type Output = Vector<T, N>
The resulting type after applying the |
operator.
fn bitor(self, other: &'a T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> BitOr<&'a T> for &Vector<T, N> where
T: BitOr<&'a T, Output = T>,
[src]
T: BitOr<&'a T, Output = T>,
type Output = Vector<T, N>
The resulting type after applying the |
operator.
fn bitor(self, other: &'a T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> BitOr<T> for Vector<T, N> where
T: BitOr<Output = T>,
[src]
T: BitOr<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the |
operator.
fn bitor(self, other: T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> BitOr<T> for &Vector<T, N> where
T: BitOr<Output = T>,
[src]
T: BitOr<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the |
operator.
fn bitor(self, other: T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> BitOrAssign<&'a T> for Vector<T, N> where
T: BitOrAssign<&'a T>,
[src]
T: BitOrAssign<&'a T>,
fn bitor_assign(&mut self, other: &'a T)
[src]
impl<'a, T: Base, const N: usize> BitOrAssign<T> for Vector<T, N> where
T: BitOrAssign,
[src]
T: BitOrAssign,
fn bitor_assign(&mut self, other: T)
[src]
impl<'a, T: Base, const N: usize> BitXor<&'a T> for Vector<T, N> where
T: BitXor<&'a T, Output = T>,
[src]
T: BitXor<&'a T, Output = T>,
type Output = Vector<T, N>
The resulting type after applying the ^
operator.
fn bitxor(self, other: &'a T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> BitXor<&'a T> for &Vector<T, N> where
T: BitXor<&'a T, Output = T>,
[src]
T: BitXor<&'a T, Output = T>,
type Output = Vector<T, N>
The resulting type after applying the ^
operator.
fn bitxor(self, other: &'a T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> BitXor<T> for Vector<T, N> where
T: BitXor<Output = T>,
[src]
T: BitXor<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the ^
operator.
fn bitxor(self, other: T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> BitXor<T> for &Vector<T, N> where
T: BitXor<Output = T>,
[src]
T: BitXor<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the ^
operator.
fn bitxor(self, other: T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> BitXorAssign<&'a T> for Vector<T, N> where
T: BitXorAssign<&'a T>,
[src]
T: BitXorAssign<&'a T>,
fn bitxor_assign(&mut self, other: &'a T)
[src]
impl<'a, T: Base, const N: usize> BitXorAssign<T> for Vector<T, N> where
T: BitXorAssign,
[src]
T: BitXorAssign,
fn bitxor_assign(&mut self, other: T)
[src]
impl<T: Clone, const N: usize> Clone for Vector<T, N>
[src]
impl<T: Copy, const N: usize> Copy for Vector<T, N>
[src]
impl<T: Debug, const N: usize> Debug for Vector<T, N>
[src]
impl<T: Base, const N: usize> Default for Vector<T, N>
[src]
impl<T, const N: usize> Deref for Vector<T, N>
[src]
impl<T, const N: usize> DerefMut for Vector<T, N>
[src]
impl<'a, T: Base, const N: usize> Div<&'a T> for Vector<T, N> where
T: Div<&'a T, Output = T>,
[src]
T: Div<&'a T, Output = T>,
type Output = Vector<T, N>
The resulting type after applying the /
operator.
fn div(self, other: &'a T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> Div<&'a T> for &Vector<T, N> where
T: Div<&'a T, Output = T>,
[src]
T: Div<&'a T, Output = T>,
type Output = Vector<T, N>
The resulting type after applying the /
operator.
fn div(self, other: &'a T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> Div<T> for Vector<T, N> where
T: Div<Output = T>,
[src]
T: Div<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the /
operator.
fn div(self, other: T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> Div<T> for &Vector<T, N> where
T: Div<Output = T>,
[src]
T: Div<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the /
operator.
fn div(self, other: T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> DivAssign<&'a T> for Vector<T, N> where
T: DivAssign<&'a T>,
[src]
T: DivAssign<&'a T>,
fn div_assign(&mut self, other: &'a T)
[src]
impl<'a, T: Base, const N: usize> DivAssign<T> for Vector<T, N> where
T: DivAssign,
[src]
T: DivAssign,
fn div_assign(&mut self, other: T)
[src]
impl<T: Eq, const N: usize> Eq for Vector<T, N>
[src]
impl<'a, T: Base, const N: usize> From<&'a [T]> for Vector<T, N>
[src]
impl<T, const N: usize> From<[T; N]> for Vector<T, N>
[src]
impl<T: Base> From<(T, T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, 12>
[src]
impl<T: Base> From<(T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, 11>
[src]
impl<T: Base> From<(T, T, T, T, T, T, T, T, T, T)> for Vector<T, 10>
[src]
impl<T: Base> From<(T, T, T, T, T, T, T, T, T)> for Vector<T, 9>
[src]
impl<T: Base> From<(T, T, T, T, T, T, T, T)> for Vector<T, 8>
[src]
impl<T: Base> From<(T, T, T, T, T, T, T)> for Vector<T, 7>
[src]
impl<T: Base> From<(T, T, T, T, T, T)> for Vector<T, 6>
[src]
impl<T: Base> From<(T, T, T, T, T)> for Vector<T, 5>
[src]
impl<T: Base> From<(T, T, T, T)> for Vector<T, 4>
[src]
impl<T: Base> From<(T, T, T)> for Vector<T, 3>
[src]
impl<T: Base> From<(T, T)> for Vector<T, 2>
[src]
impl<T: Base> From<(T,)> for Vector<T, 1>
[src]
impl<T: Base, const N: usize> From<Vec<T, Global>> for Vector<T, N>
[src]
impl<T: Base, const N: usize> FromIterator<T> for Vector<T, N>
[src]
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
[src]
impl<'a, T: Base, const N: usize> FromPartial<T, &'a [T]> for Vector<T, N>
[src]
fn from_partial(slice: &'a [T], fill: T) -> Self
[src]
impl<T: Base, const M: usize, const N: usize> FromPartial<T, [T; M]> for Vector<T, N>
[src]
fn from_partial(arr: [T; M], fill: T) -> Self
[src]
impl<T: Base, const N: usize> FromPartial<T, (T, T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, N>
[src]
fn from_partial(
(x, y, z, w, a, b, c, d, e, f, g, h): (T, T, T, T, T, T, T, T, T, T, T, T),
fill: T
) -> Self
[src]
(x, y, z, w, a, b, c, d, e, f, g, h): (T, T, T, T, T, T, T, T, T, T, T, T),
fill: T
) -> Self
impl<T: Base, const N: usize> FromPartial<T, (T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, N>
[src]
fn from_partial(
(x, y, z, w, a, b, c, d, e, f, g): (T, T, T, T, T, T, T, T, T, T, T),
fill: T
) -> Self
[src]
(x, y, z, w, a, b, c, d, e, f, g): (T, T, T, T, T, T, T, T, T, T, T),
fill: T
) -> Self
impl<T: Base, const N: usize> FromPartial<T, (T, T, T, T, T, T, T, T, T, T)> for Vector<T, N>
[src]
fn from_partial(
(x, y, z, w, a, b, c, d, e, f): (T, T, T, T, T, T, T, T, T, T),
fill: T
) -> Self
[src]
(x, y, z, w, a, b, c, d, e, f): (T, T, T, T, T, T, T, T, T, T),
fill: T
) -> Self
impl<T: Base, const N: usize> FromPartial<T, (T, T, T, T, T, T, T, T, T)> for Vector<T, N>
[src]
fn from_partial(
(x, y, z, w, a, b, c, d, e): (T, T, T, T, T, T, T, T, T),
fill: T
) -> Self
[src]
(x, y, z, w, a, b, c, d, e): (T, T, T, T, T, T, T, T, T),
fill: T
) -> Self
impl<T: Base, const N: usize> FromPartial<T, (T, T, T, T, T, T, T, T)> for Vector<T, N>
[src]
fn from_partial(
(x, y, z, w, a, b, c, d): (T, T, T, T, T, T, T, T),
fill: T
) -> Self
[src]
(x, y, z, w, a, b, c, d): (T, T, T, T, T, T, T, T),
fill: T
) -> Self
impl<T: Base, const N: usize> FromPartial<T, (T, T, T, T, T, T, T)> for Vector<T, N>
[src]
fn from_partial((x, y, z, w, a, b, c): (T, T, T, T, T, T, T), fill: T) -> Self
[src]
impl<T: Base, const N: usize> FromPartial<T, (T, T, T, T, T, T)> for Vector<T, N>
[src]
fn from_partial((x, y, z, w, a, b): (T, T, T, T, T, T), fill: T) -> Self
[src]
impl<T: Base, const N: usize> FromPartial<T, (T, T, T, T, T)> for Vector<T, N>
[src]
fn from_partial((x, y, z, w, a): (T, T, T, T, T), fill: T) -> Self
[src]
impl<T: Base, const N: usize> FromPartial<T, (T, T, T, T)> for Vector<T, N>
[src]
fn from_partial((x, y, z, w): (T, T, T, T), fill: T) -> Self
[src]
impl<T: Base, const N: usize> FromPartial<T, (T, T, T)> for Vector<T, N>
[src]
fn from_partial((x, y, z): (T, T, T), fill: T) -> Self
[src]
impl<T: Base, const N: usize> FromPartial<T, (T, T)> for Vector<T, N>
[src]
fn from_partial((x, y): (T, T), fill: T) -> Self
[src]
impl<T: Base, const N: usize> FromPartial<T, (T,)> for Vector<T, N>
[src]
fn from_partial((x,): (T,), fill: T) -> Self
[src]
impl<T: Base, const N: usize> FromPartial<T, Vec<T, Global>> for Vector<T, N>
[src]
fn from_partial(vec: Vec<T>, fill: T) -> Self
[src]
impl<T: Base, const M: usize, const N: usize> FromPartial<T, Vector<T, M>> for Vector<T, N>
[src]
fn from_partial(vector: Vector<T, M>, fill: T) -> Self
[src]
impl<T: Hash, const N: usize> Hash for Vector<T, N>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T: Base, const N: usize> IntoIterator for Vector<T, N>
[src]
type Item = T
The type of the elements being iterated over.
type IntoIter = IntoIter<T, N>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<'a, T: Base, const N: usize> Mul<&'a T> for Vector<T, N> where
T: Mul<&'a T, Output = T>,
[src]
T: Mul<&'a T, Output = T>,
type Output = Vector<T, N>
The resulting type after applying the *
operator.
fn mul(self, other: &'a T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> Mul<&'a T> for &Vector<T, N> where
T: Mul<&'a T, Output = T>,
[src]
T: Mul<&'a T, Output = T>,
type Output = Vector<T, N>
The resulting type after applying the *
operator.
fn mul(self, other: &'a T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> Mul<T> for Vector<T, N> where
T: Mul<Output = T>,
[src]
T: Mul<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the *
operator.
fn mul(self, other: T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> Mul<T> for &Vector<T, N> where
T: Mul<Output = T>,
[src]
T: Mul<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the *
operator.
fn mul(self, other: T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> MulAssign<&'a T> for Vector<T, N> where
T: MulAssign<&'a T>,
[src]
T: MulAssign<&'a T>,
fn mul_assign(&mut self, other: &'a T)
[src]
impl<'a, T: Base, const N: usize> MulAssign<T> for Vector<T, N> where
T: MulAssign,
[src]
T: MulAssign,
fn mul_assign(&mut self, other: T)
[src]
impl<T: Base, const N: usize> Neg for Vector<T, N> where
T: Neg<Output = T>,
[src]
T: Neg<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
impl<T: Base, const N: usize> Neg for &Vector<T, N> where
T: Neg<Output = T>,
[src]
T: Neg<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
impl<T: Base, const N: usize> Not for Vector<T, N> where
T: Not<Output = T>,
[src]
T: Not<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the !
operator.
fn not(self) -> Self::Output
[src]
impl<T: Base, const N: usize> Not for &Vector<T, N> where
T: Not<Output = T>,
[src]
T: Not<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the !
operator.
fn not(self) -> Self::Output
[src]
impl<T: Ord, const N: usize> Ord for Vector<T, N>
[src]
fn cmp(&self, other: &Vector<T, N>) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl<T: PartialEq, const N: usize> PartialEq<Vector<T, N>> for Vector<T, N>
[src]
impl<T: PartialOrd, const N: usize> PartialOrd<Vector<T, N>> for Vector<T, N>
[src]
fn partial_cmp(&self, other: &Vector<T, N>) -> Option<Ordering>
[src]
fn lt(&self, other: &Vector<T, N>) -> bool
[src]
fn le(&self, other: &Vector<T, N>) -> bool
[src]
fn gt(&self, other: &Vector<T, N>) -> bool
[src]
fn ge(&self, other: &Vector<T, N>) -> bool
[src]
impl<'a, T: Base, const N: usize> Rem<&'a T> for Vector<T, N> where
T: Rem<&'a T, Output = T>,
[src]
T: Rem<&'a T, Output = T>,
type Output = Vector<T, N>
The resulting type after applying the %
operator.
fn rem(self, other: &'a T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> Rem<&'a T> for &Vector<T, N> where
T: Rem<&'a T, Output = T>,
[src]
T: Rem<&'a T, Output = T>,
type Output = Vector<T, N>
The resulting type after applying the %
operator.
fn rem(self, other: &'a T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> Rem<T> for Vector<T, N> where
T: Rem<Output = T>,
[src]
T: Rem<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the %
operator.
fn rem(self, other: T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> Rem<T> for &Vector<T, N> where
T: Rem<Output = T>,
[src]
T: Rem<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the %
operator.
fn rem(self, other: T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> RemAssign<&'a T> for Vector<T, N> where
T: RemAssign<&'a T>,
[src]
T: RemAssign<&'a T>,
fn rem_assign(&mut self, other: &'a T)
[src]
impl<'a, T: Base, const N: usize> RemAssign<T> for Vector<T, N> where
T: RemAssign,
[src]
T: RemAssign,
fn rem_assign(&mut self, other: T)
[src]
impl<'a, T: Base, const N: usize> Shl<&'a T> for Vector<T, N> where
T: Shl<&'a T, Output = T>,
[src]
T: Shl<&'a T, Output = T>,
type Output = Vector<T, N>
The resulting type after applying the <<
operator.
fn shl(self, other: &'a T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> Shl<&'a T> for &Vector<T, N> where
T: Shl<&'a T, Output = T>,
[src]
T: Shl<&'a T, Output = T>,
type Output = Vector<T, N>
The resulting type after applying the <<
operator.
fn shl(self, other: &'a T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> Shl<T> for Vector<T, N> where
T: Shl<Output = T>,
[src]
T: Shl<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the <<
operator.
fn shl(self, other: T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> Shl<T> for &Vector<T, N> where
T: Shl<Output = T>,
[src]
T: Shl<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the <<
operator.
fn shl(self, other: T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> ShlAssign<&'a T> for Vector<T, N> where
T: ShlAssign<&'a T>,
[src]
T: ShlAssign<&'a T>,
fn shl_assign(&mut self, other: &'a T)
[src]
impl<'a, T: Base, const N: usize> ShlAssign<T> for Vector<T, N> where
T: ShlAssign,
[src]
T: ShlAssign,
fn shl_assign(&mut self, other: T)
[src]
impl<'a, T: Base, const N: usize> Shr<&'a T> for Vector<T, N> where
T: Shr<&'a T, Output = T>,
[src]
T: Shr<&'a T, Output = T>,
type Output = Vector<T, N>
The resulting type after applying the >>
operator.
fn shr(self, other: &'a T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> Shr<&'a T> for &Vector<T, N> where
T: Shr<&'a T, Output = T>,
[src]
T: Shr<&'a T, Output = T>,
type Output = Vector<T, N>
The resulting type after applying the >>
operator.
fn shr(self, other: &'a T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> Shr<T> for Vector<T, N> where
T: Shr<Output = T>,
[src]
T: Shr<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the >>
operator.
fn shr(self, other: T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> Shr<T> for &Vector<T, N> where
T: Shr<Output = T>,
[src]
T: Shr<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the >>
operator.
fn shr(self, other: T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> ShrAssign<&'a T> for Vector<T, N> where
T: ShrAssign<&'a T>,
[src]
T: ShrAssign<&'a T>,
fn shr_assign(&mut self, other: &'a T)
[src]
impl<'a, T: Base, const N: usize> ShrAssign<T> for Vector<T, N> where
T: ShrAssign,
[src]
T: ShrAssign,
fn shr_assign(&mut self, other: T)
[src]
impl<T, const N: usize> StructuralEq for Vector<T, N>
[src]
impl<T, const N: usize> StructuralPartialEq for Vector<T, N>
[src]
impl<T: Base, const N: usize> Sub<&'_ Vector<T, N>> for Vector<T, N> where
T: Sub<Output = T>,
[src]
T: Sub<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the -
operator.
fn sub(self, other: &Vector<T, N>) -> Self::Output
[src]
impl<T: Base, const N: usize> Sub<&'_ Vector<T, N>> for &Vector<T, N> where
T: Sub<Output = T>,
[src]
T: Sub<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the -
operator.
fn sub(self, other: &Vector<T, N>) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> Sub<&'a T> for Vector<T, N> where
T: Sub<&'a T, Output = T>,
[src]
T: Sub<&'a T, Output = T>,
type Output = Vector<T, N>
The resulting type after applying the -
operator.
fn sub(self, other: &'a T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> Sub<&'a T> for &Vector<T, N> where
T: Sub<&'a T, Output = T>,
[src]
T: Sub<&'a T, Output = T>,
type Output = Vector<T, N>
The resulting type after applying the -
operator.
fn sub(self, other: &'a T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> Sub<T> for Vector<T, N> where
T: Sub<Output = T>,
[src]
T: Sub<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the -
operator.
fn sub(self, other: T) -> Self::Output
[src]
impl<'a, T: Base, const N: usize> Sub<T> for &Vector<T, N> where
T: Sub<Output = T>,
[src]
T: Sub<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the -
operator.
fn sub(self, other: T) -> Self::Output
[src]
impl<T: Base, const N: usize> Sub<Vector<T, N>> for Vector<T, N> where
T: Sub<Output = T>,
[src]
T: Sub<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the -
operator.
fn sub(self, other: Vector<T, N>) -> Self::Output
[src]
impl<T: Base, const N: usize> Sub<Vector<T, N>> for &Vector<T, N> where
T: Sub<Output = T>,
[src]
T: Sub<Output = T>,
type Output = Vector<T, N>
The resulting type after applying the -
operator.
fn sub(self, other: Vector<T, N>) -> Self::Output
[src]
impl<T: Base, const N: usize> SubAssign<&'_ Vector<T, N>> for Vector<T, N> where
T: SubAssign,
[src]
T: SubAssign,
fn sub_assign(&mut self, other: &Vector<T, N>)
[src]
impl<'a, T: Base, const N: usize> SubAssign<&'a T> for Vector<T, N> where
T: SubAssign<&'a T>,
[src]
T: SubAssign<&'a T>,
fn sub_assign(&mut self, other: &'a T)
[src]
impl<'a, T: Base, const N: usize> SubAssign<T> for Vector<T, N> where
T: SubAssign,
[src]
T: SubAssign,
fn sub_assign(&mut self, other: T)
[src]
impl<T: Base, const N: usize> SubAssign<Vector<T, N>> for Vector<T, N> where
T: SubAssign,
[src]
T: SubAssign,
fn sub_assign(&mut self, other: Vector<T, N>)
[src]
impl<T: Base, const N: usize> Sum<Vector<T, N>> for Vector<T, N> where
Self: Add<Output = Self>,
T: Zero,
[src]
Self: Add<Output = Self>,
T: Zero,
Auto Trait Implementations
impl<T, const N: usize> RefUnwindSafe for Vector<T, N> where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
impl<T, const N: usize> Send for Vector<T, N> where
T: Send,
[src]
T: Send,
impl<T, const N: usize> Sync for Vector<T, N> where
T: Sync,
[src]
T: Sync,
impl<T, const N: usize> Unpin for Vector<T, N> where
T: Unpin,
[src]
T: Unpin,
impl<T, const N: usize> UnwindSafe for Vector<T, N> where
T: UnwindSafe,
[src]
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Base for T where
T: Copy + Default,
[src]
T: Copy + Default,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut Tⓘ
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,