Skip to main content

Vector

Type Alias Vector 

Source
pub type Vector<const N: usize> = Matrix<N, 1>;
Expand description

Column vector of N elements.

Aliased Type§

pub struct Vector<const N: usize> { /* private fields */ }

Implementations§

Source§

impl<const N: usize> Vector<N>

Source

pub fn from_column(values: [f64; N]) -> Self

From elements.

Source

pub fn to_column(&self) -> [f64; N]

Elements.

Source

pub fn element(&self, row: usize) -> Option<f64>

Element at row; None outside.

Source

pub fn dot(&self, other: &Self) -> f64

Dot product.

Source

pub fn norm(&self) -> f64

Euclidean norm.