[][src]Trait vikos::linear_algebra::Vector

pub trait Vector: Clone {
    fn zero_from_dimension(dimension: usize) -> Self;
fn dimension(&self) -> usize;
fn at(&self, i: usize) -> f64;
fn at_mut(&mut self, i: usize) -> &mut f64; fn dot(&self, other: &Self) -> f64 { ... } }

Vector whose dimension is known at runtime

Assumes the Vector is represented as a tuple of numbers representing its projection along orthogonal base vectors

Required methods

fn zero_from_dimension(dimension: usize) -> Self

Retuns a new instance of Vector with all elements set to zero

Not every possible implementation knows its dimension at compiletime, therefore a size hint is necessary to allocate the correct number of elements

fn dimension(&self) -> usize

Maximum allowed index for at and at_mut

fn at(&self, i: usize) -> f64

Length of projection along i-th base

fn at_mut(&mut self, i: usize) -> &mut f64

Mutable access to length of projection along i-th base

Loading content...

Provided methods

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

Scalar product

Default implementation using at and dimension is provided

Loading content...

Implementations on Foreign Types

impl Vector for f64
[src]

impl Vector for Vec<f64>
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 1]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 2]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 3]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 4]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 5]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 6]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 7]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 8]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 9]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 10]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 11]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 12]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 13]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 14]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 15]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 16]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 17]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 18]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 19]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 20]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 21]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 22]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 23]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 24]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 25]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 26]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 27]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 28]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 29]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 30]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 31]
[src]

fn dot(&self, other: &Self) -> f64
[src]

impl Vector for [f64; 32]
[src]

fn dot(&self, other: &Self) -> f64
[src]

Loading content...

Implementors

Loading content...