Type Definition sized_matrix::Vector[][src]

type Vector<T, const M: usize> = Matrix<T, M, 1>;

A special case type alias for Matrices with a single column.

Implementations

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

pub fn vector(contents: [T; M]) -> Self[src]

Construct a column vector from an array.

Examples

Constructing a Vector:

use sized_matrix::{Vector, Matrix};

let vector: Vector<i32, 3> = Vector::vector([1, 2, 3]);

assert_eq!(vector, Matrix::cols([[1, 2, 3]]));

Trait Implementations

impl<TLhs: Copy, TRhs: Copy, TOutput, const M: usize> Dot<Matrix<TRhs, M, 1_usize>> for Vector<TLhs, M> where
    TLhs: Mul<TRhs, Output = TOutput> + MulAdd<TRhs, TOutput, Output = TOutput>,
    TOutput: Zero
[src]

type Output = TOutput

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

type Output = T

The returned type after indexing.

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

impl<T, const M: usize> Init<T, usize, ()> for Vector<T, M>[src]

impl<T: Copy, const M: usize, const M_OUT: usize> Section<usize, Matrix<T, M_OUT, 1_usize>> for Vector<T, M>[src]