Struct nalgebra::Vec1 [] [src]

pub struct Vec1<N> {
    pub x: N,
}

Vector of dimension 1.

Fields

x

First component of the vector.

Methods

impl<N> Vec1<N>

fn new(x: N) -> Vec1<N>

Creates a new vector.

impl<N: Zero + One> Vec1<N>

fn x() -> Vec1<N>

Create a unit vector with its $compN component equal to 1.0.

impl<N> Vec1<N>

fn as_array(&self) -> &[N; 1]

View this vector as an array.

fn as_array_mut(&mut self) -> &mut [N; 1]

View this vector as a mutable array.

fn from_array_ref(array: &[N; 1]) -> &Vec1<N>

View an array as a vector.

fn from_array_mut(array: &mut [N; 1]) -> &mut Vec1<N>

View an array as a vector.

impl<N: Copy> Vec1<N>

unsafe fn at_fast(&self, i: usize) -> N

Unsafe read access to a vector element by index.

unsafe fn set_fast(&mut self, i: usize, val: N)

Unsafe write access to a vector element by index.

impl<N> Vec1<N>

fn len(&self) -> usize

impl<N> Vec1<N>

fn to_pnt(self) -> Pnt1<N>

fn as_pnt(&self) -> &Pnt1<N>

Trait Implementations

impl<N: BaseFloat> POrd for Vec1<N>

fn inf(&self, other: &Vec1<N>) -> Vec1<N>

fn sup(&self, other: &Vec1<N>) -> Vec1<N>

fn partial_cmp(&self, other: &Vec1<N>) -> POrdering

fn partial_lt(&self, other: &Vec1<N>) -> bool

fn partial_le(&self, other: &Vec1<N>) -> bool

fn partial_gt(&self, other: &Vec1<N>) -> bool

fn partial_ge(&self, other: &Vec1<N>) -> bool

fn partial_min<'a>(&'a self, other: &'a Self) -> Option<&'a Self>

fn partial_max<'a>(&'a self, other: &'a Self) -> Option<&'a Self>

fn partial_clamp<'a>(&'a self, min: &'a Self, max: &'a Self) -> Option<&'a Self>

impl<Nin: Copy, Nout: Copy + Cast<Nin>> Cast<Vec1<Nin>> for Vec1<Nout>

fn from(v: Vec1<Nin>) -> Vec1<Nout>

impl<N> Index<usize> for Vec1<N>

type Output = N

fn index(&self, i: usize) -> &N

impl<N> IndexMut<usize> for Vec1<N>

fn index_mut(&mut self, i: usize) -> &mut N

impl<N> Shape<usize> for Vec1<N>

fn shape(&self) -> usize

impl<N: Copy> Indexable<usize, N> for Vec1<N>

fn swap(&mut self, i1: usize, i2: usize)

unsafe fn unsafe_at(&self, i: usize) -> N

unsafe fn unsafe_set(&mut self, i: usize, val: N)

impl<N: Copy> Repeat<N> for Vec1<N>

fn repeat(val: N) -> Vec1<N>

impl<N> Dim for Vec1<N>

fn dim(_: Option<Vec1<N>>) -> usize

impl<N: Add<N, Output=N>> Add<Vec1<N>> for Vec1<N>

type Output = Vec1<N>

fn add(self, right: Vec1<N>) -> Vec1<N>

impl<N: Sub<N, Output=N>> Sub<Vec1<N>> for Vec1<N>

type Output = Vec1<N>

fn sub(self, right: Vec1<N>) -> Vec1<N>

impl<N: Copy + Mul<N, Output=N>> Mul<Vec1<N>> for Vec1<N>

type Output = Vec1<N>

fn mul(self, right: Vec1<N>) -> Vec1<N>

impl<N: Copy + Div<N, Output=N>> Div<Vec1<N>> for Vec1<N>

type Output = Vec1<N>

fn div(self, right: Vec1<N>) -> Vec1<N>

impl<N: Copy + Add<N, Output=N>> Add<N> for Vec1<N>

type Output = Vec1<N>

fn add(self, right: N) -> Vec1<N>

impl<N: Copy + Sub<N, Output=N>> Sub<N> for Vec1<N>

type Output = Vec1<N>

fn sub(self, right: N) -> Vec1<N>

impl<N: Copy + Mul<N, Output=N>> Mul<N> for Vec1<N>

type Output = Vec1<N>

fn mul(self, right: N) -> Vec1<N>

impl<N: Copy + Div<N, Output=N>> Div<N> for Vec1<N>

type Output = Vec1<N>

fn div(self, right: N) -> Vec1<N>

impl<N: Neg<Output=N> + Copy> Neg for Vec1<N>

type Output = Vec1<N>

fn neg(self) -> Vec1<N>

impl<N: BaseNum> Dot<N> for Vec1<N>

fn dot(&self, other: &Vec1<N>) -> N

impl<N: Copy + Add<N, Output=N> + Neg<Output=N>> Translation<Vec1<N>> for Vec1<N>

fn translation(&self) -> Vec1<N>

fn inv_translation(&self) -> Vec1<N>

fn append_translation_mut(&mut self, t: &Vec1<N>)

fn append_translation(&self, t: &Vec1<N>) -> Vec1<N>

fn prepend_translation_mut(&mut self, t: &Vec1<N>)

fn prepend_translation(&self, t: &Vec1<N>) -> Vec1<N>

fn set_translation(&mut self, t: Vec1<N>)

impl<N: BaseFloat> Norm<N> for Vec1<N>

fn sqnorm(&self) -> N

fn normalize(&self) -> Vec1<N>

fn normalize_mut(&mut self) -> N

fn norm(&self) -> N

impl<N: ApproxEq<N>> ApproxEq<N> for Vec1<N>

fn approx_epsilon(_: Option<Vec1<N>>) -> N

fn approx_ulps(_: Option<Vec1<N>>) -> u32

fn approx_eq(&self, other: &Vec1<N>) -> bool

fn approx_eq_eps(&self, other: &Vec1<N>, eps: &N) -> bool

fn approx_eq_ulps(&self, other: &Vec1<N>, ulps: u32) -> bool

impl<N> One for Vec1<N> where N: Copy + One + Sub<N, Output=N> + Add<N, Output=N>

fn one() -> Vec1<N>

impl<N: Zero> Zero for Vec1<N>

fn zero() -> Vec1<N>

fn is_zero(&self) -> bool

impl<N> FromIterator<N> for Vec1<N>

fn from_iter<I: IntoIterator<Item=N>>(iterator: I) -> Vec1<N>

impl<N: Bounded> Bounded for Vec1<N>

fn max_value() -> Vec1<N>

fn min_value() -> Vec1<N>

impl<N: Axpy<N>> Axpy<N> for Vec1<N>

fn axpy(&mut self, a: &N, x: &Vec1<N>)

impl<N> Iterable<N> for Vec1<N>

fn iter<'l>(&'l self) -> Iter<'l, N>

impl<N> IterableMut<N> for Vec1<N>

fn iter_mut<'l>(&'l mut self) -> IterMut<'l, N>

impl<N: Copy + One + Zero> ToHomogeneous<Vec2<N>> for Vec1<N>

fn to_homogeneous(&self) -> Vec2<N>

impl<N: Copy + Div<N, Output=N> + One + Zero> FromHomogeneous<Vec2<N>> for Vec1<N>

fn from(v: &Vec2<N>) -> Vec1<N>

impl<N: Copy + Add<N, Output=N> + Sub<N, Output=N>> Translate<Pnt1<N>> for Vec1<N>

fn translate(&self, other: &Pnt1<N>) -> Pnt1<N>

fn inv_translate(&self, other: &Pnt1<N>) -> Pnt1<N>

impl<N, O: Copy> Rotate<O> for Vec1<N>

fn rotate(&self, other: &O) -> O

fn inv_rotate(&self, other: &O) -> O

impl<N: Copy + Add<N, Output=N> + Sub<N, Output=N>> Transform<Pnt1<N>> for Vec1<N>

fn transform(&self, other: &Pnt1<N>) -> Pnt1<N>

fn inv_transform(&self, other: &Pnt1<N>) -> Pnt1<N>

impl<N> NumVec<N> for Vec1<N> where N: BaseNum

impl<N> FloatVec<N> for Vec1<N> where N: BaseFloat + ApproxEq<N>

impl<N: Absolute<N>> Absolute<Vec1<N>> for Vec1<N>

fn abs(m: &Vec1<N>) -> Vec1<N>

impl<N: Rand> Rand for Vec1<N>

fn rand<R: Rng>(rng: &mut R) -> Vec1<N>

impl<N: Copy + BaseNum> Mul<Mat1<N>> for Vec1<N>

type Output = Vec1<N>

fn mul(self, right: Mat1<N>) -> Vec1<N>

impl<N: Copy + Mul<N, Output=N> + Zero> Outer for Vec1<N>

type OuterProductType = Mat1<N>

fn outer(&self, other: &Vec1<N>) -> Mat1<N>

Derived Implementations

impl<N: Copy> Copy for Vec1<N>

impl<N: Debug> Debug for Vec1<N>

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl<N: Hash> Hash for Vec1<N>

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl<N: Clone> Clone for Vec1<N>

fn clone(&self) -> Vec1<N>

fn clone_from(&mut self, source: &Self)

impl<N: Decodable> Decodable for Vec1<N>

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Vec1<N>, __D::Error>

impl<N: Encodable> Encodable for Vec1<N>

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>

impl<N: PartialEq> PartialEq for Vec1<N>

fn eq(&self, __arg_0: &Vec1<N>) -> bool

fn ne(&self, __arg_0: &Vec1<N>) -> bool

impl<N: Eq> Eq for Vec1<N>