Struct nalgebra::DMatrix4
[−]
[src]
pub struct DMatrix4<N> { /* fields omitted */ }
A stack-allocated dynamically sized square or rectangular matrix with at most 4 rows and columns.
Methods
impl<N: Zero + Clone + Copy> DMatrix4<N>
[src]
fn new_zeros(nrows: usize, ncols: usize) -> DMatrix4<N>
Builds a matrix filled with zeros.
Arguments
dimension
- The dimension of the matrix. Adimension
-dimensional matrix containsdimension * dimension
components.
fn is_zero(&self) -> bool
Tests if all components of the matrix are zeroes.
fn reset(&mut self)
Set this matrix components to zero.
impl<N: Zero + Copy + Rand> DMatrix4<N>
[src]
fn new_random(nrows: usize, ncols: usize) -> DMatrix4<N>
Builds a matrix filled with random values.
impl<N: One + Zero + Clone + Copy> DMatrix4<N>
[src]
fn new_ones(nrows: usize, ncols: usize) -> DMatrix4<N>
Builds a matrix filled with a given constant.
impl<N> DMatrix4<N>
[src]
fn nrows(&self) -> usize
The number of row on the matrix.
fn ncols(&self) -> usize
The number of columns on the matrix.
fn as_vector(&self) -> &[N]
Gets a reference to this matrix data. The returned vector contains the matrix data in column-major order.
fn as_mut_vector(&mut self) -> &mut [N]
Gets a mutable reference to this matrix data. The returned vector contains the matrix data in column-major order.
impl<N: Zero + Clone + Copy> DMatrix4<N>
[src]
fn from_element(nrows: usize, ncols: usize, elem: N) -> DMatrix4<N>
Builds a matrix filled with a given constant.
fn from_row_vector(nrows: usize, ncols: usize, vector: &[N]) -> DMatrix4<N>
Builds a matrix filled with the components provided by a vector.
The vector contains the matrix data in row-major order.
Note that from_column_vector
is a lot faster than from_row_vector
since a $dmatrix
stores its data
in column-major order.
The vector must have at least nrows * ncols
elements.
fn from_column_vector(nrows: usize, ncols: usize, vector: &[N]) -> DMatrix4<N>
Builds a matrix filled with the components provided by a vector.
The vector contains the matrix data in column-major order.
Note that from_column_vector
is a lot faster than from_row_vector
since a $dmatrix
stores its data
in column-major order.
The vector must have at least nrows * ncols
elements.
fn from_fn<F: FnMut(usize, usize) -> N>(nrows: usize, ncols: usize, f: F) -> DMatrix4<N>
Builds a matrix using an initialization function.
impl<N: Copy> DMatrix4<N>
[src]
unsafe fn new_uninitialized(nrows: usize, ncols: usize) -> DMatrix4<N>
Creates a new matrix with uninitialized components (with mem::uninitialized()
).
Trait Implementations
impl<N: PartialEq> PartialEq for DMatrix4<N>
[src]
fn eq(&self, other: &DMatrix4<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 DMatrix4<N>
[src]
fn clone(&self) -> DMatrix4<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: One + Zero + Clone + Copy> Eye for DMatrix4<N>
[src]
fn new_identity(dimension: usize) -> DMatrix4<N>
Builds an identity matrix.
Arguments
dimension
- The dimension of the matrix. Adimension
-dimensional matrix containsdimension * dimension
components.
impl<N: Copy> Indexable<(usize, usize), N> for DMatrix4<N>
[src]
unsafe fn unsafe_set(&mut self, rowcol: (usize, usize), val: N)
Just like set
without bounds checking.
unsafe fn unsafe_at(&self, rowcol: (usize, usize)) -> N
Just like at
without bounds checking.
fn swap(&mut self, rowcol1: (usize, usize), rowcol2: (usize, usize))
Swaps the i
-th element of self
with its j
-th element.
impl<N> Shape<(usize, usize)> for DMatrix4<N>
[src]
impl<N> Index<(usize, usize)> for DMatrix4<N>
[src]
type Output = N
The returned type after indexing
fn index(&self, (i, j): (usize, usize)) -> &N
The method for the indexing (Foo[Bar]
) operation
impl<N> IndexMut<(usize, usize)> for DMatrix4<N>
[src]
fn index_mut(&mut self, (i, j): (usize, usize)) -> &mut N
The method for the indexing (Foo[Bar]
) operation
impl<N> Mul<DMatrix4<N>> for DMatrix4<N> where N: Copy + Mul<N, Output=N> + Add<N, Output=N> + Zero
[src]
type Output = DMatrix4<N>
The resulting type after applying the *
operator
fn mul(self, right: DMatrix4<N>) -> DMatrix4<N>
The method for the *
operator
impl<'a, N> Mul<&'a DMatrix4<N>> for DMatrix4<N> where N: Copy + Mul<N, Output=N> + Add<N, Output=N> + Zero
[src]
type Output = DMatrix4<N>
The resulting type after applying the *
operator
fn mul(self, right: &'a DMatrix4<N>) -> DMatrix4<N>
The method for the *
operator
impl<'a, N> Mul<DMatrix4<N>> for &'a DMatrix4<N> where N: Copy + Mul<N, Output=N> + Add<N, Output=N> + Zero
[src]
type Output = DMatrix4<N>
The resulting type after applying the *
operator
fn mul(self, right: DMatrix4<N>) -> DMatrix4<N>
The method for the *
operator
impl<'a, 'b, N> Mul<&'b DMatrix4<N>> for &'a DMatrix4<N> where N: Copy + Mul<N, Output=N> + Add<N, Output=N> + Zero
[src]
type Output = DMatrix4<N>
The resulting type after applying the *
operator
fn mul(self, right: &DMatrix4<N>) -> DMatrix4<N>
The method for the *
operator
impl<N> MulAssign<DMatrix4<N>> for DMatrix4<N> where N: Copy + Mul<N, Output=N> + Add<N, Output=N> + Zero
[src]
fn mul_assign(&mut self, right: DMatrix4<N>)
The method for the *=
operator
impl<'a, N> MulAssign<&'a DMatrix4<N>> for DMatrix4<N> where N: Copy + Mul<N, Output=N> + Add<N, Output=N> + Zero
[src]
fn mul_assign(&mut self, right: &'a DMatrix4<N>)
The method for the *=
operator
impl<N> Mul<DVector4<N>> for DMatrix4<N> where N: Copy + Add<N, Output=N> + Mul<N, Output=N> + Zero
[src]
type Output = DVector4<N>
The resulting type after applying the *
operator
fn mul(self, right: DVector4<N>) -> DVector4<N>
The method for the *
operator
impl<'a, N> Mul<DVector4<N>> for &'a DMatrix4<N> where N: Copy + Add<N, Output=N> + Mul<N, Output=N> + Zero
[src]
type Output = DVector4<N>
The resulting type after applying the *
operator
fn mul(self, right: DVector4<N>) -> DVector4<N>
The method for the *
operator
impl<'a, N> Mul<&'a DVector4<N>> for DMatrix4<N> where N: Copy + Add<N, Output=N> + Mul<N, Output=N> + Zero
[src]
type Output = DVector4<N>
The resulting type after applying the *
operator
fn mul(self, right: &'a DVector4<N>) -> DVector4<N>
The method for the *
operator
impl<'a, 'b, N> Mul<&'b DVector4<N>> for &'a DMatrix4<N> where N: Copy + Add<N, Output=N> + Mul<N, Output=N> + Zero
[src]
type Output = DVector4<N>
The resulting type after applying the *
operator
fn mul(self, right: &'b DVector4<N>) -> DVector4<N>
The method for the *
operator
impl<N: Copy + Add<N, Output=N>> Add<DMatrix4<N>> for DMatrix4<N>
[src]
type Output = DMatrix4<N>
The resulting type after applying the +
operator
fn add(self, right: DMatrix4<N>) -> DMatrix4<N>
The method for the +
operator
impl<'a, N: Copy + Add<N, Output=N>> Add<DMatrix4<N>> for &'a DMatrix4<N>
[src]
type Output = DMatrix4<N>
The resulting type after applying the +
operator
fn add(self, right: DMatrix4<N>) -> DMatrix4<N>
The method for the +
operator
impl<'a, N: Copy + Add<N, Output=N>> Add<&'a DMatrix4<N>> for DMatrix4<N>
[src]
type Output = DMatrix4<N>
The resulting type after applying the +
operator
fn add(self, right: &'a DMatrix4<N>) -> DMatrix4<N>
The method for the +
operator
impl<N: Copy + AddAssign<N>> AddAssign<DMatrix4<N>> for DMatrix4<N>
[src]
fn add_assign(&mut self, right: DMatrix4<N>)
The method for the +=
operator
impl<'a, N: Copy + AddAssign<N>> AddAssign<&'a DMatrix4<N>> for DMatrix4<N>
[src]
fn add_assign(&mut self, right: &'a DMatrix4<N>)
The method for the +=
operator
impl<N: Copy + Sub<N, Output=N>> Sub<N> for DMatrix4<N>
[src]
type Output = DMatrix4<N>
The resulting type after applying the -
operator
fn sub(self, right: N) -> DMatrix4<N>
The method for the -
operator
impl<'a, N: Copy + SubAssign<N>> SubAssign<N> for DMatrix4<N>
[src]
fn sub_assign(&mut self, right: N)
The method for the -=
operator
impl<N: Copy + Sub<N, Output=N>> Sub<DMatrix4<N>> for DMatrix4<N>
[src]
type Output = DMatrix4<N>
The resulting type after applying the -
operator
fn sub(self, right: DMatrix4<N>) -> DMatrix4<N>
The method for the -
operator
impl<'a, N: Copy + Sub<N, Output=N>> Sub<DMatrix4<N>> for &'a DMatrix4<N>
[src]
type Output = DMatrix4<N>
The resulting type after applying the -
operator
fn sub(self, right: DMatrix4<N>) -> DMatrix4<N>
The method for the -
operator
impl<'a, N: Copy + Sub<N, Output=N>> Sub<&'a DMatrix4<N>> for DMatrix4<N>
[src]
type Output = DMatrix4<N>
The resulting type after applying the -
operator
fn sub(self, right: &'a DMatrix4<N>) -> DMatrix4<N>
The method for the -
operator
impl<N: Copy + SubAssign<N>> SubAssign<DMatrix4<N>> for DMatrix4<N>
[src]
fn sub_assign(&mut self, right: DMatrix4<N>)
The method for the -=
operator
impl<'a, N: Copy + SubAssign<N>> SubAssign<&'a DMatrix4<N>> for DMatrix4<N>
[src]
fn sub_assign(&mut self, right: &'a DMatrix4<N>)
The method for the -=
operator
impl<N: BaseNum + Clone> Inverse for DMatrix4<N>
[src]
fn inverse(&self) -> Option<DMatrix4<N>>
Returns the inverse of m
.
fn inverse_mut(&mut self) -> bool
In-place version of inverse
.
impl<N: Clone + Copy> Transpose for DMatrix4<N>
[src]
fn transpose(&self) -> DMatrix4<N>
Computes the transpose of a matrix.
fn transpose_mut(&mut self)
In-place version of transposed
.
impl<N: BaseNum + Cast<f64> + Clone> Mean<DVector4<N>> for DMatrix4<N>
[src]
impl<N: BaseNum + Cast<f64> + Clone> Covariance<DMatrix4<N>> for DMatrix4<N>
[src]
fn covariance(&self) -> DMatrix4<N>
Computes the covariance of the obsevations stored by m
: Read more
fn covariance_to(&self, out: &mut M)
Computes the covariance of the obsevations stored by m
: Read more
impl<N: Copy + Zero> Column<DVector4<N>> for DMatrix4<N>
[src]
fn ncols(&self) -> usize
The number of column of this matrix or vector.
fn set_column(&mut self, column_id: usize, column: DVector4<N>)
Writes the i
-th column of self
.
fn column(&self, column_id: usize) -> DVector4<N>
Reads the i
-th column of self
.
impl<N: Copy + Clone + Zero> ColumnSlice<DVector4<N>> for DMatrix4<N>
[src]
fn column_slice(&self, column_id: usize, row_start: usize, row_end: usize) -> DVector4<N>
Returns a view to a slice of a column of a matrix.
impl<N: Copy + Zero> Row<DVector4<N>> for DMatrix4<N>
[src]
fn nrows(&self) -> usize
The number of column of self
.
fn set_row(&mut self, row_id: usize, row: DVector4<N>)
Writes the i
-th row of self
.
fn row(&self, row_id: usize) -> DVector4<N>
Reads the i
-th row of self
.
impl<N: Copy> RowSlice<DVector4<N>> for DMatrix4<N>
[src]
fn row_slice(&self, row_id: usize, column_start: usize, column_end: usize) -> DVector4<N>
Returns a view to a slice of a row of a matrix.
impl<N: Copy + Clone + Zero> Diagonal<DVector4<N>> for DMatrix4<N>
[src]
fn from_diagonal(diagonal: &DVector4<N>) -> DMatrix4<N>
Creates a new matrix with the given diagonal.
fn diagonal(&self) -> DVector4<N>
The diagonal of this matrix.
impl<N: ApproxEq<N>> ApproxEq<N> for DMatrix4<N>
[src]
fn approx_epsilon(_: Option<DMatrix4<N>>) -> N
Default epsilon for approximation.
fn approx_ulps(_: Option<DMatrix4<N>>) -> u32
Default ULPs for approximation.
fn approx_eq_eps(&self, other: &DMatrix4<N>, epsilon: &N) -> bool
Tests approximate equality using a custom epsilon.
fn approx_eq_ulps(&self, other: &DMatrix4<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: Debug + Copy> Debug for DMatrix4<N>
[src]
impl<N: Copy + Mul<N, Output=N>> Mul<N> for DMatrix4<N>
[src]
type Output = DMatrix4<N>
The resulting type after applying the *
operator
fn mul(self, right: N) -> DMatrix4<N>
The method for the *
operator
impl<N: Copy + Div<N, Output=N>> Div<N> for DMatrix4<N>
[src]
type Output = DMatrix4<N>
The resulting type after applying the /
operator
fn div(self, right: N) -> DMatrix4<N>
The method for the /
operator