[][src]Struct optimath::Vector

pub struct Vector<T, const N: usize> { /* fields omitted */ }

a const-sized vector of elements, supports all math operations that T does on an element-by-element basis.

can be iterated over using .into_iter() on Vector or &Vector can be constructed from iterators using collect().

is repr(align(16)) for simd

Methods

impl<T, const N: usize> Vector<T, N>[src]

pub fn ascend(self) -> Vector<Self, 1>[src]

impl<'a, 'b, T: 'a + 'b, const M: usize> Vector<T, M> where
    &'a T: Mul<&'b T, Output = T>,
    T: Sum
[src]

pub default fn dot(&'a self, other: &'b Vector<T, M>) -> T[src]

Trait Implementations

impl<'a, 'b, T, B: 'b, const N: usize> Add<B> for &'a Vector<T, N> where
    &'a T: Add<&'b T, Output = T>,
    B: ConstIndex<&'b T, N> + Copy + Clone,
    T: 'a + 'b, 
[src]

type Output = Vector<T, N>

The resulting type after applying the + operator.

impl<'a, T, const N: usize> AddAssign<&'a Vector<T, N>> for Vector<T, N> where
    T: AddAssign<&'a T>, 
[src]

impl<'a, 'b, T, B: 'b, const N: usize> AddAssign<B> for Vector<T, N> where
    T: AddAssign<&'b T>,
    B: ConstIndex<&'b T, N> + Copy + Clone,
    T: 'a + 'b, 
[src]

impl<T: Clone, const N: usize> Clone for Vector<T, N>[src]

impl<'a, T, const N: usize> ConstIndex<&'a T, N> for &'a Vector<T, N>[src]

impl<'a, T, const N: usize> ConstIndex<&'a mut T, N> for &'a mut 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: Default, const N: usize> Default for Vector<T, N>[src]

impl<'de, T, const N: usize> Deserialize<'de> for Vector<T, N> where
    T: Deserialize<'de>, 
[src]

impl<T: Display + Debug, const N: usize> Display for Vector<T, N>[src]

impl<T, const N: usize> Distribution<Vector<T, N>> for Standard where
    Standard: Distribution<T>, 
[src]

impl<'a, 'b, T, B: 'b, const N: usize> Div<B> for &'a Vector<T, N> where
    &'a T: Div<&'b T, Output = T>,
    B: ConstIndex<&'b T, N> + Copy + Clone,
    T: 'a + 'b, 
[src]

type Output = Vector<T, N>

The resulting type after applying the / operator.

impl<'a, T, const N: usize> DivAssign<&'a Vector<T, N>> for Vector<T, N> where
    T: DivAssign<&'a T>, 
[src]

impl<'a, 'b, T, B: 'b, const N: usize> DivAssign<B> for Vector<T, N> where
    T: DivAssign<&'b T>,
    B: ConstIndex<&'b T, N> + Copy + Clone,
    T: 'a + 'b, 
[src]

impl<T: Eq, const N: usize> Eq for Vector<T, N>[src]

impl<T, const N: usize> FromIterator<T> for Vector<T, N>[src]

impl<T, const N: usize> Index<usize> for Vector<T, N>[src]

type Output = T

The returned type after indexing.

impl<T, const N: usize> IndexMut<usize> for Vector<T, N>[src]

impl<T, 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?

impl<'a, T, const N: usize> IntoIterator for &'a Vector<T, N>[src]

type Item = &'a T

The type of the elements being iterated over.

type IntoIter = ConstIterator<&'a T, &'a Vector<T, N>, N>

Which kind of iterator are we turning this into?

impl<'a, 'b, T, B: 'b, const N: usize> Mul<B> for &'a Vector<T, N> where
    &'a T: Mul<&'b T, Output = T>,
    B: ConstIndex<&'b T, N> + Copy + Clone,
    T: 'a + 'b, 
[src]

type Output = Vector<T, N>

The resulting type after applying the * operator.

impl<'a, T, const N: usize> MulAssign<&'a Vector<T, N>> for Vector<T, N> where
    T: MulAssign<&'a T>, 
[src]

impl<'a, 'b, T, B: 'b, const N: usize> MulAssign<B> for Vector<T, N> where
    T: MulAssign<&'b T>,
    B: ConstIndex<&'b T, N> + Copy + Clone,
    T: 'a + 'b, 
[src]

impl<T: PartialEq, const N: usize> PartialEq<Vector<T, N>> for Vector<T, N>[src]

impl<T, const N: usize> Serialize for Vector<T, N> where
    T: Serialize
[src]

impl<T, const N: usize> Stupidity<T> for Vector<T, N>[src]

impl<'a, 'b, T, B: 'b, const N: usize> Sub<B> for &'a Vector<T, N> where
    &'a T: Sub<&'b T, Output = T>,
    B: ConstIndex<&'b T, N> + Copy + Clone,
    T: 'a + 'b, 
[src]

type Output = Vector<T, N>

The resulting type after applying the - operator.

impl<'a, T, const N: usize> SubAssign<&'a Vector<T, N>> for Vector<T, N> where
    T: SubAssign<&'a T>, 
[src]

impl<'a, 'b, T, B: 'b, const N: usize> SubAssign<B> for Vector<T, N> where
    T: SubAssign<&'b T>,
    B: ConstIndex<&'b T, N> + Copy + Clone,
    T: 'a + 'b, 
[src]

Auto Trait Implementations

impl<const N: usize, T> RefUnwindSafe for Vector<T, N> where
    T: RefUnwindSafe

impl<const N: usize, T> Send for Vector<T, N> where
    T: Send

impl<const N: usize, T> Sync for Vector<T, N> where
    T: Sync

impl<const N: usize, T> Unpin for Vector<T, N> where
    T: Unpin

impl<const N: usize, T> UnwindSafe for Vector<T, N> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,