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]
TLhs: Mul<TRhs, Output = TOutput> + MulAdd<TRhs, TOutput, Output = TOutput>,
TOutput: Zero,
impl<T, const M: usize> Index<usize> for Vector<T, M>
[src]
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]
fn init_with<F: FnMut(usize) -> T>(_: (), elem: F) -> Self
[src]
pub fn init<F>(elem: F) -> Self where
F: FnMut(I) -> T,
V: TypeEquals<()>,
[src]
F: FnMut(I) -> T,
V: TypeEquals<()>,