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]
fn iamax(&self) -> usize
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>,
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>,
SB: Storage<N, D2>,
ShapeConstraint: DimEq<D, D2>,
Computes self = a * x + b * self
.
If be is zero, self
is never read from.
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>,
&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.
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>,
&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]
unsafe fn vget_unchecked(&self, i: usize) -> &N
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]
unsafe fn vget_unchecked_mut(&mut self, i: usize) -> &mut N
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]
fn to_homogeneous(&self) -> VectorN<N, DimSum<D, U1>> where
DefaultAllocator: Allocator<N, DimSum<D, U1>>,
DefaultAllocator: Allocator<N, DimSum<D, U1>>,
Computes the coordinates in projective space of this vector, i.e., appends a 0
to its
coordinates.
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>,
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.