Struct nalgebra::Vector1 [] [src]

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

Vector of dimension 1.

The main differance between a point and a vector is that a vector is not affected by translations.

Fields

First component of the vector.

Methods

impl<N> Vector1<N>
[src]

Creates a new vector.

impl<N: Zero + One> Vector1<N>
[src]

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

impl<N: Copy> Vector1<N>
[src]

Unsafe read access to a vector element by index.

Unsafe write access to a vector element by index.

impl<N> Vector1<N>
[src]

The dimension of this entity.

impl<N> Vector1<N>
[src]

Converts this vector to a point.

Reinterprets this vector as a point.

Trait Implementations

impl<N: Eq> Eq for Vector1<N>
[src]

impl<N: PartialEq> PartialEq for Vector1<N>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<N: Encodable> Encodable for Vector1<N>
[src]

impl<N: Decodable> Decodable for Vector1<N>
[src]

impl<N: Clone> Clone for Vector1<N>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<N: Hash> Hash for Vector1<N>
[src]

Feeds this value into the state given, updating the hasher as necessary.

Feeds a slice of this type into the state provided.

impl<N: Debug> Debug for Vector1<N>
[src]

Formats the value using the given formatter.

impl<N: Copy> Copy for Vector1<N>
[src]

impl<N: BaseFloat> PartialOrder for Vector1<N>
[src]

Returns the infimum of this value and another

Returns the supremum of this value and another

Compare self and other using a partial ordering relation.

Returns true iff self and other are comparable and self < other.

Returns true iff self and other are comparable and self <= other.

Returns true iff self and other are comparable and self > other.

Returns true iff self and other are comparable and self >= other.

Return the minimum of self and other if they are comparable.

Return the maximum of self and other if they are comparable.

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<Vector1<Nin>> for Vector1<Nout>
[src]

Converts an element of type T to an element of type Self.

impl<N> AsRef<[N; 1]> for Vector1<N>
[src]

Performs the conversion.

impl<N> AsMut<[N; 1]> for Vector1<N>
[src]

Performs the conversion.

impl<'a, N> From<&'a [N; 1]> for &'a Vector1<N>
[src]

Performs the conversion.

impl<'a, N> From<&'a mut [N; 1]> for &'a mut Vector1<N>
[src]

Performs the conversion.

impl<'a, N: Clone> From<&'a [N; 1]> for Vector1<N>
[src]

Performs the conversion.

impl<N, T> Index<T> for Vector1<N> where [N]: Index<T>
[src]

The returned type after indexing

The method for the indexing (Foo[Bar]) operation

impl<N, T> IndexMut<T> for Vector1<N> where [N]: IndexMut<T>
[src]

The method for the indexing (Foo[Bar]) operation

impl<N> Shape<usize> for Vector1<N>
[src]

Returns the shape of an indexable object.

impl<N: Copy> Indexable<usize, N> for Vector1<N>
[src]

Swaps the i-th element of self with its j-th element.

Reads the i-th element of self. Read more

Writes to the i-th element of self. Read more

impl<N: Copy> Repeat<N> for Vector1<N>
[src]

Creates a new vector with all its components equal to a given value.

impl<N> Dimension for Vector1<N>
[src]

The dimension of the object.

impl<N: Add<N, Output=N>> Add<Vector1<N>> for Vector1<N>
[src]

The resulting type after applying the + operator

The method for the + operator

impl<N: AddAssign<N>> AddAssign<Vector1<N>> for Vector1<N>
[src]

The method for the += operator

impl<N: Sub<N, Output=N>> Sub<Vector1<N>> for Vector1<N>
[src]

The resulting type after applying the - operator

The method for the - operator

impl<N: SubAssign<N>> SubAssign<Vector1<N>> for Vector1<N>
[src]

The method for the -= operator

impl<N: Copy + Mul<N, Output=N>> Mul<Vector1<N>> for Vector1<N>
[src]

The resulting type after applying the * operator

The method for the * operator

impl<N: MulAssign<N>> MulAssign<Vector1<N>> for Vector1<N>
[src]

The method for the *= operator

impl<N: Copy + Div<N, Output=N>> Div<Vector1<N>> for Vector1<N>
[src]

The resulting type after applying the / operator

The method for the / operator

impl<N: DivAssign<N>> DivAssign<Vector1<N>> for Vector1<N>
[src]

The method for the /= operator

impl<N: Copy + Add<N, Output=N>> Add<N> for Vector1<N>
[src]

The resulting type after applying the + operator

The method for the + operator

impl<N: Copy + AddAssign<N>> AddAssign<N> for Vector1<N>
[src]

The method for the += operator

impl<N: Copy + Sub<N, Output=N>> Sub<N> for Vector1<N>
[src]

The resulting type after applying the - operator

The method for the - operator

impl<N: Copy + SubAssign<N>> SubAssign<N> for Vector1<N>
[src]

The method for the -= operator

impl<N: Copy + Mul<N, Output=N>> Mul<N> for Vector1<N>
[src]

The resulting type after applying the * operator

The method for the * operator

impl<N: Copy + MulAssign<N>> MulAssign<N> for Vector1<N>
[src]

The method for the *= operator

impl<N: Copy + Div<N, Output=N>> Div<N> for Vector1<N>
[src]

The resulting type after applying the / operator

The method for the / operator

impl<N: Copy + DivAssign<N>> DivAssign<N> for Vector1<N>
[src]

The method for the /= operator

impl<N: Neg<Output=N> + Copy> Neg for Vector1<N>
[src]

The resulting type after applying the - operator

The method for the unary - operator

impl<N: BaseNum> Dot<N> for Vector1<N>
[src]

Computes the dot (inner) product of two vectors.

impl<N: Copy + Add<N, Output=N> + Neg<Output=N>> Translation<Vector1<N>> for Vector1<N>
[src]

Gets the translation associated with this object.

Gets the inverse translation associated with this object.

Appends a translation to this object.

Appends the translation amount to a copy of t.

Prepends a translation to this object.

Prepends the translation amount to a copy of t.

Sets the translation.

impl<N: BaseFloat> Norm<N> for Vector1<N>
[src]

Computes the squared norm of self. Read more

Gets the normalized version of a copy of v.

Normalizes self.

Computes the norm of self.

impl<N: ApproxEq<N>> ApproxEq<N> for Vector1<N>
[src]

Default epsilon for approximation.

Default ULPs for approximation.

Tests approximate equality.

Tests approximate equality using a custom epsilon.

Tests approximate equality using units in the last place (ULPs)

impl<N> One for Vector1<N> where N: Copy + One + Sub<N, Output=N> + Add<N, Output=N>
[src]

Returns the multiplicative identity element of Self, 1. Read more

impl<N: Zero> Zero for Vector1<N>
[src]

Returns the additive identity element of Self, 0. Read more

Returns true if self is equal to the additive identity.

impl<N> FromIterator<N> for Vector1<N>
[src]

Creates a value from an iterator. Read more

impl<N: Bounded> Bounded for Vector1<N>
[src]

The maximum value.

The minimum value.

impl<N: Axpy<N>> Axpy<N> for Vector1<N>
[src]

Adds $$a * x$$ to self.

impl<N> Iterable<N> for Vector1<N>
[src]

Gets a vector-like read-only iterator.

impl<N> IterableMut<N> for Vector1<N>
[src]

Gets a vector-like read-write iterator.

impl<N: Copy + One + Zero> ToHomogeneous<Vector2<N>> for Vector1<N>
[src]

Gets the homogeneous coordinates form of this object.

impl<N: Copy + Div<N, Output=N> + One + Zero> FromHomogeneous<Vector2<N>> for Vector1<N>
[src]

Builds an object from its homogeneous coordinate form. Read more

impl<N: Copy + Add<N, Output=N> + Sub<N, Output=N>> Translate<Point1<N>> for Vector1<N>
[src]

Apply a translation to an object.

Apply an inverse translation to an object.

impl<N, O: Copy> Rotate<O> for Vector1<N>
[src]

Applies a rotation to v.

Applies an inverse rotation to v.

impl<N: Copy + Add<N, Output=N> + Sub<N, Output=N>> Transform<Point1<N>> for Vector1<N>
[src]

Applies a transformation to v.

Applies an inverse transformation to v.

impl<N> NumVector<N> for Vector1<N> where N: BaseNum
[src]

impl<N> FloatVector<N> for Vector1<N> where N: BaseFloat + ApproxEq<N>
[src]

impl<N: Absolute<N>> Absolute<Vector1<N>> for Vector1<N>
[src]

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 Vector1<N>
[src]

Generates a random instance of this type using the specified source of randomness. Read more

impl<N: BaseFloat + Cast<f64>> Mean<N> for Vector1<N>
[src]

Computes the mean of the observations stored by v. Read more

impl<N: Display> Display for Vector1<N>
[src]

Formats the value using the given formatter.

impl<N: Copy + BaseNum> Mul<Matrix1<N>> for Vector1<N>
[src]

The resulting type after applying the * operator

The method for the * operator

impl<N: Copy + BaseNum> MulAssign<Matrix1<N>> for Vector1<N>
[src]

The method for the *= operator

impl<N: Copy + Mul<N, Output=N> + Zero> Outer for Vector1<N>
[src]

Result type of the outer product.

Computes the outer product: a * b

impl<N: One> Basis for Vector1<N>
[src]

Iterates through the canonical basis of the space in which this object lives.

Iterates through a basis of the subspace orthogonal to self.

Gets the ith element of the canonical basis.

impl<N> UniformSphereSample for Vector1<N> where Vector1<N>: One
[src]

Iterate through the samples.