Type Definition nalgebra::core::Vector
[−]
[src]
type Vector<N, D, S> = Matrix<N, D, U1, S>;
A matrix with one column and D
rows.
Methods
impl<N: Scalar + PartialOrd + Signed, D: Dim, S: Storage<N, D>> Vector<N, D, S>
[src]
pub fn iamax(&self) -> usize
[src]
Computes the index of the vector component with the largest absolute value.
impl<N, D: Dim, S> Vector<N, D, S> where
N: Scalar + Zero + ClosedAdd + ClosedMul,
S: StorageMut<N, D>,
[src]
N: Scalar + Zero + ClosedAdd + ClosedMul,
S: StorageMut<N, D>,
pub fn axpy<D2: Dim, SB>(&mut self, a: N, x: &Vector<N, D2, SB>, b: N) where
SB: Storage<N, D2>,
ShapeConstraint: DimEq<D, D2>,
[src]
SB: Storage<N, D2>,
ShapeConstraint: DimEq<D, D2>,
Computes self = a * x + b * self
.
If be is zero, self
is never read from.
pub fn gemv<R2: Dim, C2: Dim, D3: Dim, SB, SC>(
&mut self,
alpha: N,
a: &Matrix<N, R2, C2, SB>,
x: &Vector<N, D3, SC>,
beta: N
) where
N: One,
SB: Storage<N, R2, C2>,
SC: Storage<N, D3>,
ShapeConstraint: DimEq<D, R2> + AreMultipliable<R2, C2, D3, U1>,
[src]
&mut self,
alpha: N,
a: &Matrix<N, R2, C2, SB>,
x: &Vector<N, D3, SC>,
beta: N
) where
N: One,
SB: Storage<N, R2, C2>,
SC: Storage<N, D3>,
ShapeConstraint: DimEq<D, R2> + AreMultipliable<R2, C2, D3, U1>,
Computes self = alpha * a * x + beta * self
, where a
is a matrix, x
a vector, and
alpha, beta
two scalars.
If beta
is zero, self
is never read.
pub fn gemv_symm<D2: Dim, D3: Dim, SB, SC>(
&mut self,
alpha: N,
a: &Matrix<N, D2, D2, SB>,
x: &Vector<N, D3, SC>,
beta: N
) where
N: One,
SB: Storage<N, D2, D2>,
SC: Storage<N, D3>,
ShapeConstraint: DimEq<D, D2> + AreMultipliable<D2, D2, D3, U1>,
[src]
&mut self,
alpha: N,
a: &Matrix<N, D2, D2, SB>,
x: &Vector<N, D3, SC>,
beta: N
) where
N: One,
SB: Storage<N, D2, D2>,
SC: Storage<N, D3>,
ShapeConstraint: DimEq<D, D2> + AreMultipliable<D2, D2, D3, U1>,
Computes self = alpha * a * x + beta * self
, where a
is a symmetric matrix, x
a
vector, and alpha, beta
two scalars.
If beta
is zero, self
is never read. If self
is read, only its lower-triangular part
(including the diagonal) is actually read.
impl<N: Scalar, D: Dim, S: Storage<N, D>> Vector<N, D, S>
[src]
ⓘImportant traits for &'a mut Ipub unsafe fn vget_unchecked(&self, i: usize) -> &N
[src]
Gets a reference to the i-th element of this column vector without bound checking.
impl<N: Scalar, D: Dim, S: StorageMut<N, D>> Vector<N, D, S>
[src]
ⓘImportant traits for &'a mut Ipub unsafe fn vget_unchecked_mut(&mut self, i: usize) -> &mut N
[src]
Gets a mutable reference to the i-th element of this column vector without bound checking.
impl<N: Scalar + Zero, D: DimAdd<U1>, S: Storage<N, D>> Vector<N, D, S>
[src]
pub fn to_homogeneous(&self) -> VectorN<N, DimSum<D, U1>> where
DefaultAllocator: Allocator<N, DimSum<D, U1>>,
[src]
DefaultAllocator: Allocator<N, DimSum<D, U1>>,
Computes the coordinates in projective space of this vector, i.e., appends a 0
to its
coordinates.
pub fn from_homogeneous<SB>(
v: Vector<N, DimSum<D, U1>, SB>
) -> Option<VectorN<N, D>> where
SB: Storage<N, DimSum<D, U1>>,
DefaultAllocator: Allocator<N, D>,
[src]
v: Vector<N, DimSum<D, U1>, SB>
) -> Option<VectorN<N, D>> where
SB: Storage<N, DimSum<D, U1>>,
DefaultAllocator: Allocator<N, D>,
Constructs a vector from coordinates in projective space, i.e., removes a 0
at the end of
self
. Returns None
if this last component is not zero.
Trait Implementations
impl<'a, 'b, N, D1: DimName, D2: Dim, SB: Storage<N, D2>> Sub<&'b Vector<N, D2, SB>> for &'a Point<N, D1> where
N: Scalar + ClosedSub,
DefaultAllocator: Allocator<N, D1, U1> + Allocator<N, D2, U1> + SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>,
[src]
N: Scalar + ClosedSub,
DefaultAllocator: Allocator<N, D1, U1> + Allocator<N, D2, U1> + SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>,
type Output = Point<N, D1>
The resulting type after applying the -
operator.
fn sub(self, right: &'b Vector<N, D2, SB>) -> Self::Output
[src]
Performs the -
operation.
impl<'a, N, D1: DimName, D2: Dim, SB: Storage<N, D2>> Sub<Vector<N, D2, SB>> for &'a Point<N, D1> where
N: Scalar + ClosedSub,
DefaultAllocator: Allocator<N, D1, U1> + Allocator<N, D2, U1> + SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>,
[src]
N: Scalar + ClosedSub,
DefaultAllocator: Allocator<N, D1, U1> + Allocator<N, D2, U1> + SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>,
type Output = Point<N, D1>
The resulting type after applying the -
operator.
fn sub(self, right: Vector<N, D2, SB>) -> Self::Output
[src]
Performs the -
operation.
impl<'b, N, D1: DimName, D2: Dim, SB: Storage<N, D2>> Sub<&'b Vector<N, D2, SB>> for Point<N, D1> where
N: Scalar + ClosedSub,
DefaultAllocator: Allocator<N, D1, U1> + Allocator<N, D2, U1> + SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>,
[src]
N: Scalar + ClosedSub,
DefaultAllocator: Allocator<N, D1, U1> + Allocator<N, D2, U1> + SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>,
type Output = Point<N, D1>
The resulting type after applying the -
operator.
fn sub(self, right: &'b Vector<N, D2, SB>) -> Self::Output
[src]
Performs the -
operation.
impl<N, D1: DimName, D2: Dim, SB: Storage<N, D2>> Sub<Vector<N, D2, SB>> for Point<N, D1> where
N: Scalar + ClosedSub,
DefaultAllocator: Allocator<N, D1, U1> + Allocator<N, D2, U1> + SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>,
[src]
N: Scalar + ClosedSub,
DefaultAllocator: Allocator<N, D1, U1> + Allocator<N, D2, U1> + SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>,
type Output = Point<N, D1>
The resulting type after applying the -
operator.
fn sub(self, right: Vector<N, D2, SB>) -> Self::Output
[src]
Performs the -
operation.
impl<'a, 'b, N, D1: DimName, D2: Dim, SB: Storage<N, D2>> Add<&'b Vector<N, D2, SB>> for &'a Point<N, D1> where
N: Scalar + ClosedAdd,
DefaultAllocator: Allocator<N, D1, U1> + Allocator<N, D2, U1> + SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>,
[src]
N: Scalar + ClosedAdd,
DefaultAllocator: Allocator<N, D1, U1> + Allocator<N, D2, U1> + SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>,
type Output = Point<N, D1>
The resulting type after applying the +
operator.
fn add(self, right: &'b Vector<N, D2, SB>) -> Self::Output
[src]
Performs the +
operation.
impl<'a, N, D1: DimName, D2: Dim, SB: Storage<N, D2>> Add<Vector<N, D2, SB>> for &'a Point<N, D1> where
N: Scalar + ClosedAdd,
DefaultAllocator: Allocator<N, D1, U1> + Allocator<N, D2, U1> + SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>,
[src]
N: Scalar + ClosedAdd,
DefaultAllocator: Allocator<N, D1, U1> + Allocator<N, D2, U1> + SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>,
type Output = Point<N, D1>
The resulting type after applying the +
operator.
fn add(self, right: Vector<N, D2, SB>) -> Self::Output
[src]
Performs the +
operation.
impl<'b, N, D1: DimName, D2: Dim, SB: Storage<N, D2>> Add<&'b Vector<N, D2, SB>> for Point<N, D1> where
N: Scalar + ClosedAdd,
DefaultAllocator: Allocator<N, D1, U1> + Allocator<N, D2, U1> + SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>,
[src]
N: Scalar + ClosedAdd,
DefaultAllocator: Allocator<N, D1, U1> + Allocator<N, D2, U1> + SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>,
type Output = Point<N, D1>
The resulting type after applying the +
operator.
fn add(self, right: &'b Vector<N, D2, SB>) -> Self::Output
[src]
Performs the +
operation.
impl<N, D1: DimName, D2: Dim, SB: Storage<N, D2>> Add<Vector<N, D2, SB>> for Point<N, D1> where
N: Scalar + ClosedAdd,
DefaultAllocator: Allocator<N, D1, U1> + Allocator<N, D2, U1> + SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>,
[src]
N: Scalar + ClosedAdd,
DefaultAllocator: Allocator<N, D1, U1> + Allocator<N, D2, U1> + SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>,
type Output = Point<N, D1>
The resulting type after applying the +
operator.
fn add(self, right: Vector<N, D2, SB>) -> Self::Output
[src]
Performs the +
operation.
impl<'b, N, D1: DimName, D2: Dim, SB> AddAssign<&'b Vector<N, D2, SB>> for Point<N, D1> where
N: Scalar + ClosedAdd,
SB: Storage<N, D2>,
DefaultAllocator: Allocator<N, D1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
[src]
N: Scalar + ClosedAdd,
SB: Storage<N, D2>,
DefaultAllocator: Allocator<N, D1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
fn add_assign(&mut self, right: &'b Vector<N, D2, SB>)
[src]
Performs the +=
operation.
impl<N, D1: DimName, D2: Dim, SB> AddAssign<Vector<N, D2, SB>> for Point<N, D1> where
N: Scalar + ClosedAdd,
SB: Storage<N, D2>,
DefaultAllocator: Allocator<N, D1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
[src]
N: Scalar + ClosedAdd,
SB: Storage<N, D2>,
DefaultAllocator: Allocator<N, D1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
fn add_assign(&mut self, right: Vector<N, D2, SB>)
[src]
Performs the +=
operation.
impl<'b, N, D1: DimName, D2: Dim, SB> SubAssign<&'b Vector<N, D2, SB>> for Point<N, D1> where
N: Scalar + ClosedSub,
SB: Storage<N, D2>,
DefaultAllocator: Allocator<N, D1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
[src]
N: Scalar + ClosedSub,
SB: Storage<N, D2>,
DefaultAllocator: Allocator<N, D1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
fn sub_assign(&mut self, right: &'b Vector<N, D2, SB>)
[src]
Performs the -=
operation.
impl<N, D1: DimName, D2: Dim, SB> SubAssign<Vector<N, D2, SB>> for Point<N, D1> where
N: Scalar + ClosedSub,
SB: Storage<N, D2>,
DefaultAllocator: Allocator<N, D1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
[src]
N: Scalar + ClosedSub,
SB: Storage<N, D2>,
DefaultAllocator: Allocator<N, D1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
fn sub_assign(&mut self, right: Vector<N, D2, SB>)
[src]
Performs the -=
operation.
impl<'a, 'b, N: Real, SB: Storage<N, U3>> Mul<&'b Vector<N, U3, SB>> for &'a UnitQuaternion<N> where
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U3, U1>,
[src]
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U3, U1>,
type Output = Vector3<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Vector<N, U3, SB>) -> Self::Output
[src]
Performs the *
operation.
impl<'a, N: Real, SB: Storage<N, U3>> Mul<Vector<N, U3, SB>> for &'a UnitQuaternion<N> where
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U3, U1>,
[src]
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U3, U1>,
type Output = Vector3<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: Vector<N, U3, SB>) -> Self::Output
[src]
Performs the *
operation.
impl<'b, N: Real, SB: Storage<N, U3>> Mul<&'b Vector<N, U3, SB>> for UnitQuaternion<N> where
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U3, U1>,
[src]
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U3, U1>,
type Output = Vector3<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Vector<N, U3, SB>) -> Self::Output
[src]
Performs the *
operation.
impl<N: Real, SB: Storage<N, U3>> Mul<Vector<N, U3, SB>> for UnitQuaternion<N> where
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U3, U1>,
[src]
DefaultAllocator: Allocator<N, U4, U1> + Allocator<N, U3, U1>,
type Output = Vector3<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: Vector<N, U3, SB>) -> Self::Output
[src]
Performs the *
operation.
impl<N: Real, S: Storage<N, U2>> Mul<Vector<N, U2, S>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Vector2<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: Vector<N, U2, S>) -> Self::Output
[src]
Performs the *
operation.
impl<'a, N: Real, S: Storage<N, U2>> Mul<Vector<N, U2, S>> for &'a UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Vector2<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: Vector<N, U2, S>) -> Self::Output
[src]
Performs the *
operation.
impl<'b, N: Real, S: Storage<N, U2>> Mul<&'b Vector<N, U2, S>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Vector2<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Vector<N, U2, S>) -> Self::Output
[src]
Performs the *
operation.
impl<'a, 'b, N: Real, S: Storage<N, U2>> Mul<&'b Vector<N, U2, S>> for &'a UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,