Struct nalgebra::DMat6 [] [src]

pub struct DMat6<N> {
    // some fields omitted
}

A stack-allocated dynamically sized square or rectangular matrix with at most 6 rows and columns.

Methods

impl<N: Zero + Clone + Copy> DMat6<N>
[src]

fn new_zeros(nrows: usize, ncols: usize) -> DMat6<N>

Builds a matrix filled with zeros.

Arguments

  • dim - The dimension of the matrix. A dim-dimensional matrix contains dim * dim 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> DMat6<N>
[src]

fn new_random(nrows: usize, ncols: usize) -> DMat6<N>

Builds a matrix filled with random values.

impl<N: One + Zero + Clone + Copy> DMat6<N>
[src]

fn new_ones(nrows: usize, ncols: usize) -> DMat6<N>

Builds a matrix filled with a given constant.

impl<N> DMat6<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_vec(&self) -> &[N]

Gets a reference to this matrix data. The returned vector contains the matrix data in column-major order.

fn as_mut_vec(&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> DMat6<N>
[src]

fn from_elem(nrows: usize, ncols: usize, elem: N) -> DMat6<N>

Builds a matrix filled with a given constant.

fn from_row_vec(nrows: usize, ncols: usize, vec: &[N]) -> DMat6<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_col_vec is a lot faster than from_row_vec since a $dmat stores its data in column-major order.

The vector must have at least nrows * ncols elements.

fn from_col_vec(nrows: usize, ncols: usize, vec: &[N]) -> DMat6<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_col_vec is a lot faster than from_row_vec since a $dmat 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) -> DMat6<N>

Builds a matrix using an initialization function.

impl<N: Copy> DMat6<N>
[src]

unsafe fn new_uninitialized(nrows: usize, ncols: usize) -> DMat6<N>

Creates a new matrix with uninitialized components (with mem::uninitialized()).

Trait Implementations

impl<N: PartialEq> PartialEq for DMat6<N>
[src]

fn eq(&self, other: &DMat6<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 DMat6<N>
[src]

fn clone(&self) -> DMat6<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 DMat6<N>
[src]

fn new_identity(dim: usize) -> DMat6<N>

Builds an identity matrix.

Arguments

  • dim - The dimension of the matrix. A dim-dimensional matrix contains dim * dim components.

impl<N: Copy> Indexable<(usize, usize), N> for DMat6<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 DMat6<N>
[src]

fn shape(&self) -> (usize, usize)

Returns the shape of an indexable object.

impl<N> Index<(usize, usize)> for DMat6<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 DMat6<N>
[src]

fn index_mut(&mut self, (i, j): (usize, usize)) -> &mut N

The method for the indexing (Foo[Bar]) operation

impl<N: Copy + Mul<N, Output=N> + Add<N, Output=N> + Zero> Mul<DMat6<N>> for DMat6<N>
[src]

type Output = DMat6<N>

The resulting type after applying the * operator

fn mul(self, right: DMat6<N>) -> DMat6<N>

The method for the * operator

impl<'a, N: Copy + Mul<N, Output=N> + Add<N, Output=N> + Zero> Mul<&'a DMat6<N>> for DMat6<N>
[src]

type Output = DMat6<N>

The resulting type after applying the * operator

fn mul(self, right: &'a DMat6<N>) -> DMat6<N>

The method for the * operator

impl<'a, N: Copy + Mul<N, Output=N> + Add<N, Output=N> + Zero> Mul<DMat6<N>> for &'a DMat6<N>
[src]

type Output = DMat6<N>

The resulting type after applying the * operator

fn mul(self, right: DMat6<N>) -> DMat6<N>

The method for the * operator

impl<'a, 'b, N: Copy + Mul<N, Output=N> + Add<N, Output=N> + Zero> Mul<&'b DMat6<N>> for &'a DMat6<N>
[src]

type Output = DMat6<N>

The resulting type after applying the * operator

fn mul(self, right: &DMat6<N>) -> DMat6<N>

The method for the * operator

impl<N: Copy + Add<N, Output=N> + Mul<N, Output=N> + Zero> Mul<DVec6<N>> for DMat6<N>
[src]

type Output = DVec6<N>

The resulting type after applying the * operator

fn mul(self, right: DVec6<N>) -> DVec6<N>

The method for the * operator

impl<N: BaseNum + Clone> Inv for DMat6<N>
[src]

fn inv(&self) -> Option<DMat6<N>>

Returns the inverse of m.

fn inv_mut(&mut self) -> bool

In-place version of inverse.

impl<N: Clone + Copy> Transpose for DMat6<N>
[src]

fn transpose(&self) -> DMat6<N>

Computes the transpose of a matrix.

fn transpose_mut(&mut self)

In-place version of transposed.

impl<N: BaseNum + Cast<f64> + Clone> Mean<DVec6<N>> for DMat6<N>
[src]

fn mean(&self) -> DVec6<N>

Computes the mean of the observations stored by v. Read more

impl<N: BaseNum + Cast<f64> + Clone> Cov<DMat6<N>> for DMat6<N>
[src]

fn cov(&self) -> DMat6<N>

Computes the covariance of the obsevations stored by m: Read more

fn cov_to(&self, out: &mut M)

Computes the covariance of the obsevations stored by m: Read more

impl<N: Copy + Zero> Col<DVec6<N>> for DMat6<N>
[src]

fn ncols(&self) -> usize

The number of column of this matrix or vector.

fn set_col(&mut self, col_id: usize, col: DVec6<N>)

Writes the i-th column of self.

fn col(&self, col_id: usize) -> DVec6<N>

Reads the i-th column of self.

impl<N: Copy + Clone + Zero> ColSlice<DVec6<N>> for DMat6<N>
[src]

fn col_slice(&self, col_id: usize, row_start: usize, row_end: usize) -> DVec6<N>

Returns a view to a slice of a column of a matrix.

impl<N: Copy + Zero> Row<DVec6<N>> for DMat6<N>
[src]

fn nrows(&self) -> usize

The number of column of self.

fn set_row(&mut self, row_id: usize, row: DVec6<N>)

Writes the i-th row of self.

fn row(&self, row_id: usize) -> DVec6<N>

Reads the i-th row of self.

impl<N: Copy> RowSlice<DVec6<N>> for DMat6<N>
[src]

fn row_slice(&self, row_id: usize, col_start: usize, col_end: usize) -> DVec6<N>

Returns a view to a slice of a row of a matrix.

impl<N: Copy + Clone + Zero> Diag<DVec6<N>> for DMat6<N>
[src]

fn from_diag(diag: &DVec6<N>) -> DMat6<N>

Creates a new matrix with the given diagonal.

fn diag(&self) -> DVec6<N>

The diagonal of this matrix.

impl<N: ApproxEq<N>> ApproxEq<N> for DMat6<N>
[src]

fn approx_epsilon(_: Option<DMat6<N>>) -> N

Default epsilon for approximation.

fn approx_ulps(_: Option<DMat6<N>>) -> u32

Default ULPs for approximation.

fn approx_eq_eps(&self, other: &DMat6<N>, epsilon: &N) -> bool

Tests approximate equality using a custom epsilon.

fn approx_eq_ulps(&self, other: &DMat6<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 DMat6<N>
[src]

fn fmt(&self, form: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<N: Copy + Mul<N, Output=N>> Mul<N> for DMat6<N>
[src]

type Output = DMat6<N>

The resulting type after applying the * operator

fn mul(self, right: N) -> DMat6<N>

The method for the * operator

impl<N: Copy + Div<N, Output=N>> Div<N> for DMat6<N>
[src]

type Output = DMat6<N>

The resulting type after applying the / operator

fn div(self, right: N) -> DMat6<N>

The method for the / operator

impl<N: Copy + Add<N, Output=N>> Add<N> for DMat6<N>
[src]

type Output = DMat6<N>

The resulting type after applying the + operator

fn add(self, right: N) -> DMat6<N>

The method for the + operator

impl<N: Copy + Add<N, Output=N>> Add<DMat6<N>> for DMat6<N>
[src]

type Output = DMat6<N>

The resulting type after applying the + operator

fn add(self, right: DMat6<N>) -> DMat6<N>

The method for the + operator

impl<'a, N: Copy + Add<N, Output=N>> Add<DMat6<N>> for &'a DMat6<N>
[src]

type Output = DMat6<N>

The resulting type after applying the + operator

fn add(self, right: DMat6<N>) -> DMat6<N>

The method for the + operator

impl<'a, N: Copy + Add<N, Output=N>> Add<&'a DMat6<N>> for DMat6<N>
[src]

type Output = DMat6<N>

The resulting type after applying the + operator

fn add(self, right: &'a DMat6<N>) -> DMat6<N>

The method for the + operator

impl<N: Copy + Sub<N, Output=N>> Sub<N> for DMat6<N>
[src]

type Output = DMat6<N>

The resulting type after applying the - operator

fn sub(self, right: N) -> DMat6<N>

The method for the - operator

impl<N: Copy + Sub<N, Output=N>> Sub<DMat6<N>> for DMat6<N>
[src]

type Output = DMat6<N>

The resulting type after applying the - operator

fn sub(self, right: DMat6<N>) -> DMat6<N>

The method for the - operator

impl<'a, N: Copy + Sub<N, Output=N>> Sub<DMat6<N>> for &'a DMat6<N>
[src]

type Output = DMat6<N>

The resulting type after applying the - operator

fn sub(self, right: DMat6<N>) -> DMat6<N>

The method for the - operator

impl<'a, N: Copy + Sub<N, Output=N>> Sub<&'a DMat6<N>> for DMat6<N>
[src]

type Output = DMat6<N>

The resulting type after applying the - operator

fn sub(self, right: &'a DMat6<N>) -> DMat6<N>

The method for the - operator