Struct nalgebra::DVector
[−]
[src]
pub struct DVector<N> { pub at: Vec<N>, }
Heap allocated, dynamically sized vector.
Fields
at: Vec<N>
Components of the vector. Contains as much elements as the vector dimension.
Methods
impl<N> DVector<N>
[src]
unsafe fn new_uninitialized(dimension: usize) -> DVector<N>
Creates an uninitialized vector.
impl<N: Clone> DVector<N>
[src]
fn from_element(dimension: usize, elem: N) -> DVector<N>
Builds a vector filled with a constant.
fn from_slice(dimension: usize, vector: &[N]) -> DVector<N>
Builds a vector filled with the components provided by a vector.
The vector must have at least dimension
elements.
impl<N> DVector<N>
[src]
fn from_fn<F: FnMut(usize) -> N>(dimension: usize, f: F) -> DVector<N>
Builds a vector filled with the results of a function applied to each of its component coordinates.
fn len(&self) -> usize
The vector length.
impl<N: Zero + Copy + Clone> DVector<N>
[src]
impl<N: Zero + Copy + Clone> DVector<N>
[src]
impl<N: One + Zero + Copy + Clone> DVector<N>
[src]
impl<N: Rand + Zero> DVector<N>
[src]
fn new_random(dimension: usize) -> DVector<N>
Builds a vector filled with random values.
impl<N: BaseFloat + ApproxEq<N>> DVector<N>
[src]
fn canonical_basis_with_dimension(dimension: usize) -> Vec<DVector<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<DVector<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.
Trait Implementations
impl<N> Mul<DMatrix<N>> for DVector<N> where N: Copy + Add<N, Output=N> + Mul<N, Output=N> + Zero
[src]
type Output = DVector<N>
The resulting type after applying the *
operator
fn mul(self, right: DMatrix<N>) -> DVector<N>
The method for the *
operator
impl<'a, N> Mul<DMatrix<N>> for &'a DVector<N> where N: Copy + Add<N, Output=N> + Mul<N, Output=N> + Zero
[src]
type Output = DVector<N>
The resulting type after applying the *
operator
fn mul(self, right: DMatrix<N>) -> DVector<N>
The method for the *
operator
impl<'a, N> Mul<&'a DMatrix<N>> for DVector<N> where N: Copy + Add<N, Output=N> + Mul<N, Output=N> + Zero
[src]
type Output = DVector<N>
The resulting type after applying the *
operator
fn mul(self, right: &'a DMatrix<N>) -> DVector<N>
The method for the *
operator
impl<'a, 'b, N> Mul<&'b DMatrix<N>> for &'a DVector<N> where N: Copy + Add<N, Output=N> + Mul<N, Output=N> + Zero
[src]
type Output = DVector<N>
The resulting type after applying the *
operator
fn mul(self, right: &'b DMatrix<N>) -> DVector<N>
The method for the *
operator
impl<N> MulAssign<DMatrix<N>> for DVector<N> where N: Copy + Mul<N, Output=N> + Add<N, Output=N> + Zero
[src]
fn mul_assign(&mut self, right: DMatrix<N>)
The method for the *=
operator
impl<'a, N> MulAssign<&'a DMatrix<N>> for DVector<N> where N: Copy + Mul<N, Output=N> + Add<N, Output=N> + Zero
[src]
fn mul_assign(&mut self, right: &'a DMatrix<N>)
The method for the *=
operator
impl<N: Eq> Eq for DVector<N>
[src]
impl<N: PartialEq> PartialEq for DVector<N>
[src]
fn eq(&self, __arg_0: &DVector<N>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &DVector<N>) -> bool
This method tests for !=
.
impl<N: Debug> Debug for DVector<N>
[src]
impl<N: Clone> Clone for DVector<N>
[src]
fn clone(&self) -> DVector<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> FromIterator<N> for DVector<N>
[src]
fn from_iter<I: IntoIterator<Item=N>>(param: I) -> DVector<N>
Creates a value from an iterator. Read more
impl<N: Copy + BaseNum> Outer for DVector<N>
[src]
type OuterProductType = DMatrix<N>
Result type of the outer product.
fn outer(&self, other: &DVector<N>) -> DMatrix<N>
Computes the outer product: a * b
impl<N> AsRef<[N]> for DVector<N>
[src]
impl<N> AsMut<[N]> for DVector<N>
[src]
impl<N> Shape<usize> for DVector<N>
[src]
impl<N: Copy> Indexable<usize, N> for DVector<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 DVector<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 DVector<N> where [N]: IndexMut<T>
[src]
impl<N> Iterable<N> for DVector<N>
[src]
impl<N> IterableMut<N> for DVector<N>
[src]
impl<N: Copy + Add<N, Output=N> + Mul<N, Output=N>> Axpy<N> for DVector<N>
[src]
impl<N: Copy + Mul<N, Output=N> + Zero> Mul<DVector<N>> for DVector<N>
[src]
type Output = DVector<N>
The resulting type after applying the *
operator
fn mul(self, right: DVector<N>) -> DVector<N>
The method for the *
operator
impl<N: Copy + Mul<N, Output=N> + Zero> Mul<N> for DVector<N>
[src]
type Output = DVector<N>
The resulting type after applying the *
operator
fn mul(self, right: N) -> DVector<N>
The method for the *
operator
impl<N> MulAssign<DVector<N>> for DVector<N> where N: Copy + MulAssign<N> + Zero
[src]
fn mul_assign(&mut self, right: DVector<N>)
The method for the *=
operator
impl<N> MulAssign<N> for DVector<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<DVector<N>> for DVector<N>
[src]
type Output = DVector<N>
The resulting type after applying the /
operator
fn div(self, right: DVector<N>) -> DVector<N>
The method for the /
operator
impl<N: Copy + Div<N, Output=N> + Zero> Div<N> for DVector<N>
[src]
type Output = DVector<N>
The resulting type after applying the /
operator
fn div(self, right: N) -> DVector<N>
The method for the /
operator
impl<N> DivAssign<DVector<N>> for DVector<N> where N: Copy + DivAssign<N> + Zero
[src]
fn div_assign(&mut self, right: DVector<N>)
The method for the /=
operator
impl<N> DivAssign<N> for DVector<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<DVector<N>> for DVector<N>
[src]
type Output = DVector<N>
The resulting type after applying the +
operator
fn add(self, right: DVector<N>) -> DVector<N>
The method for the +
operator
impl<N: Copy + Add<N, Output=N> + Zero> Add<N> for DVector<N>
[src]
type Output = DVector<N>
The resulting type after applying the +
operator
fn add(self, right: N) -> DVector<N>
The method for the +
operator
impl<N> AddAssign<DVector<N>> for DVector<N> where N: Copy + AddAssign<N> + Zero
[src]
fn add_assign(&mut self, right: DVector<N>)
The method for the +=
operator
impl<N> AddAssign<N> for DVector<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<DVector<N>> for DVector<N>
[src]
type Output = DVector<N>
The resulting type after applying the -
operator
fn sub(self, right: DVector<N>) -> DVector<N>
The method for the -
operator
impl<N: Copy + Sub<N, Output=N> + Zero> Sub<N> for DVector<N>
[src]
type Output = DVector<N>
The resulting type after applying the -
operator
fn sub(self, right: N) -> DVector<N>
The method for the -
operator
impl<N> SubAssign<DVector<N>> for DVector<N> where N: Copy + SubAssign<N> + Zero
[src]
fn sub_assign(&mut self, right: DVector<N>)
The method for the -=
operator
impl<N> SubAssign<N> for DVector<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 DVector<N>
[src]
type Output = DVector<N>
The resulting type after applying the -
operator
fn neg(self) -> DVector<N>
The method for the unary -
operator
impl<N: BaseNum> Dot<N> for DVector<N>
[src]
impl<N: BaseFloat> Norm<N> for DVector<N>
[src]
fn norm_squared(&self) -> N
Computes the squared norm of self
. Read more
fn normalize(&self) -> DVector<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 DVector<N>
[src]
impl<N: ApproxEq<N>> ApproxEq<N> for DVector<N>
[src]
fn approx_epsilon(_: Option<DVector<N>>) -> N
Default epsilon for approximation.
fn approx_ulps(_: Option<DVector<N>>) -> u32
Default ULPs for approximation.
fn approx_eq_eps(&self, other: &DVector<N>, epsilon: &N) -> bool
Tests approximate equality using a custom epsilon.
fn approx_eq_ulps(&self, other: &DVector<N>, ulps: u32) -> bool
Tests approximate equality using units in the last place (ULPs)
fn approx_eq(&self, other: &Self) -> bool
Tests approximate equality.