Struct nalgebra::Vec1
[−]
[src]
pub struct Vec1<N> { pub x: N, }
Vector of dimension 1.
Fields
x: N
First component of the vector.
Methods
impl<N> Vec1<N>
[src]
impl<N: Zero + One> Vec1<N>
[src]
impl<N> Vec1<N>
[src]
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>
[src]
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>
[src]
impl<N> Vec1<N>
[src]
Trait Implementations
impl<N: Copy> Copy for Vec1<N>
[src]
impl<N: Debug> Debug for Vec1<N>
[src]
impl<N: Hash> Hash for Vec1<N>
[src]
fn hash<__HN: Hasher>(&self, __arg_0: &mut __HN)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.
impl<N: Clone> Clone for Vec1<N>
[src]
fn clone(&self) -> Vec1<N>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<N: Decodable> Decodable for Vec1<N>
[src]
impl<N: Encodable> Encodable for Vec1<N>
[src]
impl<N: PartialEq> PartialEq for Vec1<N>
[src]
fn eq(&self, __arg_0: &Vec1<N>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Vec1<N>) -> bool
This method tests for !=
.
impl<N: Eq> Eq for Vec1<N>
[src]
impl<N: BaseFloat> POrd for Vec1<N>
[src]
fn inf(&self, other: &Vec1<N>) -> Vec1<N>
Returns the infimum of this value and another
fn sup(&self, other: &Vec1<N>) -> Vec1<N>
Returns the supremum of this value and another
fn partial_cmp(&self, other: &Vec1<N>) -> POrdering
Compare self
and other
using a partial ordering relation.
fn partial_lt(&self, other: &Vec1<N>) -> bool
Returns true
iff self
and other
are comparable and self < other
.
fn partial_le(&self, other: &Vec1<N>) -> bool
Returns true
iff self
and other
are comparable and self <= other
.
fn partial_gt(&self, other: &Vec1<N>) -> bool
Returns true
iff self
and other
are comparable and self > other
.
fn partial_ge(&self, other: &Vec1<N>) -> bool
Returns true
iff self
and other
are comparable and self >= other
.
fn partial_min<'a>(&'a self, other: &'a Self) -> Option<&'a Self>
Return the minimum of self
and other
if they are comparable.
fn partial_max<'a>(&'a self, other: &'a Self) -> Option<&'a Self>
Return the maximum of self
and other
if they are comparable.
fn partial_clamp<'a>(&'a self, min: &'a Self, max: &'a Self) -> Option<&'a Self>
Clamp value
between min
and max
. Returns None
if value
is not comparable to min
or max
. Read more
impl<Nin: Copy, Nout: Copy + Cast<Nin>> Cast<Vec1<Nin>> for Vec1<Nout>
[src]
impl<N> Index<usize> for Vec1<N>
[src]
type Output = N
The returned type after indexing
fn index(&self, i: usize) -> &N
The method for the indexing (Foo[Bar]
) operation
impl<N> IndexMut<usize> for Vec1<N>
[src]
impl<N> Shape<usize> for Vec1<N>
[src]
impl<N: Copy> Indexable<usize, N> for Vec1<N>
[src]
fn swap(&mut self, i1: usize, i2: usize)
Swaps the i
-th element of self
with its j
-th element.
unsafe fn unsafe_at(&self, i: usize) -> N
Reads the i
-th element of self
. Read more
unsafe fn unsafe_set(&mut self, i: usize, val: N)
Writes to the i
-th element of self
. Read more
impl<N: Copy> Repeat<N> for Vec1<N>
[src]
impl<N> Dim for Vec1<N>
[src]
impl<N: Add<N, Output=N>> Add<Vec1<N>> for Vec1<N>
[src]
type Output = Vec1<N>
The resulting type after applying the +
operator
fn add(self, right: Vec1<N>) -> Vec1<N>
The method for the +
operator
impl<N: Sub<N, Output=N>> Sub<Vec1<N>> for Vec1<N>
[src]
type Output = Vec1<N>
The resulting type after applying the -
operator
fn sub(self, right: Vec1<N>) -> Vec1<N>
The method for the -
operator
impl<N: Copy + Mul<N, Output=N>> Mul<Vec1<N>> for Vec1<N>
[src]
type Output = Vec1<N>
The resulting type after applying the *
operator
fn mul(self, right: Vec1<N>) -> Vec1<N>
The method for the *
operator
impl<N: Copy + Div<N, Output=N>> Div<Vec1<N>> for Vec1<N>
[src]
type Output = Vec1<N>
The resulting type after applying the /
operator
fn div(self, right: Vec1<N>) -> Vec1<N>
The method for the /
operator
impl<N: Copy + Add<N, Output=N>> Add<N> for Vec1<N>
[src]
type Output = Vec1<N>
The resulting type after applying the +
operator
fn add(self, right: N) -> Vec1<N>
The method for the +
operator
impl<N: Copy + Sub<N, Output=N>> Sub<N> for Vec1<N>
[src]
type Output = Vec1<N>
The resulting type after applying the -
operator
fn sub(self, right: N) -> Vec1<N>
The method for the -
operator
impl<N: Copy + Mul<N, Output=N>> Mul<N> for Vec1<N>
[src]
type Output = Vec1<N>
The resulting type after applying the *
operator
fn mul(self, right: N) -> Vec1<N>
The method for the *
operator
impl<N: Copy + Div<N, Output=N>> Div<N> for Vec1<N>
[src]
type Output = Vec1<N>
The resulting type after applying the /
operator
fn div(self, right: N) -> Vec1<N>
The method for the /
operator
impl<N: Neg<Output=N> + Copy> Neg for Vec1<N>
[src]
type Output = Vec1<N>
The resulting type after applying the -
operator
fn neg(self) -> Vec1<N>
The method for the unary -
operator
impl<N: BaseNum> Dot<N> for Vec1<N>
[src]
impl<N: Copy + Add<N, Output=N> + Neg<Output=N>> Translation<Vec1<N>> for Vec1<N>
[src]
fn translation(&self) -> Vec1<N>
Gets the translation associated with this object.
fn inv_translation(&self) -> Vec1<N>
Gets the inverse translation associated with this object.
fn append_translation_mut(&mut self, t: &Vec1<N>)
Appends a translation to this object.
fn append_translation(&self, t: &Vec1<N>) -> Vec1<N>
Appends the translation amount
to a copy of t
.
fn prepend_translation_mut(&mut self, t: &Vec1<N>)
Prepends a translation to this object.
fn prepend_translation(&self, t: &Vec1<N>) -> Vec1<N>
Prepends the translation amount
to a copy of t
.
fn set_translation(&mut self, t: Vec1<N>)
Sets the translation.
impl<N: BaseFloat> Norm<N> for Vec1<N>
[src]
fn sqnorm(&self) -> N
Computes the squared norm of self
. Read more
fn normalize(&self) -> Vec1<N>
Gets the normalized version of a copy of v
.
fn normalize_mut(&mut self) -> N
Normalizes self
.
fn norm(&self) -> N
Computes the norm of self
.
impl<N: ApproxEq<N>> ApproxEq<N> for Vec1<N>
[src]
fn approx_epsilon(_: Option<Vec1<N>>) -> N
Default epsilon for approximation.
fn approx_ulps(_: Option<Vec1<N>>) -> u32
Default ULPs for approximation.
fn approx_eq(&self, other: &Vec1<N>) -> bool
Tests approximate equality.
fn approx_eq_eps(&self, other: &Vec1<N>, eps: &N) -> bool
Tests approximate equality using a custom epsilon.
fn approx_eq_ulps(&self, other: &Vec1<N>, ulps: u32) -> bool
Tests approximate equality using units in the last place (ULPs)
impl<N> One for Vec1<N> where N: Copy + One + Sub<N, Output=N> + Add<N, Output=N>
[src]
impl<N: Zero> Zero for Vec1<N>
[src]
fn zero() -> Vec1<N>
Returns the additive identity element of Self
, 0
. Read more
fn is_zero(&self) -> bool
Returns true
if self
is equal to the additive identity.
impl<N> FromIterator<N> for Vec1<N>
[src]
fn from_iter<I: IntoIterator<Item=N>>(iterator: I) -> Vec1<N>
Creates a value from an iterator. Read more
impl<N: Bounded> Bounded for Vec1<N>
[src]
impl<N: Axpy<N>> Axpy<N> for Vec1<N>
[src]
impl<N> Iterable<N> for Vec1<N>
[src]
impl<N> IterableMut<N> for Vec1<N>
[src]
impl<N: Copy + One + Zero> ToHomogeneous<Vec2<N>> for Vec1<N>
[src]
fn to_homogeneous(&self) -> Vec2<N>
Gets the homogeneous coordinates form of this object.
impl<N: Copy + Div<N, Output=N> + One + Zero> FromHomogeneous<Vec2<N>> for Vec1<N>
[src]
impl<N: Copy + Add<N, Output=N> + Sub<N, Output=N>> Translate<Pnt1<N>> for Vec1<N>
[src]
fn translate(&self, other: &Pnt1<N>) -> Pnt1<N>
Apply a translation to an object.
fn inv_translate(&self, other: &Pnt1<N>) -> Pnt1<N>
Apply an inverse translation to an object.
impl<N, O: Copy> Rotate<O> for Vec1<N>
[src]
fn rotate(&self, other: &O) -> O
Applies a rotation to v
.
fn inv_rotate(&self, other: &O) -> O
Applies an inverse rotation to v
.
impl<N: Copy + Add<N, Output=N> + Sub<N, Output=N>> Transform<Pnt1<N>> for Vec1<N>
[src]
fn transform(&self, other: &Pnt1<N>) -> Pnt1<N>
Applies a transformation to v
.
fn inv_transform(&self, other: &Pnt1<N>) -> Pnt1<N>
Applies an inverse transformation to v
.
impl<N> NumVec<N> for Vec1<N> where N: BaseNum
[src]
impl<N> FloatVec<N> for Vec1<N> where N: BaseFloat + ApproxEq<N>
[src]
impl<N: Absolute<N>> Absolute<Vec1<N>> for Vec1<N>
[src]
fn abs(m: &Vec1<N>) -> Vec1<N>
Computes some absolute value of this object. Typically, this will make all component of a matrix or vector positive. Read more
impl<N: Rand> Rand for Vec1<N>
[src]
fn rand<R: Rng>(rng: &mut R) -> Vec1<N>
Generates a random instance of this type using the specified source of randomness. Read more
impl<N: Copy + BaseNum> Mul<Mat1<N>> for Vec1<N>
[src]
type Output = Vec1<N>
The resulting type after applying the *
operator
fn mul(self, right: Mat1<N>) -> Vec1<N>
The method for the *
operator
impl<N: Copy + Mul<N, Output=N> + Zero> Outer for Vec1<N>
[src]
type OuterProductType = Mat1<N>
Result type of the outer product.
fn outer(&self, other: &Vec1<N>) -> Mat1<N>
Computes the outer product: a * b
impl<N: One> Basis for Vec1<N>
[src]
fn canonical_basis<F: FnMut(Vec1<N>) -> bool>(f: F)
Iterates through the canonical basis of the space in which this object lives.
fn orthonormal_subspace_basis<F: FnMut(Vec1<N>) -> bool>(_: &Vec1<N>, _: F)
Iterates through a basis of the subspace orthogonal to self
.
fn canonical_basis_element(i: usize) -> Option<Vec1<N>>
Gets the ith element of the canonical basis.