[][src]Struct linea::Matrix

pub struct Matrix<A, M: ArrayLength<A>, N: ArrayLength<GenericArray<A, M>> = U1>(_);

Rank-2 array of elements of size known at build time

Methods

impl<A: Copy + Zero + AddAssign + Mul + Div, N: ArrayLength<A> + ArrayLength<<A as Div>::Output>> Matrix<A, N> where
    <A as Mul>::Output: Zero + AddAssign + Radical<U2, Root = A>,
    <A as Div>::Output: Copy
[src]

pub fn norm(self) -> Matrix<<A as Div>::Output, N> where
    <N as ArrayLength<A>>::ArrayType: Copy
[src]

Normalize.

impl<A: Copy + Zero + AddAssign, N: ArrayLength<A>> Matrix<A, N> where
    N::ArrayType: Copy
[src]

pub fn proj<B: Copy>(self, other: Matrix<B, N>) -> Self where
    N: ArrayLength<B> + ArrayLength<<B as Mul>::Output> + ArrayLength<<<A as Mul<B>>::Output as Div<<B as Mul>::Output>>::Output>,
    <N as ArrayLength<B>>::ArrayType: Copy,
    A: Mul<B>,
    <A as Mul<B>>::Output: Zero + AddAssign + Div<<B as Mul>::Output>,
    <<A as Mul<B>>::Output as Div<<B as Mul>::Output>>::Output: Copy + Mul<B, Output = A>,
    B: Mul + Mul<<<A as Mul<B>>::Output as Div<<B as Mul>::Output>>::Output, Output = A>,
    <B as Mul>::Output: Zero + AddAssign
[src]

Project self onto other.

impl<A: Copy + Zero + AddAssign + Sub<Output = A>, N: ArrayLength<A>> Matrix<A, N> where
    N::ArrayType: Copy
[src]

pub fn rej<B: Copy>(self, other: Matrix<B, N>) -> Self where
    N: ArrayLength<B> + ArrayLength<<B as Mul>::Output> + ArrayLength<<<A as Mul<B>>::Output as Div<<B as Mul>::Output>>::Output>,
    <N as ArrayLength<B>>::ArrayType: Copy,
    A: Mul<B>,
    <A as Mul<B>>::Output: Zero + AddAssign + Div<<B as Mul>::Output>,
    <<A as Mul<B>>::Output as Div<<B as Mul>::Output>>::Output: Copy + Mul<B, Output = A>,
    B: Mul + Mul<<<A as Mul<B>>::Output as Div<<B as Mul>::Output>>::Output, Output = A>,
    <B as Mul>::Output: Zero + AddAssign
[src]

Reject self from other.

impl<A, M: ArrayLength<A>, N: ArrayLength<GenericArray<A, M>>> Matrix<A, M, N>[src]

pub const fn from_col_major_array(
    a: GenericArray<GenericArray<A, M>, N>
) -> Self
[src]

pub const fn to_col_major_array(self) -> GenericArray<GenericArray<A, M>, N>[src]

impl<A: Copy + Zero, M: ArrayLength<A>> Matrix<A, M>[src]

pub fn diag(self) -> Matrix<A, M, M> where
    M: ArrayLength<GenericArray<A, M>>, 
[src]

impl<A, M: ArrayLength<A>, N: ArrayLength<GenericArray<A, M>>> Matrix<A, M, N>[src]

pub fn scale<B: Copy>(self, b: B) -> Matrix<A::Output, M, N> where
    A: Mul<B>,
    M: ArrayLength<A::Output>,
    N: ArrayLength<GenericArray<A::Output, M>>, 
[src]

pub fn unscale<B: Copy>(self, b: B) -> Matrix<A::Output, M, N> where
    A: Div<B>,
    M: ArrayLength<A::Output>,
    N: ArrayLength<GenericArray<A::Output, M>>, 
[src]

impl<A: Copy, M: ArrayLength<A> + ArrayLength<GenericArray<A, N>>, N: ArrayLength<A> + ArrayLength<GenericArray<A, M>>> Matrix<A, M, N>[src]

pub fn transpose(self) -> Matrix<A, N, M>[src]

impl<A: Copy + Zero, M: ArrayLength<A>, N: ArrayLength<GenericArray<A, M>>> Matrix<A, M, N>[src]

pub fn zero() -> Self[src]

impl<A: Copy + Zero + One, N: ArrayLength<A> + ArrayLength<GenericArray<A, N>>> Matrix<A, N, N>[src]

pub fn one() -> Self[src]

Trait Implementations

impl<A: Debug, M: ArrayLength<A>, N: ArrayLength<GenericArray<A, M>>> Debug for Matrix<A, M, N>[src]

impl<B: Copy, A: Copy + Sub<B>, M: ArrayLength<A> + ArrayLength<B> + ArrayLength<A::Output>, N: ArrayLength<GenericArray<A, M>> + ArrayLength<GenericArray<B, M>> + ArrayLength<GenericArray<A::Output, M>>> Sub<Matrix<B, M, N>> for Matrix<A, M, N>[src]

type Output = Matrix<A::Output, M, N>

The resulting type after applying the - operator.

impl<A: PartialEq, M: ArrayLength<A>, N: ArrayLength<GenericArray<A, M>>> PartialEq<Matrix<A, M, N>> for Matrix<A, M, N>[src]

impl<A: Eq, M: ArrayLength<A>, N: ArrayLength<GenericArray<A, M>>> Eq for Matrix<A, M, N>[src]

impl<B: Copy, A: Copy + Add<B>, M: ArrayLength<A> + ArrayLength<B> + ArrayLength<A::Output>, N: ArrayLength<GenericArray<A, M>> + ArrayLength<GenericArray<B, M>> + ArrayLength<GenericArray<A::Output, M>>> Add<Matrix<B, M, N>> for Matrix<A, M, N>[src]

type Output = Matrix<A::Output, M, N>

The resulting type after applying the + operator.

impl<B: Copy, A: Copy + Mul<B>, K: ArrayLength<B> + ArrayLength<GenericArray<A, M>>, M: ArrayLength<A> + ArrayLength<A::Output>, N: ArrayLength<GenericArray<A::Output, M>> + ArrayLength<GenericArray<B, K>>> Mul<Matrix<B, K, N>> for Matrix<A, M, K> where
    A::Output: Zero + AddAssign
[src]

type Output = Matrix<A::Output, M, N>

The resulting type after applying the * operator.

impl<A: Neg, M: ArrayLength<A> + ArrayLength<A::Output>, N: ArrayLength<GenericArray<A, M>> + ArrayLength<GenericArray<A::Output, M>>> Neg for Matrix<A, M, N>[src]

type Output = Matrix<A::Output, M, N>

The resulting type after applying the - operator.

impl<B: Copy, A: Copy + AddAssign<B>, M: ArrayLength<A> + ArrayLength<B>, N: ArrayLength<GenericArray<A, M>> + ArrayLength<GenericArray<B, M>>> AddAssign<Matrix<B, M, N>> for Matrix<A, M, N>[src]

impl<B: Copy, A: Copy + SubAssign<B>, M: ArrayLength<A> + ArrayLength<B>, N: ArrayLength<GenericArray<A, M>> + ArrayLength<GenericArray<B, M>>> SubAssign<Matrix<B, M, N>> for Matrix<A, M, N>[src]

impl<B: Copy, A: Copy + MulAssign<B>, M: ArrayLength<A>, N: ArrayLength<GenericArray<A, M>>> MulAssign<B> for Matrix<A, M, N>[src]

impl<A, N: ArrayLength<A>> Index<usize> for Matrix<A, N>[src]

type Output = A

The returned type after indexing.

impl<A, N: ArrayLength<A>> IndexMut<usize> for Matrix<A, N>[src]

impl<A: Copy, M: ArrayLength<A>, N: ArrayLength<GenericArray<A, M>>> Copy for Matrix<A, M, N> where
    M::ArrayType: Copy,
    N::ArrayType: Copy
[src]

impl<A: Clone, M: ArrayLength<A>, N: ArrayLength<GenericArray<A, M>>> Clone for Matrix<A, M, N> where
    M::ArrayType: Clone
[src]

Auto Trait Implementations

impl<A, M, N> Unpin for Matrix<A, M, N> where
    <N as ArrayLength<GenericArray<A, M>>>::ArrayType: Unpin

impl<A, M, N> Send for Matrix<A, M, N> where
    A: Send

impl<A, M, N> Sync for Matrix<A, M, N> where
    A: Sync

Blanket Implementations

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

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

type Error = !

The type returned in the event of a conversion error.

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

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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

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

type Output = T

Should always be Self