Struct nalgebra::DVector1
[−]
[src]
pub struct DVector1<N> { /* fields omitted */ }
Stack-allocated, dynamically sized vector with a maximum size of 1.
Methods
impl<N: Zero + Copy + Clone> DVector1<N>
[src]
impl<N: Zero + Copy + Clone> DVector1<N>
[src]
impl<N: One + Zero + Copy + Clone> DVector1<N>
[src]
impl<N: Rand + Zero> DVector1<N>
[src]
fn new_random(dimension: usize) -> DVector1<N>
Builds a vector filled with random values.
impl<N: BaseFloat + ApproxEq<N>> DVector1<N>
[src]
fn canonical_basis_with_dimension(dimension: usize) -> Vec<DVector1<N>>
Computes the canonical basis for the given dimension. A canonical basis is a set of vectors, mutually orthogonal, with all its component equal to 0.0 except one which is equal to 1.0.
fn orthogonal_subspace_basis(&self) -> Vec<DVector1<N>>
Computes a basis of the space orthogonal to the vector. If the input vector is of dimension
n
, this will return n - 1
vectors.
impl<N> DVector1<N>
[src]
fn len(&self) -> usize
The number of elements of this vector.
unsafe fn new_uninitialized(dimension: usize) -> DVector1<N>
Creates an uninitialized vector of dimension dimension
.
impl<N: Copy + Zero> DVector1<N>
[src]
fn from_element(dimension: usize, elem: N) -> DVector1<N>
Builds a vector filled with a constant.
impl<N: Copy + Zero> DVector1<N>
[src]
fn from_slice(dimension: usize, vector: &[N]) -> DVector1<N>
Builds a vector filled with the components provided by a vector.
The vector must have at least dimension
elements.
impl<N: Zero> DVector1<N>
[src]
fn from_fn<F: FnMut(usize) -> N>(dimension: usize, f: F) -> DVector1<N>
Builds a vector filled with the result of a function.
Trait Implementations
impl<N> Mul<DMatrix1<N>> for DVector1<N> where N: Copy + Add<N, Output=N> + Mul<N, Output=N> + Zero
[src]
type Output = DVector1<N>
The resulting type after applying the *
operator
fn mul(self, right: DMatrix1<N>) -> DVector1<N>
The method for the *
operator
impl<'a, N> Mul<DMatrix1<N>> for &'a DVector1<N> where N: Copy + Add<N, Output=N> + Mul<N, Output=N> + Zero
[src]
type Output = DVector1<N>
The resulting type after applying the *
operator
fn mul(self, right: DMatrix1<N>) -> DVector1<N>
The method for the *
operator
impl<'a, N> Mul<&'a DMatrix1<N>> for DVector1<N> where N: Copy + Add<N, Output=N> + Mul<N, Output=N> + Zero
[src]
type Output = DVector1<N>
The resulting type after applying the *
operator
fn mul(self, right: &'a DMatrix1<N>) -> DVector1<N>
The method for the *
operator
impl<'a, 'b, N> Mul<&'b DMatrix1<N>> for &'a DVector1<N> where N: Copy + Add<N, Output=N> + Mul<N, Output=N> + Zero
[src]
type Output = DVector1<N>
The resulting type after applying the *
operator
fn mul(self, right: &'b DMatrix1<N>) -> DVector1<N>
The method for the *
operator
impl<N> MulAssign<DMatrix1<N>> for DVector1<N> where N: Copy + Mul<N, Output=N> + Add<N, Output=N> + Zero
[src]
fn mul_assign(&mut self, right: DMatrix1<N>)
The method for the *=
operator
impl<'a, N> MulAssign<&'a DMatrix1<N>> for DVector1<N> where N: Copy + Mul<N, Output=N> + Add<N, Output=N> + Zero
[src]
fn mul_assign(&mut self, right: &'a DMatrix1<N>)
The method for the *=
operator
impl<N> AsRef<[N]> for DVector1<N>
[src]
impl<N> AsMut<[N]> for DVector1<N>
[src]
impl<N> Shape<usize> for DVector1<N>
[src]
impl<N: Copy> Indexable<usize, N> for DVector1<N>
[src]
fn swap(&mut self, i: usize, j: 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, T> Index<T> for DVector1<N> where [N]: Index<T>
[src]
type Output = [N]::Output
The returned type after indexing
fn index(&self, i: T) -> &[N]::Output
The method for the indexing (Foo[Bar]
) operation
impl<N, T> IndexMut<T> for DVector1<N> where [N]: IndexMut<T>
[src]
impl<N> Iterable<N> for DVector1<N>
[src]
impl<N> IterableMut<N> for DVector1<N>
[src]
impl<N: Copy + Add<N, Output=N> + Mul<N, Output=N>> Axpy<N> for DVector1<N>
[src]
impl<N: Copy + Mul<N, Output=N> + Zero> Mul<DVector1<N>> for DVector1<N>
[src]
type Output = DVector1<N>
The resulting type after applying the *
operator
fn mul(self, right: DVector1<N>) -> DVector1<N>
The method for the *
operator
impl<N: Copy + Mul<N, Output=N> + Zero> Mul<N> for DVector1<N>
[src]
type Output = DVector1<N>
The resulting type after applying the *
operator
fn mul(self, right: N) -> DVector1<N>
The method for the *
operator
impl<N> MulAssign<DVector1<N>> for DVector1<N> where N: Copy + MulAssign<N> + Zero
[src]
fn mul_assign(&mut self, right: DVector1<N>)
The method for the *=
operator
impl<N> MulAssign<N> for DVector1<N> where N: Copy + MulAssign<N> + Zero
[src]
fn mul_assign(&mut self, right: N)
The method for the *=
operator
impl<N: Copy + Div<N, Output=N> + Zero> Div<DVector1<N>> for DVector1<N>
[src]
type Output = DVector1<N>
The resulting type after applying the /
operator
fn div(self, right: DVector1<N>) -> DVector1<N>
The method for the /
operator
impl<N: Copy + Div<N, Output=N> + Zero> Div<N> for DVector1<N>
[src]
type Output = DVector1<N>
The resulting type after applying the /
operator
fn div(self, right: N) -> DVector1<N>
The method for the /
operator
impl<N> DivAssign<DVector1<N>> for DVector1<N> where N: Copy + DivAssign<N> + Zero
[src]
fn div_assign(&mut self, right: DVector1<N>)
The method for the /=
operator
impl<N> DivAssign<N> for DVector1<N> where N: Copy + DivAssign<N> + Zero
[src]
fn div_assign(&mut self, right: N)
The method for the /=
operator
impl<N: Copy + Add<N, Output=N> + Zero> Add<DVector1<N>> for DVector1<N>
[src]
type Output = DVector1<N>
The resulting type after applying the +
operator
fn add(self, right: DVector1<N>) -> DVector1<N>
The method for the +
operator
impl<N: Copy + Add<N, Output=N> + Zero> Add<N> for DVector1<N>
[src]
type Output = DVector1<N>
The resulting type after applying the +
operator
fn add(self, right: N) -> DVector1<N>
The method for the +
operator
impl<N> AddAssign<DVector1<N>> for DVector1<N> where N: Copy + AddAssign<N> + Zero
[src]
fn add_assign(&mut self, right: DVector1<N>)
The method for the +=
operator
impl<N> AddAssign<N> for DVector1<N> where N: Copy + AddAssign<N> + Zero
[src]
fn add_assign(&mut self, right: N)
The method for the +=
operator
impl<N: Copy + Sub<N, Output=N> + Zero> Sub<DVector1<N>> for DVector1<N>
[src]
type Output = DVector1<N>
The resulting type after applying the -
operator
fn sub(self, right: DVector1<N>) -> DVector1<N>
The method for the -
operator
impl<N: Copy + Sub<N, Output=N> + Zero> Sub<N> for DVector1<N>
[src]
type Output = DVector1<N>
The resulting type after applying the -
operator
fn sub(self, right: N) -> DVector1<N>
The method for the -
operator
impl<N> SubAssign<DVector1<N>> for DVector1<N> where N: Copy + SubAssign<N> + Zero
[src]
fn sub_assign(&mut self, right: DVector1<N>)
The method for the -=
operator
impl<N> SubAssign<N> for DVector1<N> where N: Copy + SubAssign<N> + Zero
[src]
fn sub_assign(&mut self, right: N)
The method for the -=
operator
impl<N: Neg<Output=N> + Zero + Copy> Neg for DVector1<N>
[src]
type Output = DVector1<N>
The resulting type after applying the -
operator
fn neg(self) -> DVector1<N>
The method for the unary -
operator
impl<N: BaseNum> Dot<N> for DVector1<N>
[src]
impl<N: BaseFloat> Norm<N> for DVector1<N>
[src]
fn norm_squared(&self) -> N
Computes the squared norm of self
. Read more
fn normalize(&self) -> DVector1<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: BaseFloat + Cast<f64>> Mean<N> for DVector1<N>
[src]
impl<N: ApproxEq<N>> ApproxEq<N> for DVector1<N>
[src]
fn approx_epsilon(_: Option<DVector1<N>>) -> N
Default epsilon for approximation.
fn approx_ulps(_: Option<DVector1<N>>) -> u32
Default ULPs for approximation.
fn approx_eq_eps(&self, other: &DVector1<N>, epsilon: &N) -> bool
Tests approximate equality using a custom epsilon.
fn approx_eq_ulps(&self, other: &DVector1<N>, ulps: u32) -> bool
Tests approximate equality using units in the last place (ULPs)
fn approx_eq(&self, other: &Self) -> bool
Tests approximate equality.
impl<N: PartialEq> PartialEq for DVector1<N>
[src]
fn eq(&self, other: &DVector1<N>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<N: Clone> Clone for DVector1<N>
[src]
fn clone(&self) -> DVector1<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: Zero> FromIterator<N> for DVector1<N>
[src]
fn from_iter<I: IntoIterator<Item=N>>(param: I) -> DVector1<N>
Creates a value from an iterator. Read more