Type Alias munum::Vector

source ·
pub type Vector<T, const R: usize> = Matrix<T, R, 1>;
Expand description

A column matrix aka vector

Aliased Type§

struct Vector<T, const R: usize>(/* private fields */);

Implementations§

source§

impl<T: Copy + NumAssign, const R: usize> Vector<T, R>

source

pub fn from_array(arr: [T; R]) -> Self

Creates a vector from raw array.

§Examples
let v = Vector::<f32, 4>::from_array([1., 2., 3., 4.]);
assert_eq!(*v.as_ref(), [1., 2., 3., 4.]);

Trait Implementations§

source§

impl<T: Copy + NumAssign, const R: usize> From<[T; R]> for Vector<T, R>

source§

fn from(data: [T; R]) -> Self

Converts to this type from the input type.