Type Definition nalgebra::base::MatrixN[][src]

pub type MatrixN<N, D> = Matrix<N, D, D, Owned<N, D, D>>;
Expand description

A statically sized column-major square matrix with D rows and columns.

Because this is an alias, not all its methods are listed here. See the Matrix type too.

Implementations

Creates a new homogeneous matrix that applies the same scaling factor on each dimension.

Creates a new homogeneous matrix that applies a distinct scaling factor for each dimension.

Creates a new homogeneous matrix that applies a pure translation.

Creates a square matrix with its diagonal set to diag and all other entries set to 0.

Example


let m = Matrix3::from_diagonal(&Vector3::new(1.0, 2.0, 3.0));
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_diagonal(&DVector::from_row_slice(&[1.0, 2.0, 3.0]));

assert!(m.m11 == 1.0 && m.m12 == 0.0 && m.m13 == 0.0 &&
        m.m21 == 0.0 && m.m22 == 2.0 && m.m23 == 0.0 &&
        m.m31 == 0.0 && m.m32 == 0.0 && m.m33 == 3.0);
assert!(dm[(0, 0)] == 1.0 && dm[(0, 1)] == 0.0 && dm[(0, 2)] == 0.0 &&
        dm[(1, 0)] == 0.0 && dm[(1, 1)] == 2.0 && dm[(1, 2)] == 0.0 &&
        dm[(2, 0)] == 0.0 && dm[(2, 1)] == 0.0 && dm[(2, 2)] == 3.0);

Computes exponential of this matrix

Trait Implementations

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Returns the multiplicative identity element of Self, 1. Read more

Sets self to the multiplicative identity element of Self, 1.

Returns true if self is equal to the multiplicative identity. Read more

Method which takes an iterator and generates Self from the elements by multiplying the items. Read more

Method which takes an iterator and generates Self from the elements by multiplying the items. Read more