Struct jumpy::core::physics::rapier::nalgebra::base::Matrix

source ·
#[repr(C)]
pub struct Matrix<T, R, C, S> { pub data: S, _phantoms: PhantomData<(T, R, C)>, }
Expand description

The most generic column-major matrix (and vector) type.

§Methods summary

Because Matrix is the most generic types used as a common representation of all matrices and vectors of nalgebra this documentation page contains every single matrix/vector-related method. In order to make browsing this page simpler, the next subsections contain direct links to groups of methods related to a specific topic.

§Vector and matrix construction
§Computer graphics utilities for transformations
§Common math operations
§Statistics
§Iteration, map, and fold
§Vector and matrix views
§In-place modification of a single matrix or vector
§Vector and matrix size modification
§Matrix decomposition
§Vector basis computation

§Type parameters

The generic Matrix type has four type parameters:

  • T: for the matrix components scalar type.
  • R: for the matrix number of rows.
  • C: for the matrix number of columns.
  • S: for the matrix data storage, i.e., the buffer that actually contains the matrix components.

The matrix dimensions parameters R and C can either be:

  • type-level unsigned integer constants (e.g. U1, U124) from the nalgebra:: root module. All numbers from 0 to 127 are defined that way.
  • type-level unsigned integer constants (e.g. U1024, U10000) from the typenum:: crate. Using those, you will not get error messages as nice as for numbers smaller than 128 defined on the nalgebra:: module.
  • the special value Dyn from the nalgebra:: root module. This indicates that the specified dimension is not known at compile-time. Note that this will generally imply that the matrix data storage S performs a dynamic allocation and contains extra metadata for the matrix shape.

Note that mixing Dyn with type-level unsigned integers is allowed. Actually, a dynamically-sized column vector should be represented as a Matrix<T, Dyn, U1, S> (given some concrete types for T and a compatible data storage type S).

Fields§

§data: S

The data storage that contains all the matrix components. Disappointed?

Well, if you came here to see how you can access the matrix components, you may be in luck: you can access the individual components of all vectors with compile-time dimensions <= 6 using field notation like this: vec.x, vec.y, vec.z, vec.w, vec.a, vec.b. Reference and assignation work too:

let mut vec = Vector3::new(1.0, 2.0, 3.0);
vec.x = 10.0;
vec.y += 30.0;
assert_eq!(vec.x, 10.0);
assert_eq!(vec.y + 100.0, 132.0);

Similarly, for matrices with compile-time dimensions <= 6, you can use field notation like this: mat.m11, mat.m42, etc. The first digit identifies the row to address and the second digit identifies the column to address. So mat.m13 identifies the component at the first row and third column (note that the count of rows and columns start at 1 instead of 0 here. This is so we match the mathematical notation).

For all matrices and vectors, independently from their size, individual components can be accessed and modified using indexing: vec[20], mat[(20, 19)]. Here the indexing starts at 0 as you would expect.

§_phantoms: PhantomData<(T, R, C)>

Implementations§

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where R: Dim, C: Dim, S: RawStorage<T, R, C>, T: Scalar + Zero + ClosedAdd + ClosedMul,

§Dot/scalar product

source

pub fn dot<R2, C2, SB>(&self, rhs: &Matrix<T, R2, C2, SB>) -> T
where R2: Dim, C2: Dim, SB: RawStorage<T, R2, C2>, ShapeConstraint: DimEq<R, R2> + DimEq<C, C2>,

The dot product between two vectors or matrices (seen as vectors).

This is equal to self.transpose() * rhs. For the sesquilinear complex dot product, use self.dotc(rhs).

Note that this is not the matrix multiplication as in, e.g., numpy. For matrix multiplication, use one of: .gemm, .mul_to, .mul, the * operator.

§Example
let vec1 = Vector3::new(1.0, 2.0, 3.0);
let vec2 = Vector3::new(0.1, 0.2, 0.3);
assert_eq!(vec1.dot(&vec2), 1.4);

let mat1 = Matrix2x3::new(1.0, 2.0, 3.0,
                          4.0, 5.0, 6.0);
let mat2 = Matrix2x3::new(0.1, 0.2, 0.3,
                          0.4, 0.5, 0.6);
assert_eq!(mat1.dot(&mat2), 9.1);
source

pub fn dotc<R2, C2, SB>(&self, rhs: &Matrix<T, R2, C2, SB>) -> T
where R2: Dim, C2: Dim, T: SimdComplexField, SB: RawStorage<T, R2, C2>, ShapeConstraint: DimEq<R, R2> + DimEq<C, C2>,

The conjugate-linear dot product between two vectors or matrices (seen as vectors).

This is equal to self.adjoint() * rhs. For real vectors, this is identical to self.dot(&rhs). Note that this is not the matrix multiplication as in, e.g., numpy. For matrix multiplication, use one of: .gemm, .mul_to, .mul, the * operator.

§Example
let vec1 = Vector2::new(Complex::new(1.0, 2.0), Complex::new(3.0, 4.0));
let vec2 = Vector2::new(Complex::new(0.4, 0.3), Complex::new(0.2, 0.1));
assert_eq!(vec1.dotc(&vec2), Complex::new(2.0, -1.0));

// Note that for complex vectors, we generally have:
// vec1.dotc(&vec2) != vec2.dot(&vec2)
assert_ne!(vec1.dotc(&vec2), vec1.dot(&vec2));
source

pub fn tr_dot<R2, C2, SB>(&self, rhs: &Matrix<T, R2, C2, SB>) -> T
where R2: Dim, C2: Dim, SB: RawStorage<T, R2, C2>, ShapeConstraint: DimEq<C, R2> + DimEq<R, C2>,

The dot product between the transpose of self and rhs.

§Example
let vec1 = Vector3::new(1.0, 2.0, 3.0);
let vec2 = RowVector3::new(0.1, 0.2, 0.3);
assert_eq!(vec1.tr_dot(&vec2), 1.4);

let mat1 = Matrix2x3::new(1.0, 2.0, 3.0,
                          4.0, 5.0, 6.0);
let mat2 = Matrix3x2::new(0.1, 0.4,
                          0.2, 0.5,
                          0.3, 0.6);
assert_eq!(mat1.tr_dot(&mat2), 9.1);
source§

impl<T, D, S> Matrix<T, D, Const<1>, S>
where D: Dim, T: Scalar + Zero + ClosedAdd + ClosedMul, S: StorageMut<T, D>,

§BLAS functions

source

pub fn axcpy<D2, SB>( &mut self, a: T, x: &Matrix<T, D2, Const<1>, SB>, c: T, b: T, )
where D2: Dim, SB: Storage<T, D2>, ShapeConstraint: DimEq<D, D2>,

Computes self = a * x * c + b * self.

If b is zero, self is never read from.

§Example
let mut vec1 = Vector3::new(1.0, 2.0, 3.0);
let vec2 = Vector3::new(0.1, 0.2, 0.3);
vec1.axcpy(5.0, &vec2, 2.0, 5.0);
assert_eq!(vec1, Vector3::new(6.0, 12.0, 18.0));
source

pub fn axpy<D2, SB>(&mut self, a: T, x: &Matrix<T, D2, Const<1>, SB>, b: T)
where D2: Dim, T: One, SB: Storage<T, D2>, ShapeConstraint: DimEq<D, D2>,

Computes self = a * x + b * self.

If b is zero, self is never read from.

§Example
let mut vec1 = Vector3::new(1.0, 2.0, 3.0);
let vec2 = Vector3::new(0.1, 0.2, 0.3);
vec1.axpy(10.0, &vec2, 5.0);
assert_eq!(vec1, Vector3::new(6.0, 12.0, 18.0));
source

pub fn gemv<R2, C2, D3, SB, SC>( &mut self, alpha: T, a: &Matrix<T, R2, C2, SB>, x: &Matrix<T, D3, Const<1>, SC>, beta: T, )
where R2: Dim, C2: Dim, D3: Dim, T: One, SB: Storage<T, R2, C2>, SC: Storage<T, D3>, ShapeConstraint: DimEq<D, R2> + AreMultipliable<R2, C2, D3, Const<1>>,

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.

§Example
let mut vec1 = Vector2::new(1.0, 2.0);
let vec2 = Vector2::new(0.1, 0.2);
let mat = Matrix2::new(1.0, 2.0,
                       3.0, 4.0);
vec1.gemv(10.0, &mat, &vec2, 5.0);
assert_eq!(vec1, Vector2::new(10.0, 21.0));
source

pub fn sygemv<D2, D3, SB, SC>( &mut self, alpha: T, a: &Matrix<T, D2, D2, SB>, x: &Matrix<T, D3, Const<1>, SC>, beta: T, )
where D2: Dim, D3: Dim, T: One, SB: Storage<T, D2, D2>, SC: Storage<T, D3>, ShapeConstraint: DimEq<D, D2> + AreMultipliable<D2, D2, D3, Const<1>>,

Computes self = alpha * a * x + beta * self, where a is a symmetric matrix, x a vector, and alpha, beta two scalars.

For hermitian matrices, use .hegemv instead. If beta is zero, self is never read. If self is read, only its lower-triangular part (including the diagonal) is actually read.

§Examples
let mat = Matrix2::new(1.0, 2.0,
                       2.0, 4.0);
let mut vec1 = Vector2::new(1.0, 2.0);
let vec2 = Vector2::new(0.1, 0.2);
vec1.sygemv(10.0, &mat, &vec2, 5.0);
assert_eq!(vec1, Vector2::new(10.0, 20.0));


// The matrix upper-triangular elements can be garbage because it is never
// read by this method. Therefore, it is not necessary for the caller to
// fill the matrix struct upper-triangle.
let mat = Matrix2::new(1.0, 9999999.9999999,
                       2.0, 4.0);
let mut vec1 = Vector2::new(1.0, 2.0);
vec1.sygemv(10.0, &mat, &vec2, 5.0);
assert_eq!(vec1, Vector2::new(10.0, 20.0));
source

pub fn hegemv<D2, D3, SB, SC>( &mut self, alpha: T, a: &Matrix<T, D2, D2, SB>, x: &Matrix<T, D3, Const<1>, SC>, beta: T, )
where D2: Dim, D3: Dim, T: SimdComplexField, SB: Storage<T, D2, D2>, SC: Storage<T, D3>, ShapeConstraint: DimEq<D, D2> + AreMultipliable<D2, D2, D3, Const<1>>,

Computes self = alpha * a * x + beta * self, where a is an hermitian 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.

§Examples
let mat = Matrix2::new(Complex::new(1.0, 0.0), Complex::new(2.0, -0.1),
                       Complex::new(2.0, 1.0), Complex::new(4.0, 0.0));
let mut vec1 = Vector2::new(Complex::new(1.0, 2.0), Complex::new(3.0, 4.0));
let vec2 = Vector2::new(Complex::new(0.1, 0.2), Complex::new(0.3, 0.4));
vec1.sygemv(Complex::new(10.0, 20.0), &mat, &vec2, Complex::new(5.0, 15.0));
assert_eq!(vec1, Vector2::new(Complex::new(-48.0, 44.0), Complex::new(-75.0, 110.0)));


// The matrix upper-triangular elements can be garbage because it is never
// read by this method. Therefore, it is not necessary for the caller to
// fill the matrix struct upper-triangle.

let mat = Matrix2::new(Complex::new(1.0, 0.0), Complex::new(99999999.9, 999999999.9),
                       Complex::new(2.0, 1.0), Complex::new(4.0, 0.0));
let mut vec1 = Vector2::new(Complex::new(1.0, 2.0), Complex::new(3.0, 4.0));
let vec2 = Vector2::new(Complex::new(0.1, 0.2), Complex::new(0.3, 0.4));
vec1.sygemv(Complex::new(10.0, 20.0), &mat, &vec2, Complex::new(5.0, 15.0));
assert_eq!(vec1, Vector2::new(Complex::new(-48.0, 44.0), Complex::new(-75.0, 110.0)));
source

pub fn gemv_tr<R2, C2, D3, SB, SC>( &mut self, alpha: T, a: &Matrix<T, R2, C2, SB>, x: &Matrix<T, D3, Const<1>, SC>, beta: T, )
where R2: Dim, C2: Dim, D3: Dim, T: One, SB: Storage<T, R2, C2>, SC: Storage<T, D3>, ShapeConstraint: DimEq<D, C2> + AreMultipliable<C2, R2, D3, Const<1>>,

Computes self = alpha * a.transpose() * x + beta * self, where a is a matrix, x a vector, and alpha, beta two scalars.

If beta is zero, self is never read.

§Example
let mat = Matrix2::new(1.0, 3.0,
                       2.0, 4.0);
let mut vec1 = Vector2::new(1.0, 2.0);
let vec2 = Vector2::new(0.1, 0.2);
let expected = mat.transpose() * vec2 * 10.0 + vec1 * 5.0;

vec1.gemv_tr(10.0, &mat, &vec2, 5.0);
assert_eq!(vec1, expected);
source

pub fn gemv_ad<R2, C2, D3, SB, SC>( &mut self, alpha: T, a: &Matrix<T, R2, C2, SB>, x: &Matrix<T, D3, Const<1>, SC>, beta: T, )
where R2: Dim, C2: Dim, D3: Dim, T: SimdComplexField, SB: Storage<T, R2, C2>, SC: Storage<T, D3>, ShapeConstraint: DimEq<D, C2> + AreMultipliable<C2, R2, D3, Const<1>>,

Computes self = alpha * a.adjoint() * x + beta * self, where a is a matrix, x a vector, and alpha, beta two scalars.

For real matrices, this is the same as .gemv_tr. If beta is zero, self is never read.

§Example
let mat = Matrix2::new(Complex::new(1.0, 2.0), Complex::new(3.0, 4.0),
                       Complex::new(5.0, 6.0), Complex::new(7.0, 8.0));
let mut vec1 = Vector2::new(Complex::new(1.0, 2.0), Complex::new(3.0, 4.0));
let vec2 = Vector2::new(Complex::new(0.1, 0.2), Complex::new(0.3, 0.4));
let expected = mat.adjoint() * vec2 * Complex::new(10.0, 20.0) + vec1 * Complex::new(5.0, 15.0);

vec1.gemv_ad(Complex::new(10.0, 20.0), &mat, &vec2, Complex::new(5.0, 15.0));
assert_eq!(vec1, expected);
source§

impl<T, R1, C1, S> Matrix<T, R1, C1, S>
where R1: Dim, C1: Dim, S: StorageMut<T, R1, C1>, T: Scalar + Zero + ClosedAdd + ClosedMul,

source

pub fn ger<D2, D3, SB, SC>( &mut self, alpha: T, x: &Matrix<T, D2, Const<1>, SB>, y: &Matrix<T, D3, Const<1>, SC>, beta: T, )
where D2: Dim, D3: Dim, T: One, SB: Storage<T, D2>, SC: Storage<T, D3>, ShapeConstraint: DimEq<R1, D2> + DimEq<C1, D3>,

Computes self = alpha * x * y.transpose() + beta * self.

If beta is zero, self is never read.

§Example
let mut mat = Matrix2x3::repeat(4.0);
let vec1 = Vector2::new(1.0, 2.0);
let vec2 = Vector3::new(0.1, 0.2, 0.3);
let expected = vec1 * vec2.transpose() * 10.0 + mat * 5.0;

mat.ger(10.0, &vec1, &vec2, 5.0);
assert_eq!(mat, expected);
source

pub fn gerc<D2, D3, SB, SC>( &mut self, alpha: T, x: &Matrix<T, D2, Const<1>, SB>, y: &Matrix<T, D3, Const<1>, SC>, beta: T, )
where D2: Dim, D3: Dim, T: SimdComplexField, SB: Storage<T, D2>, SC: Storage<T, D3>, ShapeConstraint: DimEq<R1, D2> + DimEq<C1, D3>,

Computes self = alpha * x * y.adjoint() + beta * self.

If beta is zero, self is never read.

§Example
let mut mat = Matrix2x3::repeat(Complex::new(4.0, 5.0));
let vec1 = Vector2::new(Complex::new(1.0, 2.0), Complex::new(3.0, 4.0));
let vec2 = Vector3::new(Complex::new(0.6, 0.5), Complex::new(0.4, 0.5), Complex::new(0.2, 0.1));
let expected = vec1 * vec2.adjoint() * Complex::new(10.0, 20.0) + mat * Complex::new(5.0, 15.0);

mat.gerc(Complex::new(10.0, 20.0), &vec1, &vec2, Complex::new(5.0, 15.0));
assert_eq!(mat, expected);
source

pub fn gemm<R2, C2, R3, C3, SB, SC>( &mut self, alpha: T, a: &Matrix<T, R2, C2, SB>, b: &Matrix<T, R3, C3, SC>, beta: T, )
where R2: Dim, C2: Dim, R3: Dim, C3: Dim, T: One, SB: Storage<T, R2, C2>, SC: Storage<T, R3, C3>, ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfColumns<C1, C3> + AreMultipliable<R2, C2, R3, C3>,

Computes self = alpha * a * b + beta * self, where a, b, self are matrices. alpha and beta are scalar.

If beta is zero, self is never read.

§Example
let mut mat1 = Matrix2x4::identity();
let mat2 = Matrix2x3::new(1.0, 2.0, 3.0,
                          4.0, 5.0, 6.0);
let mat3 = Matrix3x4::new(0.1, 0.2, 0.3, 0.4,
                          0.5, 0.6, 0.7, 0.8,
                          0.9, 1.0, 1.1, 1.2);
let expected = mat2 * mat3 * 10.0 + mat1 * 5.0;

mat1.gemm(10.0, &mat2, &mat3, 5.0);
assert_relative_eq!(mat1, expected);
source

pub fn gemm_tr<R2, C2, R3, C3, SB, SC>( &mut self, alpha: T, a: &Matrix<T, R2, C2, SB>, b: &Matrix<T, R3, C3, SC>, beta: T, )
where R2: Dim, C2: Dim, R3: Dim, C3: Dim, T: One, SB: Storage<T, R2, C2>, SC: Storage<T, R3, C3>, ShapeConstraint: SameNumberOfRows<R1, C2> + SameNumberOfColumns<C1, C3> + AreMultipliable<C2, R2, R3, C3>,

Computes self = alpha * a.transpose() * b + beta * self, where a, b, self are matrices. alpha and beta are scalar.

If beta is zero, self is never read.

§Example
let mut mat1 = Matrix2x4::identity();
let mat2 = Matrix3x2::new(1.0, 4.0,
                          2.0, 5.0,
                          3.0, 6.0);
let mat3 = Matrix3x4::new(0.1, 0.2, 0.3, 0.4,
                          0.5, 0.6, 0.7, 0.8,
                          0.9, 1.0, 1.1, 1.2);
let expected = mat2.transpose() * mat3 * 10.0 + mat1 * 5.0;

mat1.gemm_tr(10.0, &mat2, &mat3, 5.0);
assert_eq!(mat1, expected);
source

pub fn gemm_ad<R2, C2, R3, C3, SB, SC>( &mut self, alpha: T, a: &Matrix<T, R2, C2, SB>, b: &Matrix<T, R3, C3, SC>, beta: T, )
where R2: Dim, C2: Dim, R3: Dim, C3: Dim, T: SimdComplexField, SB: Storage<T, R2, C2>, SC: Storage<T, R3, C3>, ShapeConstraint: SameNumberOfRows<R1, C2> + SameNumberOfColumns<C1, C3> + AreMultipliable<C2, R2, R3, C3>,

Computes self = alpha * a.adjoint() * b + beta * self, where a, b, self are matrices. alpha and beta are scalar.

If beta is zero, self is never read.

§Example
let mut mat1 = Matrix2x4::identity();
let mat2 = Matrix3x2::new(Complex::new(1.0, 4.0), Complex::new(7.0, 8.0),
                          Complex::new(2.0, 5.0), Complex::new(9.0, 10.0),
                          Complex::new(3.0, 6.0), Complex::new(11.0, 12.0));
let mat3 = Matrix3x4::new(Complex::new(0.1, 1.3), Complex::new(0.2, 1.4), Complex::new(0.3, 1.5), Complex::new(0.4, 1.6),
                          Complex::new(0.5, 1.7), Complex::new(0.6, 1.8), Complex::new(0.7, 1.9), Complex::new(0.8, 2.0),
                          Complex::new(0.9, 2.1), Complex::new(1.0, 2.2), Complex::new(1.1, 2.3), Complex::new(1.2, 2.4));
let expected = mat2.adjoint() * mat3 * Complex::new(10.0, 20.0) + mat1 * Complex::new(5.0, 15.0);

mat1.gemm_ad(Complex::new(10.0, 20.0), &mat2, &mat3, Complex::new(5.0, 15.0));
assert_eq!(mat1, expected);
source§

impl<T, R1, C1, S> Matrix<T, R1, C1, S>
where R1: Dim, C1: Dim, S: StorageMut<T, R1, C1>, T: Scalar + Zero + ClosedAdd + ClosedMul,

source

pub fn ger_symm<D2, D3, SB, SC>( &mut self, alpha: T, x: &Matrix<T, D2, Const<1>, SB>, y: &Matrix<T, D3, Const<1>, SC>, beta: T, )
where D2: Dim, D3: Dim, T: One, SB: Storage<T, D2>, SC: Storage<T, D3>, ShapeConstraint: DimEq<R1, D2> + DimEq<C1, D3>,

👎Deprecated: This is renamed syger to match the original BLAS terminology.

Computes self = alpha * x * y.transpose() + beta * self, where self is a symmetric matrix.

If beta is zero, self is never read. The result is symmetric. Only the lower-triangular (including the diagonal) part of self is read/written.

§Example
let mut mat = Matrix2::identity();
let vec1 = Vector2::new(1.0, 2.0);
let vec2 = Vector2::new(0.1, 0.2);
let expected = vec1 * vec2.transpose() * 10.0 + mat * 5.0;
mat.m12 = 99999.99999; // This component is on the upper-triangular part and will not be read/written.

mat.ger_symm(10.0, &vec1, &vec2, 5.0);
assert_eq!(mat.lower_triangle(), expected.lower_triangle());
assert_eq!(mat.m12, 99999.99999); // This was untouched.
source

pub fn syger<D2, D3, SB, SC>( &mut self, alpha: T, x: &Matrix<T, D2, Const<1>, SB>, y: &Matrix<T, D3, Const<1>, SC>, beta: T, )
where D2: Dim, D3: Dim, T: One, SB: Storage<T, D2>, SC: Storage<T, D3>, ShapeConstraint: DimEq<R1, D2> + DimEq<C1, D3>,

Computes self = alpha * x * y.transpose() + beta * self, where self is a symmetric matrix.

For hermitian complex matrices, use .hegerc instead. If beta is zero, self is never read. The result is symmetric. Only the lower-triangular (including the diagonal) part of self is read/written.

§Example
let mut mat = Matrix2::identity();
let vec1 = Vector2::new(1.0, 2.0);
let vec2 = Vector2::new(0.1, 0.2);
let expected = vec1 * vec2.transpose() * 10.0 + mat * 5.0;
mat.m12 = 99999.99999; // This component is on the upper-triangular part and will not be read/written.

mat.syger(10.0, &vec1, &vec2, 5.0);
assert_eq!(mat.lower_triangle(), expected.lower_triangle());
assert_eq!(mat.m12, 99999.99999); // This was untouched.
source

pub fn hegerc<D2, D3, SB, SC>( &mut self, alpha: T, x: &Matrix<T, D2, Const<1>, SB>, y: &Matrix<T, D3, Const<1>, SC>, beta: T, )
where D2: Dim, D3: Dim, T: SimdComplexField, SB: Storage<T, D2>, SC: Storage<T, D3>, ShapeConstraint: DimEq<R1, D2> + DimEq<C1, D3>,

Computes self = alpha * x * y.adjoint() + beta * self, where self is an hermitian matrix.

If beta is zero, self is never read. The result is symmetric. Only the lower-triangular (including the diagonal) part of self is read/written.

§Example
let mut mat = Matrix2::identity();
let vec1 = Vector2::new(Complex::new(1.0, 3.0), Complex::new(2.0, 4.0));
let vec2 = Vector2::new(Complex::new(0.2, 0.4), Complex::new(0.1, 0.3));
let expected = vec1 * vec2.adjoint() * Complex::new(10.0, 20.0) + mat * Complex::new(5.0, 15.0);
mat.m12 = Complex::new(99999.99999, 88888.88888); // This component is on the upper-triangular part and will not be read/written.

mat.hegerc(Complex::new(10.0, 20.0), &vec1, &vec2, Complex::new(5.0, 15.0));
assert_eq!(mat.lower_triangle(), expected.lower_triangle());
assert_eq!(mat.m12, Complex::new(99999.99999, 88888.88888)); // This was untouched.
source§

impl<T, D1, S> Matrix<T, D1, D1, S>
where D1: Dim, S: StorageMut<T, D1, D1>, T: Scalar + Zero + One + ClosedAdd + ClosedMul,

source

pub fn quadform_tr_with_workspace<D2, S2, R3, C3, S3, D4, S4>( &mut self, work: &mut Matrix<T, D2, Const<1>, S2>, alpha: T, lhs: &Matrix<T, R3, C3, S3>, mid: &Matrix<T, D4, D4, S4>, beta: T, )
where D2: Dim, R3: Dim, C3: Dim, D4: Dim, S2: StorageMut<T, D2>, S3: Storage<T, R3, C3>, S4: Storage<T, D4, D4>, ShapeConstraint: DimEq<D1, D2> + DimEq<D1, R3> + DimEq<D2, R3> + DimEq<C3, D4>,

Computes the quadratic form self = alpha * lhs * mid * lhs.transpose() + beta * self.

This uses the provided workspace work to avoid allocations for intermediate results.

§Example
// Note that all those would also work with statically-sized matrices.
// We use DMatrix/DVector since that's the only case where pre-allocating the
// workspace is actually useful (assuming the same workspace is re-used for
// several computations) because it avoids repeated dynamic allocations.
let mut mat = DMatrix::identity(2, 2);
let lhs = DMatrix::from_row_slice(2, 3, &[1.0, 2.0, 3.0,
                                          4.0, 5.0, 6.0]);
let mid = DMatrix::from_row_slice(3, 3, &[0.1, 0.2, 0.3,
                                          0.5, 0.6, 0.7,
                                          0.9, 1.0, 1.1]);
// The random shows that values on the workspace do not
// matter as they will be overwritten.
let mut workspace = DVector::new_random(2);
let expected = &lhs * &mid * lhs.transpose() * 10.0 + &mat * 5.0;

mat.quadform_tr_with_workspace(&mut workspace, 10.0, &lhs, &mid, 5.0);
assert_relative_eq!(mat, expected);
source

pub fn quadform_tr<R3, C3, S3, D4, S4>( &mut self, alpha: T, lhs: &Matrix<T, R3, C3, S3>, mid: &Matrix<T, D4, D4, S4>, beta: T, )
where R3: Dim, C3: Dim, D4: Dim, S3: Storage<T, R3, C3>, S4: Storage<T, D4, D4>, ShapeConstraint: DimEq<D1, D1> + DimEq<D1, R3> + DimEq<C3, D4>, DefaultAllocator: Allocator<T, D1>,

Computes the quadratic form self = alpha * lhs * mid * lhs.transpose() + beta * self.

This allocates a workspace vector of dimension D1 for intermediate results. If D1 is a type-level integer, then the allocation is performed on the stack. Use .quadform_tr_with_workspace(...) instead to avoid allocations.

§Example
let mut mat = Matrix2::identity();
let lhs = Matrix2x3::new(1.0, 2.0, 3.0,
                         4.0, 5.0, 6.0);
let mid = Matrix3::new(0.1, 0.2, 0.3,
                       0.5, 0.6, 0.7,
                       0.9, 1.0, 1.1);
let expected = lhs * mid * lhs.transpose() * 10.0 + mat * 5.0;

mat.quadform_tr(10.0, &lhs, &mid, 5.0);
assert_relative_eq!(mat, expected);
source

pub fn quadform_with_workspace<D2, S2, D3, S3, R4, C4, S4>( &mut self, work: &mut Matrix<T, D2, Const<1>, S2>, alpha: T, mid: &Matrix<T, D3, D3, S3>, rhs: &Matrix<T, R4, C4, S4>, beta: T, )
where D2: Dim, D3: Dim, R4: Dim, C4: Dim, S2: StorageMut<T, D2>, S3: Storage<T, D3, D3>, S4: Storage<T, R4, C4>, ShapeConstraint: DimEq<D3, R4> + DimEq<D1, C4> + DimEq<D2, D3> + AreMultipliable<C4, R4, D2, Const<1>>,

Computes the quadratic form self = alpha * rhs.transpose() * mid * rhs + beta * self.

This uses the provided workspace work to avoid allocations for intermediate results.

§Example
// Note that all those would also work with statically-sized matrices.
// We use DMatrix/DVector since that's the only case where pre-allocating the
// workspace is actually useful (assuming the same workspace is re-used for
// several computations) because it avoids repeated dynamic allocations.
let mut mat = DMatrix::identity(2, 2);
let rhs = DMatrix::from_row_slice(3, 2, &[1.0, 2.0,
                                          3.0, 4.0,
                                          5.0, 6.0]);
let mid = DMatrix::from_row_slice(3, 3, &[0.1, 0.2, 0.3,
                                          0.5, 0.6, 0.7,
                                          0.9, 1.0, 1.1]);
// The random shows that values on the workspace do not
// matter as they will be overwritten.
let mut workspace = DVector::new_random(3);
let expected = rhs.transpose() * &mid * &rhs * 10.0 + &mat * 5.0;

mat.quadform_with_workspace(&mut workspace, 10.0, &mid, &rhs, 5.0);
assert_relative_eq!(mat, expected);
source

pub fn quadform<D2, S2, R3, C3, S3>( &mut self, alpha: T, mid: &Matrix<T, D2, D2, S2>, rhs: &Matrix<T, R3, C3, S3>, beta: T, )
where D2: Dim, R3: Dim, C3: Dim, S2: Storage<T, D2, D2>, S3: Storage<T, R3, C3>, ShapeConstraint: DimEq<D2, R3> + DimEq<D1, C3> + AreMultipliable<C3, R3, D2, Const<1>>, DefaultAllocator: Allocator<T, D2>,

Computes the quadratic form self = alpha * rhs.transpose() * mid * rhs + beta * self.

This allocates a workspace vector of dimension D2 for intermediate results. If D2 is a type-level integer, then the allocation is performed on the stack. Use .quadform_with_workspace(...) instead to avoid allocations.

§Example
let mut mat = Matrix2::identity();
let rhs = Matrix3x2::new(1.0, 2.0,
                         3.0, 4.0,
                         5.0, 6.0);
let mid = Matrix3::new(0.1, 0.2, 0.3,
                       0.5, 0.6, 0.7,
                       0.9, 1.0, 1.1);
let expected = rhs.transpose() * mid * rhs * 10.0 + mat * 5.0;

mat.quadform(10.0, &mid, &rhs, 5.0);
assert_relative_eq!(mat, expected);
source§

impl<T, R, C, S> Matrix<T, R, C, S>
where R: Dim, C: Dim, T: Scalar + ClosedNeg, S: StorageMut<T, R, C>,

source

pub fn neg_mut(&mut self)

Negates self in-place.

source§

impl<T, R1, C1, SA> Matrix<T, R1, C1, SA>
where R1: Dim, C1: Dim, SA: Storage<T, R1, C1>, T: Scalar + ClosedAdd,

source

pub fn add_to<R2, C2, SB, R3, C3, SC>( &self, rhs: &Matrix<T, R2, C2, SB>, out: &mut Matrix<T, R3, C3, SC>, )
where R2: Dim, C2: Dim, R3: Dim, C3: Dim, SB: Storage<T, R2, C2>, SC: StorageMut<T, R3, C3>, ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfColumns<C1, C2> + SameNumberOfRows<R1, R3> + SameNumberOfColumns<C1, C3>,

Equivalent to self + rhs but stores the result into out to avoid allocations.

source§

impl<T, R1, C1, SA> Matrix<T, R1, C1, SA>
where R1: Dim, C1: Dim, SA: Storage<T, R1, C1>, T: Scalar + ClosedSub,

source

pub fn sub_to<R2, C2, SB, R3, C3, SC>( &self, rhs: &Matrix<T, R2, C2, SB>, out: &mut Matrix<T, R3, C3, SC>, )
where R2: Dim, C2: Dim, R3: Dim, C3: Dim, SB: Storage<T, R2, C2>, SC: StorageMut<T, R3, C3>, ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfColumns<C1, C2> + SameNumberOfRows<R1, R3> + SameNumberOfColumns<C1, C3>,

Equivalent to self + rhs but stores the result into out to avoid allocations.

source§

impl<T, R1, C1, SA> Matrix<T, R1, C1, SA>
where R1: Dim, C1: Dim, T: Scalar + Zero + One + ClosedAdd + ClosedMul, SA: Storage<T, R1, C1>,

§Special multiplications.

source

pub fn tr_mul<R2, C2, SB>( &self, rhs: &Matrix<T, R2, C2, SB>, ) -> Matrix<T, C1, C2, <DefaultAllocator as Allocator<T, C1, C2>>::Buffer>
where R2: Dim, C2: Dim, SB: Storage<T, R2, C2>, DefaultAllocator: Allocator<T, C1, C2>, ShapeConstraint: SameNumberOfRows<R1, R2>,

Equivalent to self.transpose() * rhs.

source

pub fn ad_mul<R2, C2, SB>( &self, rhs: &Matrix<T, R2, C2, SB>, ) -> Matrix<T, C1, C2, <DefaultAllocator as Allocator<T, C1, C2>>::Buffer>
where R2: Dim, C2: Dim, T: SimdComplexField, SB: Storage<T, R2, C2>, DefaultAllocator: Allocator<T, C1, C2>, ShapeConstraint: SameNumberOfRows<R1, R2>,

Equivalent to self.adjoint() * rhs.

source

pub fn tr_mul_to<R2, C2, SB, R3, C3, SC>( &self, rhs: &Matrix<T, R2, C2, SB>, out: &mut Matrix<T, R3, C3, SC>, )
where R2: Dim, C2: Dim, R3: Dim, C3: Dim, SB: Storage<T, R2, C2>, SC: StorageMut<T, R3, C3>, ShapeConstraint: SameNumberOfRows<R1, R2> + DimEq<C1, R3> + DimEq<C2, C3>,

Equivalent to self.transpose() * rhs but stores the result into out to avoid allocations.

source

pub fn ad_mul_to<R2, C2, SB, R3, C3, SC>( &self, rhs: &Matrix<T, R2, C2, SB>, out: &mut Matrix<T, R3, C3, SC>, )
where R2: Dim, C2: Dim, R3: Dim, C3: Dim, T: SimdComplexField, SB: Storage<T, R2, C2>, SC: StorageMut<T, R3, C3>, ShapeConstraint: SameNumberOfRows<R1, R2> + DimEq<C1, R3> + DimEq<C2, C3>,

Equivalent to self.adjoint() * rhs but stores the result into out to avoid allocations.

source

pub fn mul_to<R2, C2, SB, R3, C3, SC>( &self, rhs: &Matrix<T, R2, C2, SB>, out: &mut Matrix<T, R3, C3, SC>, )
where R2: Dim, C2: Dim, R3: Dim, C3: Dim, SB: Storage<T, R2, C2>, SC: StorageMut<T, R3, C3>, ShapeConstraint: SameNumberOfRows<R3, R1> + SameNumberOfColumns<C3, C2> + AreMultipliable<R1, C1, R2, C2>,

Equivalent to self * rhs but stores the result into out to avoid allocations.

source

pub fn kronecker<R2, C2, SB>( &self, rhs: &Matrix<T, R2, C2, SB>, ) -> Matrix<T, <R1 as DimMul<R2>>::Output, <C1 as DimMul<C2>>::Output, <DefaultAllocator as Allocator<T, <R1 as DimMul<R2>>::Output, <C1 as DimMul<C2>>::Output>>::Buffer>
where R2: Dim, C2: Dim, T: ClosedMul, R1: DimMul<R2>, C1: DimMul<C2>, SB: Storage<T, R2, C2>, DefaultAllocator: Allocator<T, <R1 as DimMul<R2>>::Output, <C1 as DimMul<C2>>::Output>,

The kronecker product of two matrices (aka. tensor product of the corresponding linear maps).

source§

impl<T, D> Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>
where D: DimName, T: Scalar + Zero + One, DefaultAllocator: Allocator<T, D, D>,

§Translation and scaling in any dimension

source

pub fn new_scaling( scaling: T, ) -> Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>

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

source

pub fn new_nonuniform_scaling<SB>( scaling: &Matrix<T, <D as DimNameSub<Const<1>>>::Output, Const<1>, SB>, ) -> Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>
where D: DimNameSub<Const<1>>, SB: Storage<T, <D as DimNameSub<Const<1>>>::Output>,

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

source

pub fn new_translation<SB>( translation: &Matrix<T, <D as DimNameSub<Const<1>>>::Output, Const<1>, SB>, ) -> Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>
where D: DimNameSub<Const<1>>, SB: Storage<T, <D as DimNameSub<Const<1>>>::Output>,

Creates a new homogeneous matrix that applies a pure translation.

source§

impl<T> Matrix<T, Const<3>, Const<3>, ArrayStorage<T, 3, 3>>
where T: RealField,

§2D transformations as a Matrix3

source

pub fn new_rotation( angle: T, ) -> Matrix<T, Const<3>, Const<3>, ArrayStorage<T, 3, 3>>

Builds a 2 dimensional homogeneous rotation matrix from an angle in radian.

source

pub fn new_nonuniform_scaling_wrt_point( scaling: &Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>, pt: &OPoint<T, Const<2>>, ) -> Matrix<T, Const<3>, Const<3>, ArrayStorage<T, 3, 3>>

Creates a new homogeneous matrix that applies a scaling factor for each dimension with respect to point.

Can be used to implement zoom_to functionality.

source§

impl<T> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>
where T: RealField,

§3D transformations as a Matrix4

source

pub fn new_rotation( axisangle: Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>, ) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>

Builds a 3D homogeneous rotation matrix from an axis and an angle (multiplied together).

Returns the identity matrix if the given argument is zero.

source

pub fn new_rotation_wrt_point( axisangle: Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>, pt: OPoint<T, Const<3>>, ) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>

Builds a 3D homogeneous rotation matrix from an axis and an angle (multiplied together).

Returns the identity matrix if the given argument is zero.

source

pub fn new_nonuniform_scaling_wrt_point( scaling: &Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>, pt: &OPoint<T, Const<3>>, ) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>

Creates a new homogeneous matrix that applies a scaling factor for each dimension with respect to point.

Can be used to implement zoom_to functionality.

source

pub fn from_scaled_axis( axisangle: Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>, ) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>

Builds a 3D homogeneous rotation matrix from an axis and an angle (multiplied together).

Returns the identity matrix if the given argument is zero. This is identical to Self::new_rotation.

source

pub fn from_euler_angles( roll: T, pitch: T, yaw: T, ) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>

Creates a new rotation from Euler angles.

The primitive rotations are applied in order: 1 roll − 2 pitch − 3 yaw.

source

pub fn from_axis_angle( axis: &Unit<Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>>, angle: T, ) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>

Builds a 3D homogeneous rotation matrix from an axis and a rotation angle.

source

pub fn new_orthographic( left: T, right: T, bottom: T, top: T, znear: T, zfar: T, ) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>

Creates a new homogeneous matrix for an orthographic projection.

source

pub fn new_perspective( aspect: T, fovy: T, znear: T, zfar: T, ) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>

Creates a new homogeneous matrix for a perspective projection.

source

pub fn face_towards( eye: &OPoint<T, Const<3>>, target: &OPoint<T, Const<3>>, up: &Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>, ) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>

Creates an isometry that corresponds to the local frame of an observer standing at the point eye and looking toward target.

It maps the view direction target - eye to the positive z axis and the origin to the eye.

source

pub fn new_observer_frame( eye: &OPoint<T, Const<3>>, target: &OPoint<T, Const<3>>, up: &Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>, ) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>

👎Deprecated: renamed to face_towards

Deprecated: Use Matrix4::face_towards instead.

source

pub fn look_at_rh( eye: &OPoint<T, Const<3>>, target: &OPoint<T, Const<3>>, up: &Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>, ) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>

Builds a right-handed look-at view matrix.

source

pub fn look_at_lh( eye: &OPoint<T, Const<3>>, target: &OPoint<T, Const<3>>, up: &Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>, ) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>

Builds a left-handed look-at view matrix.

source§

impl<T, D, S> Matrix<T, D, D, S>
where T: Scalar + Zero + One + ClosedMul + ClosedAdd, D: DimName, S: Storage<T, D, D>,

§Append/prepend translation and scaling

source

pub fn append_scaling( &self, scaling: T, ) -> Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>
where D: DimNameSub<Const<1>>, DefaultAllocator: Allocator<T, D, D>,

Computes the transformation equal to self followed by an uniform scaling factor.

source

pub fn prepend_scaling( &self, scaling: T, ) -> Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>
where D: DimNameSub<Const<1>>, DefaultAllocator: Allocator<T, D, D>,

Computes the transformation equal to an uniform scaling factor followed by self.

source

pub fn append_nonuniform_scaling<SB>( &self, scaling: &Matrix<T, <D as DimNameSub<Const<1>>>::Output, Const<1>, SB>, ) -> Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>
where D: DimNameSub<Const<1>>, SB: Storage<T, <D as DimNameSub<Const<1>>>::Output>, DefaultAllocator: Allocator<T, D, D>,

Computes the transformation equal to self followed by a non-uniform scaling factor.

source

pub fn prepend_nonuniform_scaling<SB>( &self, scaling: &Matrix<T, <D as DimNameSub<Const<1>>>::Output, Const<1>, SB>, ) -> Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>
where D: DimNameSub<Const<1>>, SB: Storage<T, <D as DimNameSub<Const<1>>>::Output>, DefaultAllocator: Allocator<T, D, D>,

Computes the transformation equal to a non-uniform scaling factor followed by self.

source

pub fn append_translation<SB>( &self, shift: &Matrix<T, <D as DimNameSub<Const<1>>>::Output, Const<1>, SB>, ) -> Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>
where D: DimNameSub<Const<1>>, SB: Storage<T, <D as DimNameSub<Const<1>>>::Output>, DefaultAllocator: Allocator<T, D, D>,

Computes the transformation equal to self followed by a translation.

source

pub fn prepend_translation<SB>( &self, shift: &Matrix<T, <D as DimNameSub<Const<1>>>::Output, Const<1>, SB>, ) -> Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>
where D: DimNameSub<Const<1>>, SB: Storage<T, <D as DimNameSub<Const<1>>>::Output>, DefaultAllocator: Allocator<T, D, D> + Allocator<T, <D as DimNameSub<Const<1>>>::Output>,

Computes the transformation equal to a translation followed by self.

source

pub fn append_scaling_mut(&mut self, scaling: T)
where S: StorageMut<T, D, D>, D: DimNameSub<Const<1>>,

Computes in-place the transformation equal to self followed by an uniform scaling factor.

source

pub fn prepend_scaling_mut(&mut self, scaling: T)
where S: StorageMut<T, D, D>, D: DimNameSub<Const<1>>,

Computes in-place the transformation equal to an uniform scaling factor followed by self.

source

pub fn append_nonuniform_scaling_mut<SB>( &mut self, scaling: &Matrix<T, <D as DimNameSub<Const<1>>>::Output, Const<1>, SB>, )
where S: StorageMut<T, D, D>, D: DimNameSub<Const<1>>, SB: Storage<T, <D as DimNameSub<Const<1>>>::Output>,

Computes in-place the transformation equal to self followed by a non-uniform scaling factor.

source

pub fn prepend_nonuniform_scaling_mut<SB>( &mut self, scaling: &Matrix<T, <D as DimNameSub<Const<1>>>::Output, Const<1>, SB>, )
where S: StorageMut<T, D, D>, D: DimNameSub<Const<1>>, SB: Storage<T, <D as DimNameSub<Const<1>>>::Output>,

Computes in-place the transformation equal to a non-uniform scaling factor followed by self.

source

pub fn append_translation_mut<SB>( &mut self, shift: &Matrix<T, <D as DimNameSub<Const<1>>>::Output, Const<1>, SB>, )
where S: StorageMut<T, D, D>, D: DimNameSub<Const<1>>, SB: Storage<T, <D as DimNameSub<Const<1>>>::Output>,

Computes the transformation equal to self followed by a translation.

source

pub fn prepend_translation_mut<SB>( &mut self, shift: &Matrix<T, <D as DimNameSub<Const<1>>>::Output, Const<1>, SB>, )
where D: DimNameSub<Const<1>>, S: StorageMut<T, D, D>, SB: Storage<T, <D as DimNameSub<Const<1>>>::Output>, DefaultAllocator: Allocator<T, <D as DimNameSub<Const<1>>>::Output>,

Computes the transformation equal to a translation followed by self.

source§

impl<T, D, S> Matrix<T, D, D, S>
where T: RealField, D: DimNameSub<Const<1>>, S: Storage<T, D, D>, DefaultAllocator: Allocator<T, D, D> + Allocator<T, <D as DimNameSub<Const<1>>>::Output> + Allocator<T, <D as DimNameSub<Const<1>>>::Output, <D as DimNameSub<Const<1>>>::Output>,

§Transformation of vectors and points

source

pub fn transform_vector( &self, v: &Matrix<T, <D as DimNameSub<Const<1>>>::Output, Const<1>, <DefaultAllocator as Allocator<T, <D as DimNameSub<Const<1>>>::Output>>::Buffer>, ) -> Matrix<T, <D as DimNameSub<Const<1>>>::Output, Const<1>, <DefaultAllocator as Allocator<T, <D as DimNameSub<Const<1>>>::Output>>::Buffer>

Transforms the given vector, assuming the matrix self uses homogeneous coordinates.

source§

impl<T, S> Matrix<T, Const<3>, Const<3>, S>
where T: RealField, S: Storage<T, Const<3>, Const<3>>,

source

pub fn transform_point(&self, pt: &OPoint<T, Const<2>>) -> OPoint<T, Const<2>>

Transforms the given point, assuming the matrix self uses homogeneous coordinates.

source§

impl<T, S> Matrix<T, Const<4>, Const<4>, S>
where T: RealField, S: Storage<T, Const<4>, Const<4>>,

source

pub fn transform_point(&self, pt: &OPoint<T, Const<3>>) -> OPoint<T, Const<3>>

Transforms the given point, assuming the matrix self uses homogeneous coordinates.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where T: Scalar, R: Dim, C: Dim, S: Storage<T, R, C>,

source

pub fn abs( &self, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where T: Signed, DefaultAllocator: Allocator<T, R, C>,

Computes the component-wise absolute value.

§Example
let a = Matrix2::new(0.0, 1.0,
                     -2.0, -3.0);
assert_eq!(a.abs(), Matrix2::new(0.0, 1.0, 2.0, 3.0))
source§

impl<T, R1, C1, SA> Matrix<T, R1, C1, SA>
where T: Scalar, R1: Dim, C1: Dim, SA: Storage<T, R1, C1>,

§Componentwise operations

source

pub fn component_mul<R2, C2, SB>( &self, rhs: &Matrix<T, R2, C2, SB>, ) -> Matrix<T, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative, <DefaultAllocator as Allocator<T, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative>>::Buffer>
where T: ClosedMul, R2: Dim, C2: Dim, SB: Storage<T, R2, C2>, DefaultAllocator: SameShapeAllocator<T, R1, C1, R2, C2>, ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfColumns<C1, C2>,

Componentwise matrix or vector multiplication.

§Example
let a = Matrix2::new(0.0, 1.0, 2.0, 3.0);
let b = Matrix2::new(4.0, 5.0, 6.0, 7.0);
let expected = Matrix2::new(0.0, 5.0, 12.0, 21.0);

assert_eq!(a.component_mul(&b), expected);
source

pub fn cmpy<R2, C2, SB, R3, C3, SC>( &mut self, alpha: T, a: &Matrix<T, R2, C2, SB>, b: &Matrix<T, R3, C3, SC>, beta: T, )
where T: ClosedMul<Output = T> + Zero<Output = T> + Mul + Add, R2: Dim, C2: Dim, R3: Dim, C3: Dim, SA: StorageMut<T, R1, C1>, SB: Storage<T, R2, C2>, SC: Storage<T, R3, C3>, ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfColumns<C1, C2> + SameNumberOfRows<R1, R3> + SameNumberOfColumns<C1, C3>,

Computes componentwise self[i] = alpha * a[i] * b[i] + beta * self[i].

§Example
let mut m = Matrix2::new(0.0, 1.0, 2.0, 3.0);
let a = Matrix2::new(0.0, 1.0, 2.0, 3.0);
let b = Matrix2::new(4.0, 5.0, 6.0, 7.0);
let expected = (a.component_mul(&b) * 5.0) + m * 10.0;

m.cmpy(5.0, &a, &b, 10.0);
assert_eq!(m, expected);
source

pub fn component_mul_assign<R2, C2, SB>(&mut self, rhs: &Matrix<T, R2, C2, SB>)
where T: ClosedMul, R2: Dim, C2: Dim, SA: StorageMut<T, R1, C1>, SB: Storage<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfColumns<C1, C2>,

Inplace componentwise matrix or vector multiplication.

§Example
let mut a = Matrix2::new(0.0, 1.0, 2.0, 3.0);
let b = Matrix2::new(4.0, 5.0, 6.0, 7.0);
let expected = Matrix2::new(0.0, 5.0, 12.0, 21.0);

a.component_mul_assign(&b);

assert_eq!(a, expected);
source

pub fn component_mul_mut<R2, C2, SB>(&mut self, rhs: &Matrix<T, R2, C2, SB>)
where T: ClosedMul, R2: Dim, C2: Dim, SA: StorageMut<T, R1, C1>, SB: Storage<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfColumns<C1, C2>,

👎Deprecated: This is renamed using the _assign suffix instead of the _mut suffix.

Inplace componentwise matrix or vector multiplication.

§Example
let mut a = Matrix2::new(0.0, 1.0, 2.0, 3.0);
let b = Matrix2::new(4.0, 5.0, 6.0, 7.0);
let expected = Matrix2::new(0.0, 5.0, 12.0, 21.0);

a.component_mul_assign(&b);

assert_eq!(a, expected);
source

pub fn component_div<R2, C2, SB>( &self, rhs: &Matrix<T, R2, C2, SB>, ) -> Matrix<T, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative, <DefaultAllocator as Allocator<T, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative>>::Buffer>
where T: ClosedDiv, R2: Dim, C2: Dim, SB: Storage<T, R2, C2>, DefaultAllocator: SameShapeAllocator<T, R1, C1, R2, C2>, ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfColumns<C1, C2>,

Componentwise matrix or vector division.

§Example
let a = Matrix2::new(0.0, 1.0, 2.0, 3.0);
let b = Matrix2::new(4.0, 5.0, 6.0, 7.0);
let expected = Matrix2::new(0.0, 1.0 / 5.0, 2.0 / 6.0, 3.0 / 7.0);

assert_eq!(a.component_div(&b), expected);
source

pub fn cdpy<R2, C2, SB, R3, C3, SC>( &mut self, alpha: T, a: &Matrix<T, R2, C2, SB>, b: &Matrix<T, R3, C3, SC>, beta: T, )
where T: ClosedDiv + Zero<Output = T> + Mul<Output = T> + Add, R2: Dim, C2: Dim, R3: Dim, C3: Dim, SA: StorageMut<T, R1, C1>, SB: Storage<T, R2, C2>, SC: Storage<T, R3, C3>, ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfColumns<C1, C2> + SameNumberOfRows<R1, R3> + SameNumberOfColumns<C1, C3>,

Computes componentwise self[i] = alpha * a[i] / b[i] + beta * self[i].

§Example
let mut m = Matrix2::new(0.0, 1.0, 2.0, 3.0);
let a = Matrix2::new(4.0, 5.0, 6.0, 7.0);
let b = Matrix2::new(4.0, 5.0, 6.0, 7.0);
let expected = (a.component_div(&b) * 5.0) + m * 10.0;

m.cdpy(5.0, &a, &b, 10.0);
assert_eq!(m, expected);
source

pub fn component_div_assign<R2, C2, SB>(&mut self, rhs: &Matrix<T, R2, C2, SB>)
where T: ClosedDiv, R2: Dim, C2: Dim, SA: StorageMut<T, R1, C1>, SB: Storage<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfColumns<C1, C2>,

Inplace componentwise matrix or vector division.

§Example
let mut a = Matrix2::new(0.0, 1.0, 2.0, 3.0);
let b = Matrix2::new(4.0, 5.0, 6.0, 7.0);
let expected = Matrix2::new(0.0, 1.0 / 5.0, 2.0 / 6.0, 3.0 / 7.0);

a.component_div_assign(&b);

assert_eq!(a, expected);
source

pub fn component_div_mut<R2, C2, SB>(&mut self, rhs: &Matrix<T, R2, C2, SB>)
where T: ClosedDiv, R2: Dim, C2: Dim, SA: StorageMut<T, R1, C1>, SB: Storage<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfColumns<C1, C2>,

👎Deprecated: This is renamed using the _assign suffix instead of the _mut suffix.

Inplace componentwise matrix or vector division.

§Example
let mut a = Matrix2::new(0.0, 1.0, 2.0, 3.0);
let b = Matrix2::new(4.0, 5.0, 6.0, 7.0);
let expected = Matrix2::new(0.0, 1.0 / 5.0, 2.0 / 6.0, 3.0 / 7.0);

a.component_div_assign(&b);

assert_eq!(a, expected);
source

pub fn inf( &self, other: &Matrix<T, R1, C1, SA>, ) -> Matrix<T, R1, C1, <DefaultAllocator as Allocator<T, R1, C1>>::Buffer>

Computes the infimum (aka. componentwise min) of two matrices/vectors.

§Example
let u = Matrix2::new(4.0, 2.0, 1.0, -2.0);
let v = Matrix2::new(2.0, 4.0, -2.0, 1.0);
let expected = Matrix2::new(2.0, 2.0, -2.0, -2.0);
assert_eq!(u.inf(&v), expected)
source

pub fn sup( &self, other: &Matrix<T, R1, C1, SA>, ) -> Matrix<T, R1, C1, <DefaultAllocator as Allocator<T, R1, C1>>::Buffer>

Computes the supremum (aka. componentwise max) of two matrices/vectors.

§Example
let u = Matrix2::new(4.0, 2.0, 1.0, -2.0);
let v = Matrix2::new(2.0, 4.0, -2.0, 1.0);
let expected = Matrix2::new(4.0, 4.0, 1.0, 1.0);
assert_eq!(u.sup(&v), expected)
source

pub fn inf_sup( &self, other: &Matrix<T, R1, C1, SA>, ) -> (Matrix<T, R1, C1, <DefaultAllocator as Allocator<T, R1, C1>>::Buffer>, Matrix<T, R1, C1, <DefaultAllocator as Allocator<T, R1, C1>>::Buffer>)

Computes the (infimum, supremum) of two matrices/vectors.

§Example
let u = Matrix2::new(4.0, 2.0, 1.0, -2.0);
let v = Matrix2::new(2.0, 4.0, -2.0, 1.0);
let expected = (Matrix2::new(2.0, 2.0, -2.0, -2.0), Matrix2::new(4.0, 4.0, 1.0, 1.0));
assert_eq!(u.inf_sup(&v), expected)
source

pub fn add_scalar( &self, rhs: T, ) -> Matrix<T, R1, C1, <DefaultAllocator as Allocator<T, R1, C1>>::Buffer>
where T: ClosedAdd, DefaultAllocator: Allocator<T, R1, C1>,

Adds a scalar to self.

§Example
let u = Matrix2::new(1.0, 2.0, 3.0, 4.0);
let s = 10.0;
let expected = Matrix2::new(11.0, 12.0, 13.0, 14.0);
assert_eq!(u.add_scalar(s), expected)
source

pub fn add_scalar_mut(&mut self, rhs: T)
where T: ClosedAdd, SA: StorageMut<T, R1, C1>,

Adds a scalar to self in-place.

§Example
let mut u = Matrix2::new(1.0, 2.0, 3.0, 4.0);
let s = 10.0;
u.add_scalar_mut(s);
let expected = Matrix2::new(11.0, 12.0, 13.0, 14.0);
assert_eq!(u, expected)
source§

impl<T, R, C> Matrix<MaybeUninit<T>, R, C, <DefaultAllocator as Allocator<T, R, C>>::BufferUninit>
where T: Scalar, R: Dim, C: Dim, DefaultAllocator: Allocator<T, R, C>,

source

pub fn uninit( nrows: R, ncols: C, ) -> Matrix<MaybeUninit<T>, R, C, <DefaultAllocator as Allocator<T, R, C>>::BufferUninit>

Builds a matrix with uninitialized elements of type MaybeUninit<T>.

source§

impl<T, R, C> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where T: Scalar, R: Dim, C: Dim, DefaultAllocator: Allocator<T, R, C>,

§Generic constructors

This set of matrix and vector construction functions are all generic with-regard to the matrix dimensions. They all expect to be given the dimension as inputs.

These functions should only be used when working on dimension-generic code.

source

pub fn from_element_generic( nrows: R, ncols: C, elem: T, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

Creates a matrix with all its elements set to elem.

source

pub fn repeat_generic( nrows: R, ncols: C, elem: T, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

Creates a matrix with all its elements set to elem.

Same as from_element_generic.

source

pub fn zeros_generic( nrows: R, ncols: C, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where T: Zero,

Creates a matrix with all its elements set to 0.

source

pub fn from_iterator_generic<I>( nrows: R, ncols: C, iter: I, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where I: IntoIterator<Item = T>,

Creates a matrix with all its elements filled by an iterator.

source

pub fn from_row_iterator_generic<I>( nrows: R, ncols: C, iter: I, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where I: IntoIterator<Item = T>,

Creates a matrix with all its elements filled by an row-major order iterator.

source

pub fn from_row_slice_generic( nrows: R, ncols: C, slice: &[T], ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

Creates a matrix with its elements filled with the components provided by a slice in row-major order.

The order of elements in the slice must follow the usual mathematic writing, i.e., row-by-row.

source

pub fn from_column_slice_generic( nrows: R, ncols: C, slice: &[T], ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

Creates a matrix with its elements filled with the components provided by a slice. The components must have the same layout as the matrix data storage (i.e. column-major).

source

pub fn from_fn_generic<F>( nrows: R, ncols: C, f: F, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where F: FnMut(usize, usize) -> T,

Creates a matrix filled with the results of a function applied to each of its component coordinates.

source

pub fn identity_generic( nrows: R, ncols: C, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where T: Zero + One,

Creates a new identity matrix.

If the matrix is not square, the largest square submatrix starting at index (0, 0) is set to the identity matrix. All other entries are set to zero.

source

pub fn from_diagonal_element_generic( nrows: R, ncols: C, elt: T, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where T: Zero + One,

Creates a new matrix with its diagonal filled with copies of elt.

If the matrix is not square, the largest square submatrix starting at index (0, 0) is set to the identity matrix. All other entries are set to zero.

source

pub fn from_partial_diagonal_generic( nrows: R, ncols: C, elts: &[T], ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where T: Zero,

Creates a new matrix that may be rectangular. The first elts.len() diagonal elements are filled with the content of elts. Others are set to 0.

Panics if elts.len() is larger than the minimum among nrows and ncols.

source

pub fn from_rows<SB>( rows: &[Matrix<T, Const<1>, C, SB>], ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where SB: RawStorage<T, Const<1>, C>,

Builds a new matrix from its rows.

Panics if not enough rows are provided (for statically-sized matrices), or if all rows do not have the same dimensions.

§Example

let m = Matrix3::from_rows(&[ RowVector3::new(1.0, 2.0, 3.0),  RowVector3::new(4.0, 5.0, 6.0),  RowVector3::new(7.0, 8.0, 9.0) ]);

assert!(m.m11 == 1.0 && m.m12 == 2.0 && m.m13 == 3.0 &&
        m.m21 == 4.0 && m.m22 == 5.0 && m.m23 == 6.0 &&
        m.m31 == 7.0 && m.m32 == 8.0 && m.m33 == 9.0);
source

pub fn from_columns<SB>( columns: &[Matrix<T, R, Const<1>, SB>], ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where SB: RawStorage<T, R>,

Builds a new matrix from its columns.

Panics if not enough columns are provided (for statically-sized matrices), or if all columns do not have the same dimensions.

§Example

let m = Matrix3::from_columns(&[ Vector3::new(1.0, 2.0, 3.0),  Vector3::new(4.0, 5.0, 6.0),  Vector3::new(7.0, 8.0, 9.0) ]);

assert!(m.m11 == 1.0 && m.m12 == 4.0 && m.m13 == 7.0 &&
        m.m21 == 2.0 && m.m22 == 5.0 && m.m23 == 8.0 &&
        m.m31 == 3.0 && m.m32 == 6.0 && m.m33 == 9.0);
source

pub fn from_vec_generic( nrows: R, ncols: C, data: Vec<T>, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

Creates a matrix backed by a given Vec.

The output matrix is filled column-by-column.

§Example

let vec = vec![0, 1, 2, 3, 4, 5];
let vec_ptr = vec.as_ptr();

let matrix = Matrix::from_vec_generic(Dyn(vec.len()), Const::<1>, vec);
let matrix_storage_ptr = matrix.data.as_vec().as_ptr();

// `matrix` is backed by exactly the same `Vec` as it was constructed from.
assert_eq!(matrix_storage_ptr, vec_ptr);
source§

impl<T, D> Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>
where D: Dim, T: Scalar, DefaultAllocator: Allocator<T, D, D>,

source

pub fn from_diagonal<SB>( diag: &Matrix<T, D, Const<1>, SB>, ) -> Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>
where SB: RawStorage<T, D>, T: Zero,

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);
source§

impl<T, R, C> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where T: Scalar, R: DimName, C: DimName, DefaultAllocator: Allocator<T, R, C>,

§Constructors of statically-sized vectors or statically-sized matrices

source

pub fn from_element( elem: T, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

Creates a matrix or vector with all its elements set to elem.

§Example

let v = Vector3::from_element(2.0);
// The additional argument represents the vector dimension.
let dv = DVector::from_element(3, 2.0);
let m = Matrix2x3::from_element(2.0);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_element(2, 3, 2.0);

assert!(v.x == 2.0 && v.y == 2.0 && v.z == 2.0);
assert!(dv[0] == 2.0 && dv[1] == 2.0 && dv[2] == 2.0);
assert!(m.m11 == 2.0 && m.m12 == 2.0 && m.m13 == 2.0 &&
        m.m21 == 2.0 && m.m22 == 2.0 && m.m23 == 2.0);
assert!(dm[(0, 0)] == 2.0 && dm[(0, 1)] == 2.0 && dm[(0, 2)] == 2.0 &&
        dm[(1, 0)] == 2.0 && dm[(1, 1)] == 2.0 && dm[(1, 2)] == 2.0);
source

pub fn repeat( elem: T, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

Creates a matrix or vector with all its elements set to elem.

Same as .from_element.

§Example

let v = Vector3::repeat(2.0);
// The additional argument represents the vector dimension.
let dv = DVector::repeat(3, 2.0);
let m = Matrix2x3::repeat(2.0);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::repeat(2, 3, 2.0);

assert!(v.x == 2.0 && v.y == 2.0 && v.z == 2.0);
assert!(dv[0] == 2.0 && dv[1] == 2.0 && dv[2] == 2.0);
assert!(m.m11 == 2.0 && m.m12 == 2.0 && m.m13 == 2.0 &&
        m.m21 == 2.0 && m.m22 == 2.0 && m.m23 == 2.0);
assert!(dm[(0, 0)] == 2.0 && dm[(0, 1)] == 2.0 && dm[(0, 2)] == 2.0 &&
        dm[(1, 0)] == 2.0 && dm[(1, 1)] == 2.0 && dm[(1, 2)] == 2.0);
source

pub fn zeros() -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where T: Zero,

Creates a matrix or vector with all its elements set to 0.

§Example

let v = Vector3::<f32>::zeros();
// The argument represents the vector dimension.
let dv = DVector::<f32>::zeros(3);
let m = Matrix2x3::<f32>::zeros();
// The two arguments represent the matrix dimensions.
let dm = DMatrix::<f32>::zeros(2, 3);

assert!(v.x == 0.0 && v.y == 0.0 && v.z == 0.0);
assert!(dv[0] == 0.0 && dv[1] == 0.0 && dv[2] == 0.0);
assert!(m.m11 == 0.0 && m.m12 == 0.0 && m.m13 == 0.0 &&
        m.m21 == 0.0 && m.m22 == 0.0 && m.m23 == 0.0);
assert!(dm[(0, 0)] == 0.0 && dm[(0, 1)] == 0.0 && dm[(0, 2)] == 0.0 &&
        dm[(1, 0)] == 0.0 && dm[(1, 1)] == 0.0 && dm[(1, 2)] == 0.0);
source

pub fn from_iterator<I>( iter: I, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where I: IntoIterator<Item = T>,

Creates a matrix or vector with all its elements filled by an iterator.

The output matrix is filled column-by-column.

§Example

let v = Vector3::from_iterator((0..3).into_iter());
// The additional argument represents the vector dimension.
let dv = DVector::from_iterator(3, (0..3).into_iter());
let m = Matrix2x3::from_iterator((0..6).into_iter());
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_iterator(2, 3, (0..6).into_iter());

assert!(v.x == 0 && v.y == 1 && v.z == 2);
assert!(dv[0] == 0 && dv[1] == 1 && dv[2] == 2);
assert!(m.m11 == 0 && m.m12 == 2 && m.m13 == 4 &&
        m.m21 == 1 && m.m22 == 3 && m.m23 == 5);
assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 2 && dm[(0, 2)] == 4 &&
        dm[(1, 0)] == 1 && dm[(1, 1)] == 3 && dm[(1, 2)] == 5);
source

pub fn from_row_iterator<I>( iter: I, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where I: IntoIterator<Item = T>,

Creates a matrix or vector with all its elements filled by a row-major iterator.

The output matrix is filled row-by-row.

§Example

let v = Vector3::from_row_iterator((0..3).into_iter());
// The additional argument represents the vector dimension.
let dv = DVector::from_row_iterator(3, (0..3).into_iter());
let m = Matrix2x3::from_row_iterator((0..6).into_iter());
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_row_iterator(2, 3, (0..6).into_iter());

// For Vectors from_row_iterator is identical to from_iterator
assert!(v.x == 0 && v.y == 1 && v.z == 2);
assert!(dv[0] == 0 && dv[1] == 1 && dv[2] == 2);
assert!(m.m11 == 0 && m.m12 == 1 && m.m13 == 2 &&
        m.m21 == 3 && m.m22 == 4 && m.m23 == 5);
assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 1 && dm[(0, 2)] == 2 &&
        dm[(1, 0)] == 3 && dm[(1, 1)] == 4 && dm[(1, 2)] == 5);
source

pub fn from_fn<F>( f: F, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where F: FnMut(usize, usize) -> T,

Creates a matrix or vector filled with the results of a function applied to each of its component coordinates.

§Example

let v = Vector3::from_fn(|i, _| i);
// The additional argument represents the vector dimension.
let dv = DVector::from_fn(3, |i, _| i);
let m = Matrix2x3::from_fn(|i, j| i * 3 + j);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_fn(2, 3, |i, j| i * 3 + j);

assert!(v.x == 0 && v.y == 1 && v.z == 2);
assert!(dv[0] == 0 && dv[1] == 1 && dv[2] == 2);
assert!(m.m11 == 0 && m.m12 == 1 && m.m13 == 2 &&
        m.m21 == 3 && m.m22 == 4 && m.m23 == 5);
assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 1 && dm[(0, 2)] == 2 &&
        dm[(1, 0)] == 3 && dm[(1, 1)] == 4 && dm[(1, 2)] == 5);
source

pub fn identity() -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where T: Zero + One,

Creates an identity matrix. If the matrix is not square, the largest square submatrix (starting at the first row and column) is set to the identity while all other entries are set to zero.

§Example

let m = Matrix2x3::<f32>::identity();
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::<f32>::identity(2, 3);

assert!(m.m11 == 1.0 && m.m12 == 0.0 && m.m13 == 0.0 &&
        m.m21 == 0.0 && m.m22 == 1.0 && m.m23 == 0.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)] == 1.0 && dm[(1, 2)] == 0.0);
source

pub fn from_diagonal_element( elt: T, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where T: Zero + One,

Creates a matrix filled with its diagonal filled with elt and all other components set to zero.

§Example

let m = Matrix2x3::from_diagonal_element(5.0);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_diagonal_element(2, 3, 5.0);

assert!(m.m11 == 5.0 && m.m12 == 0.0 && m.m13 == 0.0 &&
        m.m21 == 0.0 && m.m22 == 5.0 && m.m23 == 0.0);
assert!(dm[(0, 0)] == 5.0 && dm[(0, 1)] == 0.0 && dm[(0, 2)] == 0.0 &&
        dm[(1, 0)] == 0.0 && dm[(1, 1)] == 5.0 && dm[(1, 2)] == 0.0);
source

pub fn from_partial_diagonal( elts: &[T], ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where T: Zero,

Creates a new matrix that may be rectangular. The first elts.len() diagonal elements are filled with the content of elts. Others are set to 0.

Panics if elts.len() is larger than the minimum among nrows and ncols.

§Example

let m = Matrix3::from_partial_diagonal(&[1.0, 2.0]);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_partial_diagonal(3, 3, &[1.0, 2.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 == 0.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)] == 0.0);
source§

impl<T, R> Matrix<T, R, Dyn, <DefaultAllocator as Allocator<T, R, Dyn>>::Buffer>

§Constructors of matrices with a dynamic number of columns

source

pub fn from_element( ncols: usize, elem: T, ) -> Matrix<T, R, Dyn, <DefaultAllocator as Allocator<T, R, Dyn>>::Buffer>

Creates a matrix or vector with all its elements set to elem.

§Example

let v = Vector3::from_element(2.0);
// The additional argument represents the vector dimension.
let dv = DVector::from_element(3, 2.0);
let m = Matrix2x3::from_element(2.0);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_element(2, 3, 2.0);

assert!(v.x == 2.0 && v.y == 2.0 && v.z == 2.0);
assert!(dv[0] == 2.0 && dv[1] == 2.0 && dv[2] == 2.0);
assert!(m.m11 == 2.0 && m.m12 == 2.0 && m.m13 == 2.0 &&
        m.m21 == 2.0 && m.m22 == 2.0 && m.m23 == 2.0);
assert!(dm[(0, 0)] == 2.0 && dm[(0, 1)] == 2.0 && dm[(0, 2)] == 2.0 &&
        dm[(1, 0)] == 2.0 && dm[(1, 1)] == 2.0 && dm[(1, 2)] == 2.0);
source

pub fn repeat( ncols: usize, elem: T, ) -> Matrix<T, R, Dyn, <DefaultAllocator as Allocator<T, R, Dyn>>::Buffer>

Creates a matrix or vector with all its elements set to elem.

Same as .from_element.

§Example

let v = Vector3::repeat(2.0);
// The additional argument represents the vector dimension.
let dv = DVector::repeat(3, 2.0);
let m = Matrix2x3::repeat(2.0);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::repeat(2, 3, 2.0);

assert!(v.x == 2.0 && v.y == 2.0 && v.z == 2.0);
assert!(dv[0] == 2.0 && dv[1] == 2.0 && dv[2] == 2.0);
assert!(m.m11 == 2.0 && m.m12 == 2.0 && m.m13 == 2.0 &&
        m.m21 == 2.0 && m.m22 == 2.0 && m.m23 == 2.0);
assert!(dm[(0, 0)] == 2.0 && dm[(0, 1)] == 2.0 && dm[(0, 2)] == 2.0 &&
        dm[(1, 0)] == 2.0 && dm[(1, 1)] == 2.0 && dm[(1, 2)] == 2.0);
source

pub fn zeros( ncols: usize, ) -> Matrix<T, R, Dyn, <DefaultAllocator as Allocator<T, R, Dyn>>::Buffer>
where T: Zero,

Creates a matrix or vector with all its elements set to 0.

§Example

let v = Vector3::<f32>::zeros();
// The argument represents the vector dimension.
let dv = DVector::<f32>::zeros(3);
let m = Matrix2x3::<f32>::zeros();
// The two arguments represent the matrix dimensions.
let dm = DMatrix::<f32>::zeros(2, 3);

assert!(v.x == 0.0 && v.y == 0.0 && v.z == 0.0);
assert!(dv[0] == 0.0 && dv[1] == 0.0 && dv[2] == 0.0);
assert!(m.m11 == 0.0 && m.m12 == 0.0 && m.m13 == 0.0 &&
        m.m21 == 0.0 && m.m22 == 0.0 && m.m23 == 0.0);
assert!(dm[(0, 0)] == 0.0 && dm[(0, 1)] == 0.0 && dm[(0, 2)] == 0.0 &&
        dm[(1, 0)] == 0.0 && dm[(1, 1)] == 0.0 && dm[(1, 2)] == 0.0);
source

pub fn from_iterator<I>( ncols: usize, iter: I, ) -> Matrix<T, R, Dyn, <DefaultAllocator as Allocator<T, R, Dyn>>::Buffer>
where I: IntoIterator<Item = T>,

Creates a matrix or vector with all its elements filled by an iterator.

The output matrix is filled column-by-column.

§Example

let v = Vector3::from_iterator((0..3).into_iter());
// The additional argument represents the vector dimension.
let dv = DVector::from_iterator(3, (0..3).into_iter());
let m = Matrix2x3::from_iterator((0..6).into_iter());
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_iterator(2, 3, (0..6).into_iter());

assert!(v.x == 0 && v.y == 1 && v.z == 2);
assert!(dv[0] == 0 && dv[1] == 1 && dv[2] == 2);
assert!(m.m11 == 0 && m.m12 == 2 && m.m13 == 4 &&
        m.m21 == 1 && m.m22 == 3 && m.m23 == 5);
assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 2 && dm[(0, 2)] == 4 &&
        dm[(1, 0)] == 1 && dm[(1, 1)] == 3 && dm[(1, 2)] == 5);
source

pub fn from_row_iterator<I>( ncols: usize, iter: I, ) -> Matrix<T, R, Dyn, <DefaultAllocator as Allocator<T, R, Dyn>>::Buffer>
where I: IntoIterator<Item = T>,

Creates a matrix or vector with all its elements filled by a row-major iterator.

The output matrix is filled row-by-row.

§Example

let v = Vector3::from_row_iterator((0..3).into_iter());
// The additional argument represents the vector dimension.
let dv = DVector::from_row_iterator(3, (0..3).into_iter());
let m = Matrix2x3::from_row_iterator((0..6).into_iter());
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_row_iterator(2, 3, (0..6).into_iter());

// For Vectors from_row_iterator is identical to from_iterator
assert!(v.x == 0 && v.y == 1 && v.z == 2);
assert!(dv[0] == 0 && dv[1] == 1 && dv[2] == 2);
assert!(m.m11 == 0 && m.m12 == 1 && m.m13 == 2 &&
        m.m21 == 3 && m.m22 == 4 && m.m23 == 5);
assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 1 && dm[(0, 2)] == 2 &&
        dm[(1, 0)] == 3 && dm[(1, 1)] == 4 && dm[(1, 2)] == 5);
source

pub fn from_fn<F>( ncols: usize, f: F, ) -> Matrix<T, R, Dyn, <DefaultAllocator as Allocator<T, R, Dyn>>::Buffer>
where F: FnMut(usize, usize) -> T,

Creates a matrix or vector filled with the results of a function applied to each of its component coordinates.

§Example

let v = Vector3::from_fn(|i, _| i);
// The additional argument represents the vector dimension.
let dv = DVector::from_fn(3, |i, _| i);
let m = Matrix2x3::from_fn(|i, j| i * 3 + j);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_fn(2, 3, |i, j| i * 3 + j);

assert!(v.x == 0 && v.y == 1 && v.z == 2);
assert!(dv[0] == 0 && dv[1] == 1 && dv[2] == 2);
assert!(m.m11 == 0 && m.m12 == 1 && m.m13 == 2 &&
        m.m21 == 3 && m.m22 == 4 && m.m23 == 5);
assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 1 && dm[(0, 2)] == 2 &&
        dm[(1, 0)] == 3 && dm[(1, 1)] == 4 && dm[(1, 2)] == 5);
source

pub fn identity( ncols: usize, ) -> Matrix<T, R, Dyn, <DefaultAllocator as Allocator<T, R, Dyn>>::Buffer>
where T: Zero + One,

Creates an identity matrix. If the matrix is not square, the largest square submatrix (starting at the first row and column) is set to the identity while all other entries are set to zero.

§Example

let m = Matrix2x3::<f32>::identity();
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::<f32>::identity(2, 3);

assert!(m.m11 == 1.0 && m.m12 == 0.0 && m.m13 == 0.0 &&
        m.m21 == 0.0 && m.m22 == 1.0 && m.m23 == 0.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)] == 1.0 && dm[(1, 2)] == 0.0);
source

pub fn from_diagonal_element( ncols: usize, elt: T, ) -> Matrix<T, R, Dyn, <DefaultAllocator as Allocator<T, R, Dyn>>::Buffer>
where T: Zero + One,

Creates a matrix filled with its diagonal filled with elt and all other components set to zero.

§Example

let m = Matrix2x3::from_diagonal_element(5.0);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_diagonal_element(2, 3, 5.0);

assert!(m.m11 == 5.0 && m.m12 == 0.0 && m.m13 == 0.0 &&
        m.m21 == 0.0 && m.m22 == 5.0 && m.m23 == 0.0);
assert!(dm[(0, 0)] == 5.0 && dm[(0, 1)] == 0.0 && dm[(0, 2)] == 0.0 &&
        dm[(1, 0)] == 0.0 && dm[(1, 1)] == 5.0 && dm[(1, 2)] == 0.0);
source

pub fn from_partial_diagonal( ncols: usize, elts: &[T], ) -> Matrix<T, R, Dyn, <DefaultAllocator as Allocator<T, R, Dyn>>::Buffer>
where T: Zero,

Creates a new matrix that may be rectangular. The first elts.len() diagonal elements are filled with the content of elts. Others are set to 0.

Panics if elts.len() is larger than the minimum among nrows and ncols.

§Example

let m = Matrix3::from_partial_diagonal(&[1.0, 2.0]);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_partial_diagonal(3, 3, &[1.0, 2.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 == 0.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)] == 0.0);
source§

impl<T, C> Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>

§Constructors of dynamic vectors and matrices with a dynamic number of rows

source

pub fn from_element( nrows: usize, elem: T, ) -> Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>

Creates a matrix or vector with all its elements set to elem.

§Example

let v = Vector3::from_element(2.0);
// The additional argument represents the vector dimension.
let dv = DVector::from_element(3, 2.0);
let m = Matrix2x3::from_element(2.0);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_element(2, 3, 2.0);

assert!(v.x == 2.0 && v.y == 2.0 && v.z == 2.0);
assert!(dv[0] == 2.0 && dv[1] == 2.0 && dv[2] == 2.0);
assert!(m.m11 == 2.0 && m.m12 == 2.0 && m.m13 == 2.0 &&
        m.m21 == 2.0 && m.m22 == 2.0 && m.m23 == 2.0);
assert!(dm[(0, 0)] == 2.0 && dm[(0, 1)] == 2.0 && dm[(0, 2)] == 2.0 &&
        dm[(1, 0)] == 2.0 && dm[(1, 1)] == 2.0 && dm[(1, 2)] == 2.0);
source

pub fn repeat( nrows: usize, elem: T, ) -> Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>

Creates a matrix or vector with all its elements set to elem.

Same as .from_element.

§Example

let v = Vector3::repeat(2.0);
// The additional argument represents the vector dimension.
let dv = DVector::repeat(3, 2.0);
let m = Matrix2x3::repeat(2.0);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::repeat(2, 3, 2.0);

assert!(v.x == 2.0 && v.y == 2.0 && v.z == 2.0);
assert!(dv[0] == 2.0 && dv[1] == 2.0 && dv[2] == 2.0);
assert!(m.m11 == 2.0 && m.m12 == 2.0 && m.m13 == 2.0 &&
        m.m21 == 2.0 && m.m22 == 2.0 && m.m23 == 2.0);
assert!(dm[(0, 0)] == 2.0 && dm[(0, 1)] == 2.0 && dm[(0, 2)] == 2.0 &&
        dm[(1, 0)] == 2.0 && dm[(1, 1)] == 2.0 && dm[(1, 2)] == 2.0);
source

pub fn zeros( nrows: usize, ) -> Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>
where T: Zero,

Creates a matrix or vector with all its elements set to 0.

§Example

let v = Vector3::<f32>::zeros();
// The argument represents the vector dimension.
let dv = DVector::<f32>::zeros(3);
let m = Matrix2x3::<f32>::zeros();
// The two arguments represent the matrix dimensions.
let dm = DMatrix::<f32>::zeros(2, 3);

assert!(v.x == 0.0 && v.y == 0.0 && v.z == 0.0);
assert!(dv[0] == 0.0 && dv[1] == 0.0 && dv[2] == 0.0);
assert!(m.m11 == 0.0 && m.m12 == 0.0 && m.m13 == 0.0 &&
        m.m21 == 0.0 && m.m22 == 0.0 && m.m23 == 0.0);
assert!(dm[(0, 0)] == 0.0 && dm[(0, 1)] == 0.0 && dm[(0, 2)] == 0.0 &&
        dm[(1, 0)] == 0.0 && dm[(1, 1)] == 0.0 && dm[(1, 2)] == 0.0);
source

pub fn from_iterator<I>( nrows: usize, iter: I, ) -> Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>
where I: IntoIterator<Item = T>,

Creates a matrix or vector with all its elements filled by an iterator.

The output matrix is filled column-by-column.

§Example

let v = Vector3::from_iterator((0..3).into_iter());
// The additional argument represents the vector dimension.
let dv = DVector::from_iterator(3, (0..3).into_iter());
let m = Matrix2x3::from_iterator((0..6).into_iter());
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_iterator(2, 3, (0..6).into_iter());

assert!(v.x == 0 && v.y == 1 && v.z == 2);
assert!(dv[0] == 0 && dv[1] == 1 && dv[2] == 2);
assert!(m.m11 == 0 && m.m12 == 2 && m.m13 == 4 &&
        m.m21 == 1 && m.m22 == 3 && m.m23 == 5);
assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 2 && dm[(0, 2)] == 4 &&
        dm[(1, 0)] == 1 && dm[(1, 1)] == 3 && dm[(1, 2)] == 5);
source

pub fn from_row_iterator<I>( nrows: usize, iter: I, ) -> Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>
where I: IntoIterator<Item = T>,

Creates a matrix or vector with all its elements filled by a row-major iterator.

The output matrix is filled row-by-row.

§Example

let v = Vector3::from_row_iterator((0..3).into_iter());
// The additional argument represents the vector dimension.
let dv = DVector::from_row_iterator(3, (0..3).into_iter());
let m = Matrix2x3::from_row_iterator((0..6).into_iter());
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_row_iterator(2, 3, (0..6).into_iter());

// For Vectors from_row_iterator is identical to from_iterator
assert!(v.x == 0 && v.y == 1 && v.z == 2);
assert!(dv[0] == 0 && dv[1] == 1 && dv[2] == 2);
assert!(m.m11 == 0 && m.m12 == 1 && m.m13 == 2 &&
        m.m21 == 3 && m.m22 == 4 && m.m23 == 5);
assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 1 && dm[(0, 2)] == 2 &&
        dm[(1, 0)] == 3 && dm[(1, 1)] == 4 && dm[(1, 2)] == 5);
source

pub fn from_fn<F>( nrows: usize, f: F, ) -> Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>
where F: FnMut(usize, usize) -> T,

Creates a matrix or vector filled with the results of a function applied to each of its component coordinates.

§Example

let v = Vector3::from_fn(|i, _| i);
// The additional argument represents the vector dimension.
let dv = DVector::from_fn(3, |i, _| i);
let m = Matrix2x3::from_fn(|i, j| i * 3 + j);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_fn(2, 3, |i, j| i * 3 + j);

assert!(v.x == 0 && v.y == 1 && v.z == 2);
assert!(dv[0] == 0 && dv[1] == 1 && dv[2] == 2);
assert!(m.m11 == 0 && m.m12 == 1 && m.m13 == 2 &&
        m.m21 == 3 && m.m22 == 4 && m.m23 == 5);
assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 1 && dm[(0, 2)] == 2 &&
        dm[(1, 0)] == 3 && dm[(1, 1)] == 4 && dm[(1, 2)] == 5);
source

pub fn identity( nrows: usize, ) -> Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>
where T: Zero + One,

Creates an identity matrix. If the matrix is not square, the largest square submatrix (starting at the first row and column) is set to the identity while all other entries are set to zero.

§Example

let m = Matrix2x3::<f32>::identity();
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::<f32>::identity(2, 3);

assert!(m.m11 == 1.0 && m.m12 == 0.0 && m.m13 == 0.0 &&
        m.m21 == 0.0 && m.m22 == 1.0 && m.m23 == 0.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)] == 1.0 && dm[(1, 2)] == 0.0);
source

pub fn from_diagonal_element( nrows: usize, elt: T, ) -> Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>
where T: Zero + One,

Creates a matrix filled with its diagonal filled with elt and all other components set to zero.

§Example

let m = Matrix2x3::from_diagonal_element(5.0);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_diagonal_element(2, 3, 5.0);

assert!(m.m11 == 5.0 && m.m12 == 0.0 && m.m13 == 0.0 &&
        m.m21 == 0.0 && m.m22 == 5.0 && m.m23 == 0.0);
assert!(dm[(0, 0)] == 5.0 && dm[(0, 1)] == 0.0 && dm[(0, 2)] == 0.0 &&
        dm[(1, 0)] == 0.0 && dm[(1, 1)] == 5.0 && dm[(1, 2)] == 0.0);
source

pub fn from_partial_diagonal( nrows: usize, elts: &[T], ) -> Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>
where T: Zero,

Creates a new matrix that may be rectangular. The first elts.len() diagonal elements are filled with the content of elts. Others are set to 0.

Panics if elts.len() is larger than the minimum among nrows and ncols.

§Example

let m = Matrix3::from_partial_diagonal(&[1.0, 2.0]);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_partial_diagonal(3, 3, &[1.0, 2.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 == 0.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)] == 0.0);
source§

impl<T> Matrix<T, Dyn, Dyn, <DefaultAllocator as Allocator<T, Dyn, Dyn>>::Buffer>

§Constructors of fully dynamic matrices

source

pub fn from_element( nrows: usize, ncols: usize, elem: T, ) -> Matrix<T, Dyn, Dyn, <DefaultAllocator as Allocator<T, Dyn, Dyn>>::Buffer>

Creates a matrix or vector with all its elements set to elem.

§Example

let v = Vector3::from_element(2.0);
// The additional argument represents the vector dimension.
let dv = DVector::from_element(3, 2.0);
let m = Matrix2x3::from_element(2.0);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_element(2, 3, 2.0);

assert!(v.x == 2.0 && v.y == 2.0 && v.z == 2.0);
assert!(dv[0] == 2.0 && dv[1] == 2.0 && dv[2] == 2.0);
assert!(m.m11 == 2.0 && m.m12 == 2.0 && m.m13 == 2.0 &&
        m.m21 == 2.0 && m.m22 == 2.0 && m.m23 == 2.0);
assert!(dm[(0, 0)] == 2.0 && dm[(0, 1)] == 2.0 && dm[(0, 2)] == 2.0 &&
        dm[(1, 0)] == 2.0 && dm[(1, 1)] == 2.0 && dm[(1, 2)] == 2.0);
source

pub fn repeat( nrows: usize, ncols: usize, elem: T, ) -> Matrix<T, Dyn, Dyn, <DefaultAllocator as Allocator<T, Dyn, Dyn>>::Buffer>

Creates a matrix or vector with all its elements set to elem.

Same as .from_element.

§Example

let v = Vector3::repeat(2.0);
// The additional argument represents the vector dimension.
let dv = DVector::repeat(3, 2.0);
let m = Matrix2x3::repeat(2.0);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::repeat(2, 3, 2.0);

assert!(v.x == 2.0 && v.y == 2.0 && v.z == 2.0);
assert!(dv[0] == 2.0 && dv[1] == 2.0 && dv[2] == 2.0);
assert!(m.m11 == 2.0 && m.m12 == 2.0 && m.m13 == 2.0 &&
        m.m21 == 2.0 && m.m22 == 2.0 && m.m23 == 2.0);
assert!(dm[(0, 0)] == 2.0 && dm[(0, 1)] == 2.0 && dm[(0, 2)] == 2.0 &&
        dm[(1, 0)] == 2.0 && dm[(1, 1)] == 2.0 && dm[(1, 2)] == 2.0);
source

pub fn zeros( nrows: usize, ncols: usize, ) -> Matrix<T, Dyn, Dyn, <DefaultAllocator as Allocator<T, Dyn, Dyn>>::Buffer>
where T: Zero,

Creates a matrix or vector with all its elements set to 0.

§Example

let v = Vector3::<f32>::zeros();
// The argument represents the vector dimension.
let dv = DVector::<f32>::zeros(3);
let m = Matrix2x3::<f32>::zeros();
// The two arguments represent the matrix dimensions.
let dm = DMatrix::<f32>::zeros(2, 3);

assert!(v.x == 0.0 && v.y == 0.0 && v.z == 0.0);
assert!(dv[0] == 0.0 && dv[1] == 0.0 && dv[2] == 0.0);
assert!(m.m11 == 0.0 && m.m12 == 0.0 && m.m13 == 0.0 &&
        m.m21 == 0.0 && m.m22 == 0.0 && m.m23 == 0.0);
assert!(dm[(0, 0)] == 0.0 && dm[(0, 1)] == 0.0 && dm[(0, 2)] == 0.0 &&
        dm[(1, 0)] == 0.0 && dm[(1, 1)] == 0.0 && dm[(1, 2)] == 0.0);
source

pub fn from_iterator<I>( nrows: usize, ncols: usize, iter: I, ) -> Matrix<T, Dyn, Dyn, <DefaultAllocator as Allocator<T, Dyn, Dyn>>::Buffer>
where I: IntoIterator<Item = T>,

Creates a matrix or vector with all its elements filled by an iterator.

The output matrix is filled column-by-column.

§Example

let v = Vector3::from_iterator((0..3).into_iter());
// The additional argument represents the vector dimension.
let dv = DVector::from_iterator(3, (0..3).into_iter());
let m = Matrix2x3::from_iterator((0..6).into_iter());
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_iterator(2, 3, (0..6).into_iter());

assert!(v.x == 0 && v.y == 1 && v.z == 2);
assert!(dv[0] == 0 && dv[1] == 1 && dv[2] == 2);
assert!(m.m11 == 0 && m.m12 == 2 && m.m13 == 4 &&
        m.m21 == 1 && m.m22 == 3 && m.m23 == 5);
assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 2 && dm[(0, 2)] == 4 &&
        dm[(1, 0)] == 1 && dm[(1, 1)] == 3 && dm[(1, 2)] == 5);
source

pub fn from_row_iterator<I>( nrows: usize, ncols: usize, iter: I, ) -> Matrix<T, Dyn, Dyn, <DefaultAllocator as Allocator<T, Dyn, Dyn>>::Buffer>
where I: IntoIterator<Item = T>,

Creates a matrix or vector with all its elements filled by a row-major iterator.

The output matrix is filled row-by-row.

§Example

let v = Vector3::from_row_iterator((0..3).into_iter());
// The additional argument represents the vector dimension.
let dv = DVector::from_row_iterator(3, (0..3).into_iter());
let m = Matrix2x3::from_row_iterator((0..6).into_iter());
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_row_iterator(2, 3, (0..6).into_iter());

// For Vectors from_row_iterator is identical to from_iterator
assert!(v.x == 0 && v.y == 1 && v.z == 2);
assert!(dv[0] == 0 && dv[1] == 1 && dv[2] == 2);
assert!(m.m11 == 0 && m.m12 == 1 && m.m13 == 2 &&
        m.m21 == 3 && m.m22 == 4 && m.m23 == 5);
assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 1 && dm[(0, 2)] == 2 &&
        dm[(1, 0)] == 3 && dm[(1, 1)] == 4 && dm[(1, 2)] == 5);
source

pub fn from_fn<F>( nrows: usize, ncols: usize, f: F, ) -> Matrix<T, Dyn, Dyn, <DefaultAllocator as Allocator<T, Dyn, Dyn>>::Buffer>
where F: FnMut(usize, usize) -> T,

Creates a matrix or vector filled with the results of a function applied to each of its component coordinates.

§Example

let v = Vector3::from_fn(|i, _| i);
// The additional argument represents the vector dimension.
let dv = DVector::from_fn(3, |i, _| i);
let m = Matrix2x3::from_fn(|i, j| i * 3 + j);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_fn(2, 3, |i, j| i * 3 + j);

assert!(v.x == 0 && v.y == 1 && v.z == 2);
assert!(dv[0] == 0 && dv[1] == 1 && dv[2] == 2);
assert!(m.m11 == 0 && m.m12 == 1 && m.m13 == 2 &&
        m.m21 == 3 && m.m22 == 4 && m.m23 == 5);
assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 1 && dm[(0, 2)] == 2 &&
        dm[(1, 0)] == 3 && dm[(1, 1)] == 4 && dm[(1, 2)] == 5);
source

pub fn identity( nrows: usize, ncols: usize, ) -> Matrix<T, Dyn, Dyn, <DefaultAllocator as Allocator<T, Dyn, Dyn>>::Buffer>
where T: Zero + One,

Creates an identity matrix. If the matrix is not square, the largest square submatrix (starting at the first row and column) is set to the identity while all other entries are set to zero.

§Example

let m = Matrix2x3::<f32>::identity();
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::<f32>::identity(2, 3);

assert!(m.m11 == 1.0 && m.m12 == 0.0 && m.m13 == 0.0 &&
        m.m21 == 0.0 && m.m22 == 1.0 && m.m23 == 0.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)] == 1.0 && dm[(1, 2)] == 0.0);
source

pub fn from_diagonal_element( nrows: usize, ncols: usize, elt: T, ) -> Matrix<T, Dyn, Dyn, <DefaultAllocator as Allocator<T, Dyn, Dyn>>::Buffer>
where T: Zero + One,

Creates a matrix filled with its diagonal filled with elt and all other components set to zero.

§Example

let m = Matrix2x3::from_diagonal_element(5.0);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_diagonal_element(2, 3, 5.0);

assert!(m.m11 == 5.0 && m.m12 == 0.0 && m.m13 == 0.0 &&
        m.m21 == 0.0 && m.m22 == 5.0 && m.m23 == 0.0);
assert!(dm[(0, 0)] == 5.0 && dm[(0, 1)] == 0.0 && dm[(0, 2)] == 0.0 &&
        dm[(1, 0)] == 0.0 && dm[(1, 1)] == 5.0 && dm[(1, 2)] == 0.0);
source

pub fn from_partial_diagonal( nrows: usize, ncols: usize, elts: &[T], ) -> Matrix<T, Dyn, Dyn, <DefaultAllocator as Allocator<T, Dyn, Dyn>>::Buffer>
where T: Zero,

Creates a new matrix that may be rectangular. The first elts.len() diagonal elements are filled with the content of elts. Others are set to 0.

Panics if elts.len() is larger than the minimum among nrows and ncols.

§Example

let m = Matrix3::from_partial_diagonal(&[1.0, 2.0]);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_partial_diagonal(3, 3, &[1.0, 2.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 == 0.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)] == 0.0);
source§

impl<T, R, C> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where T: Scalar, R: DimName, C: DimName, DefaultAllocator: Allocator<T, R, C>,

source

pub fn from_row_slice( data: &[T], ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

Creates a matrix with its elements filled with the components provided by a slice in row-major order.

The order of elements in the slice must follow the usual mathematic writing, i.e., row-by-row.

§Example

let v = Vector3::from_row_slice(&[0, 1, 2]);
// The additional argument represents the vector dimension.
let dv = DVector::from_row_slice(&[0, 1, 2]);
let m = Matrix2x3::from_row_slice(&[0, 1, 2, 3, 4, 5]);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_row_slice(2, 3, &[0, 1, 2, 3, 4, 5]);

assert!(v.x == 0 && v.y == 1 && v.z == 2);
assert!(dv[0] == 0 && dv[1] == 1 && dv[2] == 2);
assert!(m.m11 == 0 && m.m12 == 1 && m.m13 == 2 &&
        m.m21 == 3 && m.m22 == 4 && m.m23 == 5);
assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 1 && dm[(0, 2)] == 2 &&
        dm[(1, 0)] == 3 && dm[(1, 1)] == 4 && dm[(1, 2)] == 5);
source

pub fn from_column_slice( data: &[T], ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

Creates a matrix with its elements filled with the components provided by a slice in column-major order.

§Example

let v = Vector3::from_column_slice(&[0, 1, 2]);
// The additional argument represents the vector dimension.
let dv = DVector::from_column_slice(&[0, 1, 2]);
let m = Matrix2x3::from_column_slice(&[0, 1, 2, 3, 4, 5]);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_column_slice(2, 3, &[0, 1, 2, 3, 4, 5]);

assert!(v.x == 0 && v.y == 1 && v.z == 2);
assert!(dv[0] == 0 && dv[1] == 1 && dv[2] == 2);
assert!(m.m11 == 0 && m.m12 == 2 && m.m13 == 4 &&
        m.m21 == 1 && m.m22 == 3 && m.m23 == 5);
assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 2 && dm[(0, 2)] == 4 &&
        dm[(1, 0)] == 1 && dm[(1, 1)] == 3 && dm[(1, 2)] == 5);
source

pub fn from_vec( data: Vec<T>, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

Creates a matrix backed by a given Vec.

The output matrix is filled column-by-column.

§Example

let m = Matrix2x3::from_vec(vec![0, 1, 2, 3, 4, 5]);

assert!(m.m11 == 0 && m.m12 == 2 && m.m13 == 4 &&
        m.m21 == 1 && m.m22 == 3 && m.m23 == 5);


// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_vec(2, 3, vec![0, 1, 2, 3, 4, 5]);

assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 2 && dm[(0, 2)] == 4 &&
        dm[(1, 0)] == 1 && dm[(1, 1)] == 3 && dm[(1, 2)] == 5);
source§

impl<T, R> Matrix<T, R, Dyn, <DefaultAllocator as Allocator<T, R, Dyn>>::Buffer>

source

pub fn from_row_slice( data: &[T], ) -> Matrix<T, R, Dyn, <DefaultAllocator as Allocator<T, R, Dyn>>::Buffer>

Creates a matrix with its elements filled with the components provided by a slice in row-major order.

The order of elements in the slice must follow the usual mathematic writing, i.e., row-by-row.

§Example

let v = Vector3::from_row_slice(&[0, 1, 2]);
// The additional argument represents the vector dimension.
let dv = DVector::from_row_slice(&[0, 1, 2]);
let m = Matrix2x3::from_row_slice(&[0, 1, 2, 3, 4, 5]);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_row_slice(2, 3, &[0, 1, 2, 3, 4, 5]);

assert!(v.x == 0 && v.y == 1 && v.z == 2);
assert!(dv[0] == 0 && dv[1] == 1 && dv[2] == 2);
assert!(m.m11 == 0 && m.m12 == 1 && m.m13 == 2 &&
        m.m21 == 3 && m.m22 == 4 && m.m23 == 5);
assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 1 && dm[(0, 2)] == 2 &&
        dm[(1, 0)] == 3 && dm[(1, 1)] == 4 && dm[(1, 2)] == 5);
source

pub fn from_column_slice( data: &[T], ) -> Matrix<T, R, Dyn, <DefaultAllocator as Allocator<T, R, Dyn>>::Buffer>

Creates a matrix with its elements filled with the components provided by a slice in column-major order.

§Example

let v = Vector3::from_column_slice(&[0, 1, 2]);
// The additional argument represents the vector dimension.
let dv = DVector::from_column_slice(&[0, 1, 2]);
let m = Matrix2x3::from_column_slice(&[0, 1, 2, 3, 4, 5]);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_column_slice(2, 3, &[0, 1, 2, 3, 4, 5]);

assert!(v.x == 0 && v.y == 1 && v.z == 2);
assert!(dv[0] == 0 && dv[1] == 1 && dv[2] == 2);
assert!(m.m11 == 0 && m.m12 == 2 && m.m13 == 4 &&
        m.m21 == 1 && m.m22 == 3 && m.m23 == 5);
assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 2 && dm[(0, 2)] == 4 &&
        dm[(1, 0)] == 1 && dm[(1, 1)] == 3 && dm[(1, 2)] == 5);
source

pub fn from_vec( data: Vec<T>, ) -> Matrix<T, R, Dyn, <DefaultAllocator as Allocator<T, R, Dyn>>::Buffer>

Creates a matrix backed by a given Vec.

The output matrix is filled column-by-column.

§Example

let m = Matrix2x3::from_vec(vec![0, 1, 2, 3, 4, 5]);

assert!(m.m11 == 0 && m.m12 == 2 && m.m13 == 4 &&
        m.m21 == 1 && m.m22 == 3 && m.m23 == 5);


// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_vec(2, 3, vec![0, 1, 2, 3, 4, 5]);

assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 2 && dm[(0, 2)] == 4 &&
        dm[(1, 0)] == 1 && dm[(1, 1)] == 3 && dm[(1, 2)] == 5);
source§

impl<T, C> Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>

source

pub fn from_row_slice( data: &[T], ) -> Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>

Creates a matrix with its elements filled with the components provided by a slice in row-major order.

The order of elements in the slice must follow the usual mathematic writing, i.e., row-by-row.

§Example

let v = Vector3::from_row_slice(&[0, 1, 2]);
// The additional argument represents the vector dimension.
let dv = DVector::from_row_slice(&[0, 1, 2]);
let m = Matrix2x3::from_row_slice(&[0, 1, 2, 3, 4, 5]);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_row_slice(2, 3, &[0, 1, 2, 3, 4, 5]);

assert!(v.x == 0 && v.y == 1 && v.z == 2);
assert!(dv[0] == 0 && dv[1] == 1 && dv[2] == 2);
assert!(m.m11 == 0 && m.m12 == 1 && m.m13 == 2 &&
        m.m21 == 3 && m.m22 == 4 && m.m23 == 5);
assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 1 && dm[(0, 2)] == 2 &&
        dm[(1, 0)] == 3 && dm[(1, 1)] == 4 && dm[(1, 2)] == 5);
source

pub fn from_column_slice( data: &[T], ) -> Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>

Creates a matrix with its elements filled with the components provided by a slice in column-major order.

§Example

let v = Vector3::from_column_slice(&[0, 1, 2]);
// The additional argument represents the vector dimension.
let dv = DVector::from_column_slice(&[0, 1, 2]);
let m = Matrix2x3::from_column_slice(&[0, 1, 2, 3, 4, 5]);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_column_slice(2, 3, &[0, 1, 2, 3, 4, 5]);

assert!(v.x == 0 && v.y == 1 && v.z == 2);
assert!(dv[0] == 0 && dv[1] == 1 && dv[2] == 2);
assert!(m.m11 == 0 && m.m12 == 2 && m.m13 == 4 &&
        m.m21 == 1 && m.m22 == 3 && m.m23 == 5);
assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 2 && dm[(0, 2)] == 4 &&
        dm[(1, 0)] == 1 && dm[(1, 1)] == 3 && dm[(1, 2)] == 5);
source

pub fn from_vec( data: Vec<T>, ) -> Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>

Creates a matrix backed by a given Vec.

The output matrix is filled column-by-column.

§Example

let m = Matrix2x3::from_vec(vec![0, 1, 2, 3, 4, 5]);

assert!(m.m11 == 0 && m.m12 == 2 && m.m13 == 4 &&
        m.m21 == 1 && m.m22 == 3 && m.m23 == 5);


// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_vec(2, 3, vec![0, 1, 2, 3, 4, 5]);

assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 2 && dm[(0, 2)] == 4 &&
        dm[(1, 0)] == 1 && dm[(1, 1)] == 3 && dm[(1, 2)] == 5);
source§

impl<T> Matrix<T, Dyn, Dyn, <DefaultAllocator as Allocator<T, Dyn, Dyn>>::Buffer>

source

pub fn from_row_slice( nrows: usize, ncols: usize, data: &[T], ) -> Matrix<T, Dyn, Dyn, <DefaultAllocator as Allocator<T, Dyn, Dyn>>::Buffer>

Creates a matrix with its elements filled with the components provided by a slice in row-major order.

The order of elements in the slice must follow the usual mathematic writing, i.e., row-by-row.

§Example

let v = Vector3::from_row_slice(&[0, 1, 2]);
// The additional argument represents the vector dimension.
let dv = DVector::from_row_slice(&[0, 1, 2]);
let m = Matrix2x3::from_row_slice(&[0, 1, 2, 3, 4, 5]);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_row_slice(2, 3, &[0, 1, 2, 3, 4, 5]);

assert!(v.x == 0 && v.y == 1 && v.z == 2);
assert!(dv[0] == 0 && dv[1] == 1 && dv[2] == 2);
assert!(m.m11 == 0 && m.m12 == 1 && m.m13 == 2 &&
        m.m21 == 3 && m.m22 == 4 && m.m23 == 5);
assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 1 && dm[(0, 2)] == 2 &&
        dm[(1, 0)] == 3 && dm[(1, 1)] == 4 && dm[(1, 2)] == 5);
source

pub fn from_column_slice( nrows: usize, ncols: usize, data: &[T], ) -> Matrix<T, Dyn, Dyn, <DefaultAllocator as Allocator<T, Dyn, Dyn>>::Buffer>

Creates a matrix with its elements filled with the components provided by a slice in column-major order.

§Example

let v = Vector3::from_column_slice(&[0, 1, 2]);
// The additional argument represents the vector dimension.
let dv = DVector::from_column_slice(&[0, 1, 2]);
let m = Matrix2x3::from_column_slice(&[0, 1, 2, 3, 4, 5]);
// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_column_slice(2, 3, &[0, 1, 2, 3, 4, 5]);

assert!(v.x == 0 && v.y == 1 && v.z == 2);
assert!(dv[0] == 0 && dv[1] == 1 && dv[2] == 2);
assert!(m.m11 == 0 && m.m12 == 2 && m.m13 == 4 &&
        m.m21 == 1 && m.m22 == 3 && m.m23 == 5);
assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 2 && dm[(0, 2)] == 4 &&
        dm[(1, 0)] == 1 && dm[(1, 1)] == 3 && dm[(1, 2)] == 5);
source

pub fn from_vec( nrows: usize, ncols: usize, data: Vec<T>, ) -> Matrix<T, Dyn, Dyn, <DefaultAllocator as Allocator<T, Dyn, Dyn>>::Buffer>

Creates a matrix backed by a given Vec.

The output matrix is filled column-by-column.

§Example

let m = Matrix2x3::from_vec(vec![0, 1, 2, 3, 4, 5]);

assert!(m.m11 == 0 && m.m12 == 2 && m.m13 == 4 &&
        m.m21 == 1 && m.m22 == 3 && m.m23 == 5);


// The two additional arguments represent the matrix dimensions.
let dm = DMatrix::from_vec(2, 3, vec![0, 1, 2, 3, 4, 5]);

assert!(dm[(0, 0)] == 0 && dm[(0, 1)] == 2 && dm[(0, 2)] == 4 &&
        dm[(1, 0)] == 1 && dm[(1, 1)] == 3 && dm[(1, 2)] == 5);
source§

impl<T> Matrix<T, Const<2>, Const<2>, ArrayStorage<T, 2, 2>>

source

pub const fn new( m11: T, m12: T, m21: T, m22: T, ) -> Matrix<T, Const<2>, Const<2>, ArrayStorage<T, 2, 2>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<3>, Const<3>, ArrayStorage<T, 3, 3>>

source

pub const fn new( m11: T, m12: T, m13: T, m21: T, m22: T, m23: T, m31: T, m32: T, m33: T, ) -> Matrix<T, Const<3>, Const<3>, ArrayStorage<T, 3, 3>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>

source

pub const fn new( m11: T, m12: T, m13: T, m14: T, m21: T, m22: T, m23: T, m24: T, m31: T, m32: T, m33: T, m34: T, m41: T, m42: T, m43: T, m44: T, ) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<5>, Const<5>, ArrayStorage<T, 5, 5>>

source

pub const fn new( m11: T, m12: T, m13: T, m14: T, m15: T, m21: T, m22: T, m23: T, m24: T, m25: T, m31: T, m32: T, m33: T, m34: T, m35: T, m41: T, m42: T, m43: T, m44: T, m45: T, m51: T, m52: T, m53: T, m54: T, m55: T, ) -> Matrix<T, Const<5>, Const<5>, ArrayStorage<T, 5, 5>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<6>, Const<6>, ArrayStorage<T, 6, 6>>

source

pub const fn new( m11: T, m12: T, m13: T, m14: T, m15: T, m16: T, m21: T, m22: T, m23: T, m24: T, m25: T, m26: T, m31: T, m32: T, m33: T, m34: T, m35: T, m36: T, m41: T, m42: T, m43: T, m44: T, m45: T, m46: T, m51: T, m52: T, m53: T, m54: T, m55: T, m56: T, m61: T, m62: T, m63: T, m64: T, m65: T, m66: T, ) -> Matrix<T, Const<6>, Const<6>, ArrayStorage<T, 6, 6>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<2>, Const<3>, ArrayStorage<T, 2, 3>>

source

pub const fn new( m11: T, m12: T, m13: T, m21: T, m22: T, m23: T, ) -> Matrix<T, Const<2>, Const<3>, ArrayStorage<T, 2, 3>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<2>, Const<4>, ArrayStorage<T, 2, 4>>

source

pub const fn new( m11: T, m12: T, m13: T, m14: T, m21: T, m22: T, m23: T, m24: T, ) -> Matrix<T, Const<2>, Const<4>, ArrayStorage<T, 2, 4>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<2>, Const<5>, ArrayStorage<T, 2, 5>>

source

pub const fn new( m11: T, m12: T, m13: T, m14: T, m15: T, m21: T, m22: T, m23: T, m24: T, m25: T, ) -> Matrix<T, Const<2>, Const<5>, ArrayStorage<T, 2, 5>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<2>, Const<6>, ArrayStorage<T, 2, 6>>

source

pub const fn new( m11: T, m12: T, m13: T, m14: T, m15: T, m16: T, m21: T, m22: T, m23: T, m24: T, m25: T, m26: T, ) -> Matrix<T, Const<2>, Const<6>, ArrayStorage<T, 2, 6>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<3>, Const<2>, ArrayStorage<T, 3, 2>>

source

pub const fn new( m11: T, m12: T, m21: T, m22: T, m31: T, m32: T, ) -> Matrix<T, Const<3>, Const<2>, ArrayStorage<T, 3, 2>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<3>, Const<4>, ArrayStorage<T, 3, 4>>

source

pub const fn new( m11: T, m12: T, m13: T, m14: T, m21: T, m22: T, m23: T, m24: T, m31: T, m32: T, m33: T, m34: T, ) -> Matrix<T, Const<3>, Const<4>, ArrayStorage<T, 3, 4>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<3>, Const<5>, ArrayStorage<T, 3, 5>>

source

pub const fn new( m11: T, m12: T, m13: T, m14: T, m15: T, m21: T, m22: T, m23: T, m24: T, m25: T, m31: T, m32: T, m33: T, m34: T, m35: T, ) -> Matrix<T, Const<3>, Const<5>, ArrayStorage<T, 3, 5>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<3>, Const<6>, ArrayStorage<T, 3, 6>>

source

pub const fn new( m11: T, m12: T, m13: T, m14: T, m15: T, m16: T, m21: T, m22: T, m23: T, m24: T, m25: T, m26: T, m31: T, m32: T, m33: T, m34: T, m35: T, m36: T, ) -> Matrix<T, Const<3>, Const<6>, ArrayStorage<T, 3, 6>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<4>, Const<2>, ArrayStorage<T, 4, 2>>

source

pub const fn new( m11: T, m12: T, m21: T, m22: T, m31: T, m32: T, m41: T, m42: T, ) -> Matrix<T, Const<4>, Const<2>, ArrayStorage<T, 4, 2>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<4>, Const<3>, ArrayStorage<T, 4, 3>>

source

pub const fn new( m11: T, m12: T, m13: T, m21: T, m22: T, m23: T, m31: T, m32: T, m33: T, m41: T, m42: T, m43: T, ) -> Matrix<T, Const<4>, Const<3>, ArrayStorage<T, 4, 3>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<4>, Const<5>, ArrayStorage<T, 4, 5>>

source

pub const fn new( m11: T, m12: T, m13: T, m14: T, m15: T, m21: T, m22: T, m23: T, m24: T, m25: T, m31: T, m32: T, m33: T, m34: T, m35: T, m41: T, m42: T, m43: T, m44: T, m45: T, ) -> Matrix<T, Const<4>, Const<5>, ArrayStorage<T, 4, 5>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<4>, Const<6>, ArrayStorage<T, 4, 6>>

source

pub const fn new( m11: T, m12: T, m13: T, m14: T, m15: T, m16: T, m21: T, m22: T, m23: T, m24: T, m25: T, m26: T, m31: T, m32: T, m33: T, m34: T, m35: T, m36: T, m41: T, m42: T, m43: T, m44: T, m45: T, m46: T, ) -> Matrix<T, Const<4>, Const<6>, ArrayStorage<T, 4, 6>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<5>, Const<2>, ArrayStorage<T, 5, 2>>

source

pub const fn new( m11: T, m12: T, m21: T, m22: T, m31: T, m32: T, m41: T, m42: T, m51: T, m52: T, ) -> Matrix<T, Const<5>, Const<2>, ArrayStorage<T, 5, 2>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<5>, Const<3>, ArrayStorage<T, 5, 3>>

source

pub const fn new( m11: T, m12: T, m13: T, m21: T, m22: T, m23: T, m31: T, m32: T, m33: T, m41: T, m42: T, m43: T, m51: T, m52: T, m53: T, ) -> Matrix<T, Const<5>, Const<3>, ArrayStorage<T, 5, 3>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<5>, Const<4>, ArrayStorage<T, 5, 4>>

source

pub const fn new( m11: T, m12: T, m13: T, m14: T, m21: T, m22: T, m23: T, m24: T, m31: T, m32: T, m33: T, m34: T, m41: T, m42: T, m43: T, m44: T, m51: T, m52: T, m53: T, m54: T, ) -> Matrix<T, Const<5>, Const<4>, ArrayStorage<T, 5, 4>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<5>, Const<6>, ArrayStorage<T, 5, 6>>

source

pub const fn new( m11: T, m12: T, m13: T, m14: T, m15: T, m16: T, m21: T, m22: T, m23: T, m24: T, m25: T, m26: T, m31: T, m32: T, m33: T, m34: T, m35: T, m36: T, m41: T, m42: T, m43: T, m44: T, m45: T, m46: T, m51: T, m52: T, m53: T, m54: T, m55: T, m56: T, ) -> Matrix<T, Const<5>, Const<6>, ArrayStorage<T, 5, 6>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<6>, Const<2>, ArrayStorage<T, 6, 2>>

source

pub const fn new( m11: T, m12: T, m21: T, m22: T, m31: T, m32: T, m41: T, m42: T, m51: T, m52: T, m61: T, m62: T, ) -> Matrix<T, Const<6>, Const<2>, ArrayStorage<T, 6, 2>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<6>, Const<3>, ArrayStorage<T, 6, 3>>

source

pub const fn new( m11: T, m12: T, m13: T, m21: T, m22: T, m23: T, m31: T, m32: T, m33: T, m41: T, m42: T, m43: T, m51: T, m52: T, m53: T, m61: T, m62: T, m63: T, ) -> Matrix<T, Const<6>, Const<3>, ArrayStorage<T, 6, 3>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<6>, Const<4>, ArrayStorage<T, 6, 4>>

source

pub const fn new( m11: T, m12: T, m13: T, m14: T, m21: T, m22: T, m23: T, m24: T, m31: T, m32: T, m33: T, m34: T, m41: T, m42: T, m43: T, m44: T, m51: T, m52: T, m53: T, m54: T, m61: T, m62: T, m63: T, m64: T, ) -> Matrix<T, Const<6>, Const<4>, ArrayStorage<T, 6, 4>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<6>, Const<5>, ArrayStorage<T, 6, 5>>

source

pub const fn new( m11: T, m12: T, m13: T, m14: T, m15: T, m21: T, m22: T, m23: T, m24: T, m25: T, m31: T, m32: T, m33: T, m34: T, m35: T, m41: T, m42: T, m43: T, m44: T, m45: T, m51: T, m52: T, m53: T, m54: T, m55: T, m61: T, m62: T, m63: T, m64: T, m65: T, ) -> Matrix<T, Const<6>, Const<5>, ArrayStorage<T, 6, 5>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<1>, Const<1>, ArrayStorage<T, 1, 1>>

source

pub const fn new(x: T) -> Matrix<T, Const<1>, Const<1>, ArrayStorage<T, 1, 1>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<1>, Const<2>, ArrayStorage<T, 1, 2>>

source

pub const fn new( x: T, y: T, ) -> Matrix<T, Const<1>, Const<2>, ArrayStorage<T, 1, 2>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<1>, Const<3>, ArrayStorage<T, 1, 3>>

source

pub const fn new( x: T, y: T, z: T, ) -> Matrix<T, Const<1>, Const<3>, ArrayStorage<T, 1, 3>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<1>, Const<4>, ArrayStorage<T, 1, 4>>

source

pub const fn new( x: T, y: T, z: T, w: T, ) -> Matrix<T, Const<1>, Const<4>, ArrayStorage<T, 1, 4>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<1>, Const<5>, ArrayStorage<T, 1, 5>>

source

pub const fn new( x: T, y: T, z: T, w: T, a: T, ) -> Matrix<T, Const<1>, Const<5>, ArrayStorage<T, 1, 5>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<1>, Const<6>, ArrayStorage<T, 1, 6>>

source

pub const fn new( x: T, y: T, z: T, w: T, a: T, b: T, ) -> Matrix<T, Const<1>, Const<6>, ArrayStorage<T, 1, 6>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>

source

pub const fn new( x: T, y: T, ) -> Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>

source

pub const fn new( x: T, y: T, z: T, ) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<4>, Const<1>, ArrayStorage<T, 4, 1>>

source

pub const fn new( x: T, y: T, z: T, w: T, ) -> Matrix<T, Const<4>, Const<1>, ArrayStorage<T, 4, 1>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<5>, Const<1>, ArrayStorage<T, 5, 1>>

source

pub const fn new( x: T, y: T, z: T, w: T, a: T, ) -> Matrix<T, Const<5>, Const<1>, ArrayStorage<T, 5, 1>>

Initializes this matrix from its components.

source§

impl<T> Matrix<T, Const<6>, Const<1>, ArrayStorage<T, 6, 1>>

source

pub const fn new( x: T, y: T, z: T, w: T, a: T, b: T, ) -> Matrix<T, Const<6>, Const<1>, ArrayStorage<T, 6, 1>>

Initializes this matrix from its components.

source§

impl<T, R> Matrix<T, R, Const<1>, <DefaultAllocator as Allocator<T, R>>::Buffer>

source

pub fn ith( i: usize, val: T, ) -> Matrix<T, R, Const<1>, <DefaultAllocator as Allocator<T, R>>::Buffer>

The column vector with val as its i-th component.

source

pub fn ith_axis( i: usize, ) -> Unit<Matrix<T, R, Const<1>, <DefaultAllocator as Allocator<T, R>>::Buffer>>

The column unit vector with T::one() as its i-th component.

source

pub fn x() -> Matrix<T, R, Const<1>, <DefaultAllocator as Allocator<T, R>>::Buffer>
where <R as ToTypenum>::Typenum: Cmp<UTerm, Output = Greater>,

The column vector with a 1 as its first component, and zero elsewhere.

source

pub fn y() -> Matrix<T, R, Const<1>, <DefaultAllocator as Allocator<T, R>>::Buffer>
where <R as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

The column vector with a 1 as its second component, and zero elsewhere.

source

pub fn z() -> Matrix<T, R, Const<1>, <DefaultAllocator as Allocator<T, R>>::Buffer>
where <R as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

The column vector with a 1 as its third component, and zero elsewhere.

source

pub fn w() -> Matrix<T, R, Const<1>, <DefaultAllocator as Allocator<T, R>>::Buffer>
where <R as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B1>, Output = Greater>,

The column vector with a 1 as its fourth component, and zero elsewhere.

source

pub fn a() -> Matrix<T, R, Const<1>, <DefaultAllocator as Allocator<T, R>>::Buffer>
where <R as ToTypenum>::Typenum: Cmp<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, Output = Greater>,

The column vector with a 1 as its fifth component, and zero elsewhere.

source

pub fn b() -> Matrix<T, R, Const<1>, <DefaultAllocator as Allocator<T, R>>::Buffer>
where <R as ToTypenum>::Typenum: Cmp<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, Output = Greater>,

The column vector with a 1 as its sixth component, and zero elsewhere.

source

pub fn x_axis() -> Unit<Matrix<T, R, Const<1>, <DefaultAllocator as Allocator<T, R>>::Buffer>>
where <R as ToTypenum>::Typenum: Cmp<UTerm, Output = Greater>,

The unit column vector with a 1 as its first component, and zero elsewhere.

source

pub fn y_axis() -> Unit<Matrix<T, R, Const<1>, <DefaultAllocator as Allocator<T, R>>::Buffer>>
where <R as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

The unit column vector with a 1 as its second component, and zero elsewhere.

source

pub fn z_axis() -> Unit<Matrix<T, R, Const<1>, <DefaultAllocator as Allocator<T, R>>::Buffer>>
where <R as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

The unit column vector with a 1 as its third component, and zero elsewhere.

source

pub fn w_axis() -> Unit<Matrix<T, R, Const<1>, <DefaultAllocator as Allocator<T, R>>::Buffer>>
where <R as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B1>, Output = Greater>,

The unit column vector with a 1 as its fourth component, and zero elsewhere.

source

pub fn a_axis() -> Unit<Matrix<T, R, Const<1>, <DefaultAllocator as Allocator<T, R>>::Buffer>>
where <R as ToTypenum>::Typenum: Cmp<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, Output = Greater>,

The unit column vector with a 1 as its fifth component, and zero elsewhere.

source

pub fn b_axis() -> Unit<Matrix<T, R, Const<1>, <DefaultAllocator as Allocator<T, R>>::Buffer>>
where <R as ToTypenum>::Typenum: Cmp<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, Output = Greater>,

The unit column vector with a 1 as its sixth component, and zero elsewhere.

source§

impl<'a, T, R, C, RStride, CStride> Matrix<T, R, C, ViewStorage<'a, T, R, C, RStride, CStride>>
where T: Scalar, R: Dim, C: Dim, RStride: Dim, CStride: Dim,

§Creating matrix views from &[T]

source

pub unsafe fn from_slice_with_strides_generic_unchecked( data: &'a [T], start: usize, nrows: R, ncols: C, rstride: RStride, cstride: CStride, ) -> Matrix<T, R, C, ViewStorage<'a, T, R, C, RStride, CStride>>

Creates, without bounds checking, a matrix view from an array and with dimensions and strides specified by generic types instances.

§Safety

This method is unsafe because the input data array is not checked to contain enough elements. The generic types R, C, RStride, CStride can either be type-level integers or integers wrapped with Dyn().

source

pub fn from_slice_with_strides_generic( data: &'a [T], nrows: R, ncols: C, rstride: RStride, cstride: CStride, ) -> Matrix<T, R, C, ViewStorage<'a, T, R, C, RStride, CStride>>

Creates a matrix view from an array and with dimensions and strides specified by generic types instances.

Panics if the input data array dose not contain enough elements. The generic types R, C, RStride, CStride can either be type-level integers or integers wrapped with Dyn().

source§

impl<'a, T, R, C> Matrix<T, R, C, ViewStorage<'a, T, R, C, Const<1>, R>>
where T: Scalar, R: Dim, C: Dim,

source

pub unsafe fn from_slice_generic_unchecked( data: &'a [T], start: usize, nrows: R, ncols: C, ) -> Matrix<T, R, C, ViewStorage<'a, T, R, C, Const<1>, R>>

Creates, without bound-checking, a matrix view from an array and with dimensions specified by generic types instances.

§Safety

This method is unsafe because the input data array is not checked to contain enough elements. The generic types R and C can either be type-level integers or integers wrapped with Dyn().

source

pub fn from_slice_generic( data: &'a [T], nrows: R, ncols: C, ) -> Matrix<T, R, C, ViewStorage<'a, T, R, C, Const<1>, R>>

Creates a matrix view from an array and with dimensions and strides specified by generic types instances.

Panics if the input data array dose not contain enough elements. The generic types R and C can either be type-level integers or integers wrapped with Dyn().

source§

impl<'a, T, R, C> Matrix<T, R, C, ViewStorage<'a, T, R, C, Const<1>, R>>
where T: Scalar, R: DimName, C: DimName,

source

pub fn from_slice( data: &'a [T], ) -> Matrix<T, R, C, ViewStorage<'a, T, R, C, Const<1>, R>>

Creates a new matrix view from the given data array.

Panics if data does not contain enough elements.

source

pub unsafe fn from_slice_unchecked( data: &'a [T], start: usize, ) -> Matrix<T, R, C, ViewStorage<'a, T, R, C, Const<1>, R>>

Creates, without bound checking, a new matrix view from the given data array.

source§

impl<'a, T, R, C> Matrix<T, R, C, ViewStorage<'a, T, R, C, Dyn, Dyn>>
where T: Scalar, R: DimName, C: DimName,

source

pub fn from_slice_with_strides( data: &'a [T], rstride: usize, cstride: usize, ) -> Matrix<T, R, C, ViewStorage<'a, T, R, C, Dyn, Dyn>>

Creates a new matrix view with the specified strides from the given data array.

Panics if data does not contain enough elements.

source

pub unsafe fn from_slice_with_strides_unchecked( data: &'a [T], start: usize, rstride: usize, cstride: usize, ) -> Matrix<T, R, C, ViewStorage<'a, T, R, C, Dyn, Dyn>>

Creates, without bound checking, a new matrix view with the specified strides from the given data array.

source§

impl<'a, T, R> Matrix<T, R, Dyn, ViewStorage<'a, T, R, Dyn, Const<1>, R>>
where T: Scalar, R: DimName,

source

pub fn from_slice( data: &'a [T], ncols: usize, ) -> Matrix<T, R, Dyn, ViewStorage<'a, T, R, Dyn, Const<1>, R>>

Creates a new matrix view from the given data array.

Panics if data does not contain enough elements.

source

pub unsafe fn from_slice_unchecked( data: &'a [T], start: usize, ncols: usize, ) -> Matrix<T, R, Dyn, ViewStorage<'a, T, R, Dyn, Const<1>, R>>

Creates, without bound checking, a new matrix view from the given data array.

source§

impl<'a, T, R> Matrix<T, R, Dyn, ViewStorage<'a, T, R, Dyn, Dyn, Dyn>>
where T: Scalar, R: DimName,

source

pub fn from_slice_with_strides( data: &'a [T], ncols: usize, rstride: usize, cstride: usize, ) -> Matrix<T, R, Dyn, ViewStorage<'a, T, R, Dyn, Dyn, Dyn>>

Creates a new matrix view with the specified strides from the given data array.

Panics if data does not contain enough elements.

source

pub unsafe fn from_slice_with_strides_unchecked( data: &'a [T], start: usize, ncols: usize, rstride: usize, cstride: usize, ) -> Matrix<T, R, Dyn, ViewStorage<'a, T, R, Dyn, Dyn, Dyn>>

Creates, without bound checking, a new matrix view with the specified strides from the given data array.

source§

impl<'a, T, C> Matrix<T, Dyn, C, ViewStorage<'a, T, Dyn, C, Const<1>, Dyn>>
where T: Scalar, C: DimName,

source

pub fn from_slice( data: &'a [T], nrows: usize, ) -> Matrix<T, Dyn, C, ViewStorage<'a, T, Dyn, C, Const<1>, Dyn>>

Creates a new matrix view from the given data array.

Panics if data does not contain enough elements.

source

pub unsafe fn from_slice_unchecked( data: &'a [T], start: usize, nrows: usize, ) -> Matrix<T, Dyn, C, ViewStorage<'a, T, Dyn, C, Const<1>, Dyn>>

Creates, without bound checking, a new matrix view from the given data array.

source§

impl<'a, T, C> Matrix<T, Dyn, C, ViewStorage<'a, T, Dyn, C, Dyn, Dyn>>
where T: Scalar, C: DimName,

source

pub fn from_slice_with_strides( data: &'a [T], nrows: usize, rstride: usize, cstride: usize, ) -> Matrix<T, Dyn, C, ViewStorage<'a, T, Dyn, C, Dyn, Dyn>>

Creates a new matrix view with the specified strides from the given data array.

Panics if data does not contain enough elements.

source

pub unsafe fn from_slice_with_strides_unchecked( data: &'a [T], start: usize, nrows: usize, rstride: usize, cstride: usize, ) -> Matrix<T, Dyn, C, ViewStorage<'a, T, Dyn, C, Dyn, Dyn>>

Creates, without bound checking, a new matrix view with the specified strides from the given data array.

source§

impl<'a, T> Matrix<T, Dyn, Dyn, ViewStorage<'a, T, Dyn, Dyn, Const<1>, Dyn>>
where T: Scalar,

source

pub fn from_slice( data: &'a [T], nrows: usize, ncols: usize, ) -> Matrix<T, Dyn, Dyn, ViewStorage<'a, T, Dyn, Dyn, Const<1>, Dyn>>

Creates a new matrix view from the given data array.

Panics if data does not contain enough elements.

source

pub unsafe fn from_slice_unchecked( data: &'a [T], start: usize, nrows: usize, ncols: usize, ) -> Matrix<T, Dyn, Dyn, ViewStorage<'a, T, Dyn, Dyn, Const<1>, Dyn>>

Creates, without bound checking, a new matrix view from the given data array.

source§

impl<'a, T> Matrix<T, Dyn, Dyn, ViewStorage<'a, T, Dyn, Dyn, Dyn, Dyn>>
where T: Scalar,

source

pub fn from_slice_with_strides( data: &'a [T], nrows: usize, ncols: usize, rstride: usize, cstride: usize, ) -> Matrix<T, Dyn, Dyn, ViewStorage<'a, T, Dyn, Dyn, Dyn, Dyn>>

Creates a new matrix view with the specified strides from the given data array.

Panics if data does not contain enough elements.

source

pub unsafe fn from_slice_with_strides_unchecked( data: &'a [T], start: usize, nrows: usize, ncols: usize, rstride: usize, cstride: usize, ) -> Matrix<T, Dyn, Dyn, ViewStorage<'a, T, Dyn, Dyn, Dyn, Dyn>>

Creates, without bound checking, a new matrix view with the specified strides from the given data array.

source§

impl<'a, T, R, C, RStride, CStride> Matrix<T, R, C, ViewStorageMut<'a, T, R, C, RStride, CStride>>
where T: Scalar, R: Dim, C: Dim, RStride: Dim, CStride: Dim,

§Creating mutable matrix views from &mut [T]

source

pub unsafe fn from_slice_with_strides_generic_unchecked( data: &'a mut [T], start: usize, nrows: R, ncols: C, rstride: RStride, cstride: CStride, ) -> Matrix<T, R, C, ViewStorageMut<'a, T, R, C, RStride, CStride>>

Creates, without bound-checking, a mutable matrix view from an array and with dimensions and strides specified by generic types instances.

§Safety

This method is unsafe because the input data array is not checked to contain enough elements. The generic types R, C, RStride, CStride can either be type-level integers or integers wrapped with Dyn().

source

pub fn from_slice_with_strides_generic( data: &'a mut [T], nrows: R, ncols: C, rstride: RStride, cstride: CStride, ) -> Matrix<T, R, C, ViewStorageMut<'a, T, R, C, RStride, CStride>>

Creates a mutable matrix view from an array and with dimensions and strides specified by generic types instances.

Panics if the input data array dose not contain enough elements. The generic types R, C, RStride, CStride can either be type-level integers or integers wrapped with Dyn().

source§

impl<'a, T, R, C> Matrix<T, R, C, ViewStorageMut<'a, T, R, C, Const<1>, R>>
where T: Scalar, R: Dim, C: Dim,

source

pub unsafe fn from_slice_generic_unchecked( data: &'a mut [T], start: usize, nrows: R, ncols: C, ) -> Matrix<T, R, C, ViewStorageMut<'a, T, R, C, Const<1>, R>>

Creates, without bound-checking, a mutable matrix view from an array and with dimensions specified by generic types instances.

§Safety

This method is unsafe because the input data array is not checked to contain enough elements. The generic types R and C can either be type-level integers or integers wrapped with Dyn().

source

pub fn from_slice_generic( data: &'a mut [T], nrows: R, ncols: C, ) -> Matrix<T, R, C, ViewStorageMut<'a, T, R, C, Const<1>, R>>

Creates a mutable matrix view from an array and with dimensions and strides specified by generic types instances.

Panics if the input data array dose not contain enough elements. The generic types R and C can either be type-level integers or integers wrapped with Dyn().

source§

impl<'a, T, R, C> Matrix<T, R, C, ViewStorageMut<'a, T, R, C, Const<1>, R>>
where T: Scalar, R: DimName, C: DimName,

source

pub fn from_slice( data: &'a mut [T], ) -> Matrix<T, R, C, ViewStorageMut<'a, T, R, C, Const<1>, R>>

Creates a new mutable matrix view from the given data array.

Panics if data does not contain enough elements.

source

pub unsafe fn from_slice_unchecked( data: &'a mut [T], start: usize, ) -> Matrix<T, R, C, ViewStorageMut<'a, T, R, C, Const<1>, R>>

Creates, without bound checking, a new mutable matrix view from the given data array.

source§

impl<'a, T, R, C> Matrix<T, R, C, ViewStorageMut<'a, T, R, C, Dyn, Dyn>>
where T: Scalar, R: DimName, C: DimName,

source

pub fn from_slice_with_strides_mut( data: &'a mut [T], rstride: usize, cstride: usize, ) -> Matrix<T, R, C, ViewStorageMut<'a, T, R, C, Dyn, Dyn>>

Creates a new mutable matrix view with the specified strides from the given data array.

Panics if data does not contain enough elements.

source

pub unsafe fn from_slice_with_strides_unchecked( data: &'a mut [T], start: usize, rstride: usize, cstride: usize, ) -> Matrix<T, R, C, ViewStorageMut<'a, T, R, C, Dyn, Dyn>>

Creates, without bound checking, a new mutable matrix view with the specified strides from the given data array.

source§

impl<'a, T, R> Matrix<T, R, Dyn, ViewStorageMut<'a, T, R, Dyn, Const<1>, R>>
where T: Scalar, R: DimName,

source

pub fn from_slice( data: &'a mut [T], ncols: usize, ) -> Matrix<T, R, Dyn, ViewStorageMut<'a, T, R, Dyn, Const<1>, R>>

Creates a new mutable matrix view from the given data array.

Panics if data does not contain enough elements.

source

pub unsafe fn from_slice_unchecked( data: &'a mut [T], start: usize, ncols: usize, ) -> Matrix<T, R, Dyn, ViewStorageMut<'a, T, R, Dyn, Const<1>, R>>

Creates, without bound checking, a new mutable matrix view from the given data array.

source§

impl<'a, T, R> Matrix<T, R, Dyn, ViewStorageMut<'a, T, R, Dyn, Dyn, Dyn>>
where T: Scalar, R: DimName,

source

pub fn from_slice_with_strides_mut( data: &'a mut [T], ncols: usize, rstride: usize, cstride: usize, ) -> Matrix<T, R, Dyn, ViewStorageMut<'a, T, R, Dyn, Dyn, Dyn>>

Creates a new mutable matrix view with the specified strides from the given data array.

Panics if data does not contain enough elements.

source

pub unsafe fn from_slice_with_strides_unchecked( data: &'a mut [T], start: usize, ncols: usize, rstride: usize, cstride: usize, ) -> Matrix<T, R, Dyn, ViewStorageMut<'a, T, R, Dyn, Dyn, Dyn>>

Creates, without bound checking, a new mutable matrix view with the specified strides from the given data array.

source§

impl<'a, T, C> Matrix<T, Dyn, C, ViewStorageMut<'a, T, Dyn, C, Const<1>, Dyn>>
where T: Scalar, C: DimName,

source

pub fn from_slice( data: &'a mut [T], nrows: usize, ) -> Matrix<T, Dyn, C, ViewStorageMut<'a, T, Dyn, C, Const<1>, Dyn>>

Creates a new mutable matrix view from the given data array.

Panics if data does not contain enough elements.

source

pub unsafe fn from_slice_unchecked( data: &'a mut [T], start: usize, nrows: usize, ) -> Matrix<T, Dyn, C, ViewStorageMut<'a, T, Dyn, C, Const<1>, Dyn>>

Creates, without bound checking, a new mutable matrix view from the given data array.

source§

impl<'a, T, C> Matrix<T, Dyn, C, ViewStorageMut<'a, T, Dyn, C, Dyn, Dyn>>
where T: Scalar, C: DimName,

source

pub fn from_slice_with_strides_mut( data: &'a mut [T], nrows: usize, rstride: usize, cstride: usize, ) -> Matrix<T, Dyn, C, ViewStorageMut<'a, T, Dyn, C, Dyn, Dyn>>

Creates a new mutable matrix view with the specified strides from the given data array.

Panics if data does not contain enough elements.

source

pub unsafe fn from_slice_with_strides_unchecked( data: &'a mut [T], start: usize, nrows: usize, rstride: usize, cstride: usize, ) -> Matrix<T, Dyn, C, ViewStorageMut<'a, T, Dyn, C, Dyn, Dyn>>

Creates, without bound checking, a new mutable matrix view with the specified strides from the given data array.

source§

impl<'a, T> Matrix<T, Dyn, Dyn, ViewStorageMut<'a, T, Dyn, Dyn, Const<1>, Dyn>>
where T: Scalar,

source

pub fn from_slice( data: &'a mut [T], nrows: usize, ncols: usize, ) -> Matrix<T, Dyn, Dyn, ViewStorageMut<'a, T, Dyn, Dyn, Const<1>, Dyn>>

Creates a new mutable matrix view from the given data array.

Panics if data does not contain enough elements.

source

pub unsafe fn from_slice_unchecked( data: &'a mut [T], start: usize, nrows: usize, ncols: usize, ) -> Matrix<T, Dyn, Dyn, ViewStorageMut<'a, T, Dyn, Dyn, Const<1>, Dyn>>

Creates, without bound checking, a new mutable matrix view from the given data array.

source§

impl<'a, T> Matrix<T, Dyn, Dyn, ViewStorageMut<'a, T, Dyn, Dyn, Dyn, Dyn>>
where T: Scalar,

source

pub fn from_slice_with_strides_mut( data: &'a mut [T], nrows: usize, ncols: usize, rstride: usize, cstride: usize, ) -> Matrix<T, Dyn, Dyn, ViewStorageMut<'a, T, Dyn, Dyn, Dyn, Dyn>>

Creates a new mutable matrix view with the specified strides from the given data array.

Panics if data does not contain enough elements.

source

pub unsafe fn from_slice_with_strides_unchecked( data: &'a mut [T], start: usize, nrows: usize, ncols: usize, rstride: usize, cstride: usize, ) -> Matrix<T, Dyn, Dyn, ViewStorageMut<'a, T, Dyn, Dyn, Dyn, Dyn>>

Creates, without bound checking, a new mutable matrix view with the specified strides from the given data array.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where T: Scalar + Zero, R: Dim, C: Dim, S: Storage<T, R, C>,

§Triangular matrix extraction

source

pub fn upper_triangle( &self, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where DefaultAllocator: Allocator<T, R, C>,

Extracts the upper triangular part of this matrix (including the diagonal).

source

pub fn lower_triangle( &self, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where DefaultAllocator: Allocator<T, R, C>,

Extracts the lower triangular part of this matrix (including the diagonal).

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where T: Scalar, R: Dim, C: Dim, S: Storage<T, R, C>,

§Rows and columns extraction

source

pub fn select_rows<'a, I>( &self, irows: I, ) -> Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>

Creates a new matrix by extracting the given set of rows from self.

source

pub fn select_columns<'a, I>( &self, icols: I, ) -> Matrix<T, R, Dyn, <DefaultAllocator as Allocator<T, R, Dyn>>::Buffer>

Creates a new matrix by extracting the given set of columns from self.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where T: Scalar, R: Dim, C: Dim, S: RawStorageMut<T, R, C>,

§Set rows, columns, and diagonal

source

pub fn set_diagonal<R2, S2>(&mut self, diag: &Matrix<T, R2, Const<1>, S2>)
where R2: Dim, R: DimMin<C>, S2: RawStorage<T, R2>, ShapeConstraint: DimEq<<R as DimMin<C>>::Output, R2>,

Fills the diagonal of this matrix with the content of the given vector.

source

pub fn set_partial_diagonal(&mut self, diag: impl Iterator<Item = T>)

Fills the diagonal of this matrix with the content of the given iterator.

This will fill as many diagonal elements as the iterator yields, up to the minimum of the number of rows and columns of self, and starting with the diagonal element at index (0, 0).

source

pub fn set_row<C2, S2>(&mut self, i: usize, row: &Matrix<T, Const<1>, C2, S2>)
where C2: Dim, S2: RawStorage<T, Const<1>, C2>, ShapeConstraint: SameNumberOfColumns<C, C2>,

Fills the selected row of this matrix with the content of the given vector.

source

pub fn set_column<R2, S2>( &mut self, i: usize, column: &Matrix<T, R2, Const<1>, S2>, )
where R2: Dim, S2: RawStorage<T, R2>, ShapeConstraint: SameNumberOfRows<R, R2>,

Fills the selected column of this matrix with the content of the given vector.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where R: Dim, C: Dim, S: RawStorageMut<T, R, C>,

§In-place filling

source

pub fn fill_with(&mut self, val: impl Fn() -> T)

Sets all the elements of this matrix to the value returned by the closure.

source

pub fn fill(&mut self, val: T)
where T: Scalar,

Sets all the elements of this matrix to val.

source

pub fn fill_with_identity(&mut self)
where T: Scalar + Zero + One,

Fills self with the identity matrix.

source

pub fn fill_diagonal(&mut self, val: T)
where T: Scalar,

Sets all the diagonal elements of this matrix to val.

source

pub fn fill_row(&mut self, i: usize, val: T)
where T: Scalar,

Sets all the elements of the selected row to val.

source

pub fn fill_column(&mut self, j: usize, val: T)
where T: Scalar,

Sets all the elements of the selected column to val.

source

pub fn fill_lower_triangle(&mut self, val: T, shift: usize)
where T: Scalar,

Sets all the elements of the lower-triangular part of this matrix to val.

The parameter shift allows some subdiagonals to be left untouched:

  • If shift = 0 then the diagonal is overwritten as well.
  • If shift = 1 then the diagonal is left untouched.
  • If shift > 1, then the diagonal and the first shift - 1 subdiagonals are left untouched.
source

pub fn fill_upper_triangle(&mut self, val: T, shift: usize)
where T: Scalar,

Sets all the elements of the lower-triangular part of this matrix to val.

The parameter shift allows some superdiagonals to be left untouched:

  • If shift = 0 then the diagonal is overwritten as well.
  • If shift = 1 then the diagonal is left untouched.
  • If shift > 1, then the diagonal and the first shift - 1 superdiagonals are left untouched.
source§

impl<T, D, S> Matrix<T, D, D, S>
where T: Scalar, D: Dim, S: RawStorageMut<T, D, D>,

source

pub fn fill_lower_triangle_with_upper_triangle(&mut self)

Copies the upper-triangle of this matrix to its lower-triangular part.

This makes the matrix symmetric. Panics if the matrix is not square.

source

pub fn fill_upper_triangle_with_lower_triangle(&mut self)

Copies the upper-triangle of this matrix to its upper-triangular part.

This makes the matrix symmetric. Panics if the matrix is not square.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where T: Scalar, R: Dim, C: Dim, S: RawStorageMut<T, R, C>,

§In-place swapping

source

pub fn swap_rows(&mut self, irow1: usize, irow2: usize)

Swaps two rows in-place.

source

pub fn swap_columns(&mut self, icol1: usize, icol2: usize)

Swaps two columns in-place.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where T: Scalar, R: Dim, C: Dim, S: Storage<T, R, C>,

§Rows and columns removal

source

pub fn remove_column( self, i: usize, ) -> Matrix<T, R, <C as DimSub<Const<1>>>::Output, <DefaultAllocator as Allocator<T, R, <C as DimSub<Const<1>>>::Output>>::Buffer>
where C: DimSub<Const<1>>, DefaultAllocator: Reallocator<T, R, C, R, <C as DimSub<Const<1>>>::Output>,

Removes the i-th column from this matrix.

source

pub fn remove_columns_at( self, indices: &[usize], ) -> Matrix<T, R, Dyn, <DefaultAllocator as Allocator<T, R, Dyn>>::Buffer>
where C: DimSub<Dyn, Output = Dyn>, DefaultAllocator: Reallocator<T, R, C, R, Dyn>,

Removes all columns in indices

source

pub fn remove_rows_at( self, indices: &[usize], ) -> Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>
where R: DimSub<Dyn, Output = Dyn>, DefaultAllocator: Reallocator<T, R, C, Dyn, C>,

Removes all rows in indices

source

pub fn remove_fixed_columns<const D: usize>( self, i: usize, ) -> Matrix<T, R, <C as DimSub<Const<D>>>::Output, <DefaultAllocator as Allocator<T, R, <C as DimSub<Const<D>>>::Output>>::Buffer>
where C: DimSub<Const<D>>, DefaultAllocator: Reallocator<T, R, C, R, <C as DimSub<Const<D>>>::Output>,

Removes D::dim() consecutive columns from this matrix, starting with the i-th (included).

source

pub fn remove_columns( self, i: usize, n: usize, ) -> Matrix<T, R, Dyn, <DefaultAllocator as Allocator<T, R, Dyn>>::Buffer>
where C: DimSub<Dyn, Output = Dyn>, DefaultAllocator: Reallocator<T, R, C, R, Dyn>,

Removes n consecutive columns from this matrix, starting with the i-th (included).

source

pub fn remove_columns_generic<D>( self, i: usize, nremove: D, ) -> Matrix<T, R, <C as DimSub<D>>::Output, <DefaultAllocator as Allocator<T, R, <C as DimSub<D>>::Output>>::Buffer>
where D: Dim, C: DimSub<D>, DefaultAllocator: Reallocator<T, R, C, R, <C as DimSub<D>>::Output>,

Removes nremove.value() columns from this matrix, starting with the i-th (included).

This is the generic implementation of .remove_columns(...) and .remove_fixed_columns(...) which have nicer API interfaces.

source

pub fn remove_row( self, i: usize, ) -> Matrix<T, <R as DimSub<Const<1>>>::Output, C, <DefaultAllocator as Allocator<T, <R as DimSub<Const<1>>>::Output, C>>::Buffer>
where R: DimSub<Const<1>>, DefaultAllocator: Reallocator<T, R, C, <R as DimSub<Const<1>>>::Output, C>,

Removes the i-th row from this matrix.

source

pub fn remove_fixed_rows<const D: usize>( self, i: usize, ) -> Matrix<T, <R as DimSub<Const<D>>>::Output, C, <DefaultAllocator as Allocator<T, <R as DimSub<Const<D>>>::Output, C>>::Buffer>
where R: DimSub<Const<D>>, DefaultAllocator: Reallocator<T, R, C, <R as DimSub<Const<D>>>::Output, C>,

Removes D::dim() consecutive rows from this matrix, starting with the i-th (included).

source

pub fn remove_rows( self, i: usize, n: usize, ) -> Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>
where R: DimSub<Dyn, Output = Dyn>, DefaultAllocator: Reallocator<T, R, C, Dyn, C>,

Removes n consecutive rows from this matrix, starting with the i-th (included).

source

pub fn remove_rows_generic<D>( self, i: usize, nremove: D, ) -> Matrix<T, <R as DimSub<D>>::Output, C, <DefaultAllocator as Allocator<T, <R as DimSub<D>>::Output, C>>::Buffer>
where D: Dim, R: DimSub<D>, DefaultAllocator: Reallocator<T, R, C, <R as DimSub<D>>::Output, C>,

Removes nremove.value() rows from this matrix, starting with the i-th (included).

This is the generic implementation of .remove_rows(...) and .remove_fixed_rows(...) which have nicer API interfaces.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where T: Scalar, R: Dim, C: Dim, S: Storage<T, R, C>,

§Rows and columns insertion

source

pub fn insert_column( self, i: usize, val: T, ) -> Matrix<T, R, <C as DimAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T, R, <C as DimAdd<Const<1>>>::Output>>::Buffer>
where C: DimAdd<Const<1>>, DefaultAllocator: Reallocator<T, R, C, R, <C as DimAdd<Const<1>>>::Output>,

Inserts a column filled with val at the i-th position.

source

pub fn insert_fixed_columns<const D: usize>( self, i: usize, val: T, ) -> Matrix<T, R, <C as DimAdd<Const<D>>>::Output, <DefaultAllocator as Allocator<T, R, <C as DimAdd<Const<D>>>::Output>>::Buffer>
where C: DimAdd<Const<D>>, DefaultAllocator: Reallocator<T, R, C, R, <C as DimAdd<Const<D>>>::Output>,

Inserts D columns filled with val starting at the i-th position.

source

pub fn insert_columns( self, i: usize, n: usize, val: T, ) -> Matrix<T, R, Dyn, <DefaultAllocator as Allocator<T, R, Dyn>>::Buffer>
where C: DimAdd<Dyn, Output = Dyn>, DefaultAllocator: Reallocator<T, R, C, R, Dyn>,

Inserts n columns filled with val starting at the i-th position.

source

pub unsafe fn insert_columns_generic_uninitialized<D>( self, i: usize, ninsert: D, ) -> Matrix<MaybeUninit<T>, R, <C as DimAdd<D>>::Output, <DefaultAllocator as Allocator<T, R, <C as DimAdd<D>>::Output>>::BufferUninit>
where D: Dim, C: DimAdd<D>, DefaultAllocator: Reallocator<T, R, C, R, <C as DimAdd<D>>::Output>,

Inserts ninsert.value() columns starting at the i-th place of this matrix.

§Safety

The output matrix has all its elements initialized except for the the components of the added columns.

source

pub fn insert_row( self, i: usize, val: T, ) -> Matrix<T, <R as DimAdd<Const<1>>>::Output, C, <DefaultAllocator as Allocator<T, <R as DimAdd<Const<1>>>::Output, C>>::Buffer>
where R: DimAdd<Const<1>>, DefaultAllocator: Reallocator<T, R, C, <R as DimAdd<Const<1>>>::Output, C>,

Inserts a row filled with val at the i-th position.

source

pub fn insert_fixed_rows<const D: usize>( self, i: usize, val: T, ) -> Matrix<T, <R as DimAdd<Const<D>>>::Output, C, <DefaultAllocator as Allocator<T, <R as DimAdd<Const<D>>>::Output, C>>::Buffer>
where R: DimAdd<Const<D>>, DefaultAllocator: Reallocator<T, R, C, <R as DimAdd<Const<D>>>::Output, C>,

Inserts D::dim() rows filled with val starting at the i-th position.

source

pub fn insert_rows( self, i: usize, n: usize, val: T, ) -> Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>
where R: DimAdd<Dyn, Output = Dyn>, DefaultAllocator: Reallocator<T, R, C, Dyn, C>,

Inserts n rows filled with val starting at the i-th position.

source

pub unsafe fn insert_rows_generic_uninitialized<D>( self, i: usize, ninsert: D, ) -> Matrix<MaybeUninit<T>, <R as DimAdd<D>>::Output, C, <DefaultAllocator as Allocator<T, <R as DimAdd<D>>::Output, C>>::BufferUninit>
where D: Dim, R: DimAdd<D>, DefaultAllocator: Reallocator<T, R, C, <R as DimAdd<D>>::Output, C>,

Inserts ninsert.value() rows at the i-th place of this matrix.

§Safety

The added rows values are not initialized. This is the generic implementation of .insert_rows(...) and .insert_fixed_rows(...) which have nicer API interfaces.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where T: Scalar, R: Dim, C: Dim, S: Storage<T, R, C>,

§Resizing and reshaping

source

pub fn resize( self, new_nrows: usize, new_ncols: usize, val: T, ) -> Matrix<T, Dyn, Dyn, <DefaultAllocator as Allocator<T, Dyn, Dyn>>::Buffer>
where DefaultAllocator: Reallocator<T, R, C, Dyn, Dyn>,

Resizes this matrix so that it contains new_nrows rows and new_ncols columns.

The values are copied such that self[(i, j)] == result[(i, j)]. If the result has more rows and/or columns than self, then the extra rows or columns are filled with val.

source

pub fn resize_vertically( self, new_nrows: usize, val: T, ) -> Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>
where DefaultAllocator: Reallocator<T, R, C, Dyn, C>,

Resizes this matrix vertically, i.e., so that it contains new_nrows rows while keeping the same number of columns.

The values are copied such that self[(i, j)] == result[(i, j)]. If the result has more rows than self, then the extra rows are filled with val.

source

pub fn resize_horizontally( self, new_ncols: usize, val: T, ) -> Matrix<T, R, Dyn, <DefaultAllocator as Allocator<T, R, Dyn>>::Buffer>
where DefaultAllocator: Reallocator<T, R, C, R, Dyn>,

Resizes this matrix horizontally, i.e., so that it contains new_ncolumns columns while keeping the same number of columns.

The values are copied such that self[(i, j)] == result[(i, j)]. If the result has more columns than self, then the extra columns are filled with val.

source

pub fn fixed_resize<const R2: usize, const C2: usize>( self, val: T, ) -> Matrix<T, Const<R2>, Const<C2>, <DefaultAllocator as Allocator<T, Const<R2>, Const<C2>>>::Buffer>
where DefaultAllocator: Reallocator<T, R, C, Const<R2>, Const<C2>>,

Resizes this matrix so that it contains R2::value() rows and C2::value() columns.

The values are copied such that self[(i, j)] == result[(i, j)]. If the result has more rows and/or columns than self, then the extra rows or columns are filled with val.

source

pub fn resize_generic<R2, C2>( self, new_nrows: R2, new_ncols: C2, val: T, ) -> Matrix<T, R2, C2, <DefaultAllocator as Allocator<T, R2, C2>>::Buffer>
where R2: Dim, C2: Dim, DefaultAllocator: Reallocator<T, R, C, R2, C2>,

Resizes self such that it has dimensions new_nrows × new_ncols.

The values are copied such that self[(i, j)] == result[(i, j)]. If the result has more rows and/or columns than self, then the extra rows or columns are filled with val.

source

pub fn reshape_generic<R2, C2>( self, new_nrows: R2, new_ncols: C2, ) -> Matrix<T, R2, C2, <S as ReshapableStorage<T, R, C, R2, C2>>::Output>
where R2: Dim, C2: Dim, S: ReshapableStorage<T, R, C, R2, C2>,

Reshapes self such that it has dimensions new_nrows × new_ncols.

This will reinterpret self as if it is a matrix with new_nrows rows and new_ncols columns. The arrangements of the component in the output matrix are the same as what would be obtained by Matrix::from_slice_generic(self.as_slice(), new_nrows, new_ncols).

If self is a dynamically-sized matrix, then its components are neither copied nor moved. If self is staticyll-sized, then a copy may happen in some situations. This function will panic if the given dimensions are such that the number of elements of the input matrix are not equal to the number of elements of the output matrix.

§Examples

let m1 = Matrix2x3::new(
    1.1, 1.2, 1.3,
    2.1, 2.2, 2.3
);
let m2 = Matrix3x2::new(
    1.1, 2.2,
    2.1, 1.3,
    1.2, 2.3
);
let reshaped = m1.reshape_generic(Const::<3>, Const::<2>);
assert_eq!(reshaped, m2);

let dm1 = DMatrix::from_row_slice(
    4,
    3,
    &[
        1.0, 0.0, 0.0,
        0.0, 0.0, 1.0,
        0.0, 0.0, 0.0,
        0.0, 1.0, 0.0
    ],
);
let dm2 = DMatrix::from_row_slice(
    6,
    2,
    &[
        1.0, 0.0,
        0.0, 1.0,
        0.0, 0.0,
        0.0, 1.0,
        0.0, 0.0,
        0.0, 0.0,
    ],
);
let reshaped = dm1.reshape_generic(Dyn(6), Dyn(2));
assert_eq!(reshaped, dm2);
source§

impl<T> Matrix<T, Dyn, Dyn, <DefaultAllocator as Allocator<T, Dyn, Dyn>>::Buffer>
where T: Scalar,

§In-place resizing

source

pub fn resize_mut(&mut self, new_nrows: usize, new_ncols: usize, val: T)

Resizes this matrix in-place.

The values are copied such that self[(i, j)] == result[(i, j)]. If the result has more rows and/or columns than self, then the extra rows or columns are filled with val.

Defined only for owned fully-dynamic matrices, i.e., DMatrix.

source§

impl<T, C> Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>
where T: Scalar, C: Dim, DefaultAllocator: Allocator<T, Dyn, C>,

source

pub fn resize_vertically_mut(&mut self, new_nrows: usize, val: T)
where DefaultAllocator: Reallocator<T, Dyn, C, Dyn, C>,

Changes the number of rows of this matrix in-place.

The values are copied such that self[(i, j)] == result[(i, j)]. If the result has more rows than self, then the extra rows are filled with val.

Defined only for owned matrices with a dynamic number of rows (for example, DVector).

source§

impl<T, R> Matrix<T, R, Dyn, <DefaultAllocator as Allocator<T, R, Dyn>>::Buffer>
where T: Scalar, R: Dim, DefaultAllocator: Allocator<T, R, Dyn>,

source

pub fn resize_horizontally_mut(&mut self, new_ncols: usize, val: T)
where DefaultAllocator: Reallocator<T, R, Dyn, R, Dyn>,

Changes the number of column of this matrix in-place.

The values are copied such that self[(i, j)] == result[(i, j)]. If the result has more columns than self, then the extra columns are filled with val.

Defined only for owned matrices with a dynamic number of columns (for example, DVector).

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where R: Dim, C: Dim, S: RawStorage<T, R, C>,

§Views based on ranges

§Indices to Individual Elements
§Two-Dimensional Indices
let matrix = Matrix2::new(0, 2,
                          1, 3);

assert_eq!(matrix.index((0, 0)), &0);
assert_eq!(matrix.index((1, 0)), &1);
assert_eq!(matrix.index((0, 1)), &2);
assert_eq!(matrix.index((1, 1)), &3);
§Linear Address Indexing
let matrix = Matrix2::new(0, 2,
                          1, 3);

assert_eq!(matrix.get(0), Some(&0));
assert_eq!(matrix.get(1), Some(&1));
assert_eq!(matrix.get(2), Some(&2));
assert_eq!(matrix.get(3), Some(&3));
§Indices to Individual Rows and Columns
§Index to a Row
let matrix = Matrix2::new(0, 2,
                          1, 3);

assert!(matrix.index((0, ..))
    .eq(&Matrix1x2::new(0, 2)));
§Index to a Column
let matrix = Matrix2::new(0, 2,
                          1, 3);

assert!(matrix.index((.., 0))
    .eq(&Matrix2x1::new(0,
                        1)));
§Indices to Parts of Individual Rows and Columns
§Index to a Partial Row
let matrix = Matrix3::new(0, 3, 6,
                          1, 4, 7,
                          2, 5, 8);

assert!(matrix.index((0, ..2))
    .eq(&Matrix1x2::new(0, 3)));
§Index to a Partial Column
let matrix = Matrix3::new(0, 3, 6,
                          1, 4, 7,
                          2, 5, 8);

assert!(matrix.index((..2, 0))
    .eq(&Matrix2x1::new(0,
                        1)));

assert!(matrix.index((Const::<1>.., 0))
    .eq(&Matrix2x1::new(1,
                        2)));
§Indices to Ranges of Rows and Columns
§Index to a Range of Rows
let matrix = Matrix3::new(0, 3, 6,
                          1, 4, 7,
                          2, 5, 8);

assert!(matrix.index((1..3, ..))
    .eq(&Matrix2x3::new(1, 4, 7,
                        2, 5, 8)));
§Index to a Range of Columns
let matrix = Matrix3::new(0, 3, 6,
                          1, 4, 7,
                          2, 5, 8);

assert!(matrix.index((.., 1..3))
    .eq(&Matrix3x2::new(3, 6,
                        4, 7,
                        5, 8)));
source

pub fn get<'a, I>( &'a self, index: I, ) -> Option<<I as MatrixIndex<'a, T, R, C, S>>::Output>
where I: MatrixIndex<'a, T, R, C, S>,

Produces a view of the data at the given index, or None if the index is out of bounds.

source

pub fn get_mut<'a, I>( &'a mut self, index: I, ) -> Option<<I as MatrixIndexMut<'a, T, R, C, S>>::OutputMut>
where S: RawStorageMut<T, R, C>, I: MatrixIndexMut<'a, T, R, C, S>,

Produces a mutable view of the data at the given index, or None if the index is out of bounds.

source

pub fn index<'a, I>( &'a self, index: I, ) -> <I as MatrixIndex<'a, T, R, C, S>>::Output
where I: MatrixIndex<'a, T, R, C, S>,

Produces a view of the data at the given index, or panics if the index is out of bounds.

source

pub fn index_mut<'a, I>( &'a mut self, index: I, ) -> <I as MatrixIndexMut<'a, T, R, C, S>>::OutputMut
where S: RawStorageMut<T, R, C>, I: MatrixIndexMut<'a, T, R, C, S>,

Produces a mutable view of the data at the given index, or panics if the index is out of bounds.

source

pub unsafe fn get_unchecked<'a, I>( &'a self, index: I, ) -> <I as MatrixIndex<'a, T, R, C, S>>::Output
where I: MatrixIndex<'a, T, R, C, S>,

Produces a view of the data at the given index, without doing any bounds checking.

source

pub unsafe fn get_unchecked_mut<'a, I>( &'a mut self, index: I, ) -> <I as MatrixIndexMut<'a, T, R, C, S>>::OutputMut
where S: RawStorageMut<T, R, C>, I: MatrixIndexMut<'a, T, R, C, S>,

Returns a mutable view of the data at the given index, without doing any bounds checking.

source§

impl<T, R, C, S> Matrix<T, R, C, S>

source

pub const unsafe fn from_data_statically_unchecked( data: S, ) -> Matrix<T, R, C, S>

Creates a new matrix with the given data without statically checking that the matrix dimension matches the storage dimension.

source§

impl<T, const R: usize, const C: usize> Matrix<T, Const<R>, Const<C>, ArrayStorage<T, R, C>>

source

pub const fn from_array_storage( storage: ArrayStorage<T, R, C>, ) -> Matrix<T, Const<R>, Const<C>, ArrayStorage<T, R, C>>

Creates a new statically-allocated matrix from the given ArrayStorage.

This method exists primarily as a workaround for the fact that from_data can not work in const fn contexts.

source§

impl<T> Matrix<T, Dyn, Dyn, VecStorage<T, Dyn, Dyn>>

source

pub const fn from_vec_storage( storage: VecStorage<T, Dyn, Dyn>, ) -> Matrix<T, Dyn, Dyn, VecStorage<T, Dyn, Dyn>>

Creates a new heap-allocated matrix from the given VecStorage.

This method exists primarily as a workaround for the fact that from_data can not work in const fn contexts.

source§

impl<T> Matrix<T, Dyn, Const<1>, VecStorage<T, Dyn, Const<1>>>

source

pub const fn from_vec_storage( storage: VecStorage<T, Dyn, Const<1>>, ) -> Matrix<T, Dyn, Const<1>, VecStorage<T, Dyn, Const<1>>>

Creates a new heap-allocated matrix from the given VecStorage.

This method exists primarily as a workaround for the fact that from_data can not work in const fn contexts.

source§

impl<T> Matrix<T, Const<1>, Dyn, VecStorage<T, Const<1>, Dyn>>

source

pub const fn from_vec_storage( storage: VecStorage<T, Const<1>, Dyn>, ) -> Matrix<T, Const<1>, Dyn, VecStorage<T, Const<1>, Dyn>>

Creates a new heap-allocated matrix from the given VecStorage.

This method exists primarily as a workaround for the fact that from_data can not work in const fn contexts.

source§

impl<T, R, C> Matrix<MaybeUninit<T>, R, C, <DefaultAllocator as Allocator<T, R, C>>::BufferUninit>
where R: Dim, C: Dim, DefaultAllocator: Allocator<T, R, C>,

source

pub unsafe fn assume_init( self, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

Assumes a matrix’s entries to be initialized. This operation should be near zero-cost.

§Safety

The user must make sure that every single entry of the buffer has been initialized, or Undefined Behavior will immediately occur.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where R: Dim, C: Dim, S: RawStorage<T, R, C>,

source

pub fn from_data(data: S) -> Matrix<T, R, C, S>

Creates a new matrix with the given data.

source

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

The shape of this matrix returned as the tuple (number of rows, number of columns).

§Example
let mat = Matrix3x4::<f32>::zeros();
assert_eq!(mat.shape(), (3, 4));
source

pub fn shape_generic(&self) -> (R, C)

The shape of this matrix wrapped into their representative types (Const or Dyn).

source

pub fn nrows(&self) -> usize

The number of rows of this matrix.

§Example
let mat = Matrix3x4::<f32>::zeros();
assert_eq!(mat.nrows(), 3);
source

pub fn ncols(&self) -> usize

The number of columns of this matrix.

§Example
let mat = Matrix3x4::<f32>::zeros();
assert_eq!(mat.ncols(), 4);
source

pub fn strides(&self) -> (usize, usize)

The strides (row stride, column stride) of this matrix.

§Example
let mat = DMatrix::<f32>::zeros(10, 10);
let view = mat.view_with_steps((0, 0), (5, 3), (1, 2));
// The column strides is the number of steps (here 2) multiplied by the corresponding dimension.
assert_eq!(mat.strides(), (1, 10));
source

pub fn vector_to_matrix_index(&self, i: usize) -> (usize, usize)

Computes the row and column coordinates of the i-th element of this matrix seen as a vector.

§Example
let m = Matrix2::new(1, 2,
                     3, 4);
let i = m.vector_to_matrix_index(3);
assert_eq!(i, (1, 1));
assert_eq!(m[i], m[3]);
source

pub fn as_ptr(&self) -> *const T

Returns a pointer to the start of the matrix.

If the matrix is not empty, this pointer is guaranteed to be aligned and non-null.

§Example
let m = Matrix2::new(1, 2,
                     3, 4);
let ptr = m.as_ptr();
assert_eq!(unsafe { *ptr }, m[0]);
source

pub fn relative_eq<R2, C2, SB>( &self, other: &Matrix<T, R2, C2, SB>, eps: <T as AbsDiffEq>::Epsilon, max_relative: <T as AbsDiffEq>::Epsilon, ) -> bool
where T: RelativeEq, R2: Dim, C2: Dim, SB: Storage<T, R2, C2>, <T as AbsDiffEq>::Epsilon: Clone, ShapeConstraint: SameNumberOfRows<R, R2> + SameNumberOfColumns<C, C2>,

Tests whether self and rhs are equal up to a given epsilon.

See relative_eq from the RelativeEq trait for more details.

source

pub fn eq<R2, C2, SB>(&self, other: &Matrix<T, R2, C2, SB>) -> bool
where T: PartialEq, R2: Dim, C2: Dim, SB: RawStorage<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R, R2> + SameNumberOfColumns<C, C2>,

Tests whether self and rhs are exactly equal.

source

pub fn into_owned( self, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where T: Scalar, S: Storage<T, R, C>, DefaultAllocator: Allocator<T, R, C>,

Moves this matrix into one that owns its data.

source

pub fn into_owned_sum<R2, C2>( self, ) -> Matrix<T, <ShapeConstraint as SameNumberOfRows<R, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C, C2>>::Representative, <DefaultAllocator as Allocator<T, <ShapeConstraint as SameNumberOfRows<R, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C, C2>>::Representative>>::Buffer>
where T: Scalar, S: Storage<T, R, C>, R2: Dim, C2: Dim, DefaultAllocator: SameShapeAllocator<T, R, C, R2, C2>, ShapeConstraint: SameNumberOfRows<R, R2> + SameNumberOfColumns<C, C2>,

Moves this matrix into one that owns its data. The actual type of the result depends on matrix storage combination rules for addition.

source

pub fn clone_owned( &self, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where T: Scalar, S: Storage<T, R, C>, DefaultAllocator: Allocator<T, R, C>,

Clones this matrix to one that owns its data.

source

pub fn clone_owned_sum<R2, C2>( &self, ) -> Matrix<T, <ShapeConstraint as SameNumberOfRows<R, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C, C2>>::Representative, <DefaultAllocator as Allocator<T, <ShapeConstraint as SameNumberOfRows<R, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C, C2>>::Representative>>::Buffer>
where T: Scalar, S: Storage<T, R, C>, R2: Dim, C2: Dim, DefaultAllocator: SameShapeAllocator<T, R, C, R2, C2>, ShapeConstraint: SameNumberOfRows<R, R2> + SameNumberOfColumns<C, C2>,

Clones this matrix into one that owns its data. The actual type of the result depends on matrix storage combination rules for addition.

source

pub fn transpose_to<R2, C2, SB>(&self, out: &mut Matrix<T, R2, C2, SB>)
where T: Scalar, R2: Dim, C2: Dim, SB: RawStorageMut<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R, C2> + SameNumberOfColumns<C, R2>,

Transposes self and store the result into out.

source

pub fn transpose( &self, ) -> Matrix<T, C, R, <DefaultAllocator as Allocator<T, C, R>>::Buffer>
where T: Scalar, DefaultAllocator: Allocator<T, C, R>,

Transposes self.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where R: Dim, C: Dim, S: RawStorage<T, R, C>,

§Elementwise mapping and folding

source

pub fn map<T2, F>( &self, f: F, ) -> Matrix<T2, R, C, <DefaultAllocator as Allocator<T2, R, C>>::Buffer>
where T2: Scalar, F: FnMut(T) -> T2, T: Scalar, DefaultAllocator: Allocator<T2, R, C>,

Returns a matrix containing the result of f applied to each of its entries.

source

pub fn cast<T2>( self, ) -> Matrix<T2, R, C, <DefaultAllocator as Allocator<T2, R, C>>::Buffer>
where T2: Scalar, T: Scalar, Matrix<T2, R, C, <DefaultAllocator as Allocator<T2, R, C>>::Buffer>: SupersetOf<Matrix<T, R, C, S>>, DefaultAllocator: Allocator<T2, R, C>,

Cast the components of self to another type.

§Example
let q = Vector3::new(1.0f64, 2.0, 3.0);
let q2 = q.cast::<f32>();
assert_eq!(q2, Vector3::new(1.0f32, 2.0, 3.0));
source

pub fn try_cast<T2>( self, ) -> Option<Matrix<T2, R, C, <DefaultAllocator as Allocator<T2, R, C>>::Buffer>>
where T2: Scalar, T: Scalar, Matrix<T, R, C, S>: SupersetOf<Matrix<T2, R, C, <DefaultAllocator as Allocator<T2, R, C>>::Buffer>>, DefaultAllocator: Allocator<T2, R, C>,

Attempts to cast the components of self to another type.

§Example
let q = Vector3::new(1.0f64, 2.0, 3.0);
let q2 = q.try_cast::<i32>();
assert_eq!(q2, Some(Vector3::new(1, 2, 3)));
source

pub fn fold_with<T2>( &self, init_f: impl FnOnce(Option<&T>) -> T2, f: impl FnMut(T2, &T) -> T2, ) -> T2
where T: Scalar,

Similar to self.iter().fold(init, f) except that init is replaced by a closure.

The initialization closure is given the first component of this matrix:

  • If the matrix has no component (0 rows or 0 columns) then init_f is called with None and its return value is the value returned by this method.
  • If the matrix has has least one component, then init_f is called with the first component to compute the initial value. Folding then continues on all the remaining components of the matrix.
source

pub fn map_with_location<T2, F>( &self, f: F, ) -> Matrix<T2, R, C, <DefaultAllocator as Allocator<T2, R, C>>::Buffer>
where T2: Scalar, F: FnMut(usize, usize, T) -> T2, T: Scalar, DefaultAllocator: Allocator<T2, R, C>,

Returns a matrix containing the result of f applied to each of its entries. Unlike map, f also gets passed the row and column index, i.e. f(row, col, value).

source

pub fn zip_map<T2, N3, S2, F>( &self, rhs: &Matrix<T2, R, C, S2>, f: F, ) -> Matrix<N3, R, C, <DefaultAllocator as Allocator<N3, R, C>>::Buffer>
where T: Scalar, T2: Scalar, N3: Scalar, S2: RawStorage<T2, R, C>, F: FnMut(T, T2) -> N3, DefaultAllocator: Allocator<N3, R, C>,

Returns a matrix containing the result of f applied to each entries of self and rhs.

source

pub fn zip_zip_map<T2, N3, N4, S2, S3, F>( &self, b: &Matrix<T2, R, C, S2>, c: &Matrix<N3, R, C, S3>, f: F, ) -> Matrix<N4, R, C, <DefaultAllocator as Allocator<N4, R, C>>::Buffer>
where T: Scalar, T2: Scalar, N3: Scalar, N4: Scalar, S2: RawStorage<T2, R, C>, S3: RawStorage<N3, R, C>, F: FnMut(T, T2, N3) -> N4, DefaultAllocator: Allocator<N4, R, C>,

Returns a matrix containing the result of f applied to each entries of self and b, and c.

source

pub fn fold<Acc>(&self, init: Acc, f: impl FnMut(Acc, T) -> Acc) -> Acc
where T: Scalar,

Folds a function f on each entry of self.

source

pub fn zip_fold<T2, R2, C2, S2, Acc>( &self, rhs: &Matrix<T2, R2, C2, S2>, init: Acc, f: impl FnMut(Acc, T, T2) -> Acc, ) -> Acc
where T: Scalar, T2: Scalar, R2: Dim, C2: Dim, S2: RawStorage<T2, R2, C2>, ShapeConstraint: SameNumberOfRows<R, R2> + SameNumberOfColumns<C, C2>,

Folds a function f on each pairs of entries from self and rhs.

source

pub fn apply<F>(&mut self, f: F)
where F: FnMut(&mut T), S: RawStorageMut<T, R, C>,

Applies a closure f to modify each component of self.

source

pub fn zip_apply<T2, R2, C2, S2>( &mut self, rhs: &Matrix<T2, R2, C2, S2>, f: impl FnMut(&mut T, T2), )
where S: RawStorageMut<T, R, C>, T2: Scalar, R2: Dim, C2: Dim, S2: RawStorage<T2, R2, C2>, ShapeConstraint: SameNumberOfRows<R, R2> + SameNumberOfColumns<C, C2>,

Replaces each component of self by the result of a closure f applied on its components joined with the components from rhs.

source

pub fn zip_zip_apply<T2, R2, C2, S2, N3, R3, C3, S3>( &mut self, b: &Matrix<T2, R2, C2, S2>, c: &Matrix<N3, R3, C3, S3>, f: impl FnMut(&mut T, T2, N3), )
where S: RawStorageMut<T, R, C>, T2: Scalar, R2: Dim, C2: Dim, S2: RawStorage<T2, R2, C2>, N3: Scalar, R3: Dim, C3: Dim, S3: RawStorage<N3, R3, C3>, ShapeConstraint: SameNumberOfRows<R, R2> + SameNumberOfColumns<C, C2>,

Replaces each component of self by the result of a closure f applied on its components joined with the components from b and c.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where R: Dim, C: Dim, S: RawStorage<T, R, C>,

§Iteration on components, rows, and columns

source

pub fn iter(&self) -> MatrixIter<'_, T, R, C, S>

Iterates through this matrix coordinates in column-major order.

§Example
let mat = Matrix2x3::new(11, 12, 13,
                         21, 22, 23);
let mut it = mat.iter();
assert_eq!(*it.next().unwrap(), 11);
assert_eq!(*it.next().unwrap(), 21);
assert_eq!(*it.next().unwrap(), 12);
assert_eq!(*it.next().unwrap(), 22);
assert_eq!(*it.next().unwrap(), 13);
assert_eq!(*it.next().unwrap(), 23);
assert!(it.next().is_none());
source

pub fn row_iter(&self) -> RowIter<'_, T, R, C, S>

Iterate through the rows of this matrix.

§Example
let mut a = Matrix2x3::new(1, 2, 3,
                           4, 5, 6);
for (i, row) in a.row_iter().enumerate() {
    assert_eq!(row, a.row(i))
}
source

pub fn column_iter(&self) -> ColumnIter<'_, T, R, C, S>

Iterate through the columns of this matrix.

§Example
let mut a = Matrix2x3::new(1, 2, 3,
                           4, 5, 6);
for (i, column) in a.column_iter().enumerate() {
    assert_eq!(column, a.column(i))
}
source

pub fn iter_mut(&mut self) -> MatrixIterMut<'_, T, R, C, S>
where S: RawStorageMut<T, R, C>,

Mutably iterates through this matrix coordinates.

source

pub fn row_iter_mut(&mut self) -> RowIterMut<'_, T, R, C, S>
where S: RawStorageMut<T, R, C>,

Mutably iterates through this matrix rows.

§Example
let mut a = Matrix2x3::new(1, 2, 3,
                           4, 5, 6);
for (i, mut row) in a.row_iter_mut().enumerate() {
    row *= (i + 1) * 10;
}

let expected = Matrix2x3::new(10, 20, 30,
                              80, 100, 120);
assert_eq!(a, expected);
source

pub fn column_iter_mut(&mut self) -> ColumnIterMut<'_, T, R, C, S>
where S: RawStorageMut<T, R, C>,

Mutably iterates through this matrix columns.

§Example
let mut a = Matrix2x3::new(1, 2, 3,
                           4, 5, 6);
for (i, mut col) in a.column_iter_mut().enumerate() {
    col *= (i + 1) * 10;
}

let expected = Matrix2x3::new(10, 40, 90,
                              40, 100, 180);
assert_eq!(a, expected);
source§

impl<T, R, C, S> Matrix<T, R, C, S>
where R: Dim, C: Dim, S: RawStorageMut<T, R, C>,

source

pub fn as_mut_ptr(&mut self) -> *mut T

Returns a mutable pointer to the start of the matrix.

If the matrix is not empty, this pointer is guaranteed to be aligned and non-null.

source

pub unsafe fn swap_unchecked( &mut self, row_cols1: (usize, usize), row_cols2: (usize, usize), )

Swaps two entries without bound-checking.

source

pub fn swap(&mut self, row_cols1: (usize, usize), row_cols2: (usize, usize))

Swaps two entries.

source

pub fn copy_from_slice(&mut self, slice: &[T])
where T: Scalar,

Fills this matrix with the content of a slice. Both must hold the same number of elements.

The components of the slice are assumed to be ordered in column-major order.

source

pub fn copy_from<R2, C2, SB>(&mut self, other: &Matrix<T, R2, C2, SB>)
where T: Scalar, R2: Dim, C2: Dim, SB: RawStorage<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R, R2> + SameNumberOfColumns<C, C2>,

Fills this matrix with the content of another one. Both must have the same shape.

source

pub fn tr_copy_from<R2, C2, SB>(&mut self, other: &Matrix<T, R2, C2, SB>)
where T: Scalar, R2: Dim, C2: Dim, SB: RawStorage<T, R2, C2>, ShapeConstraint: DimEq<R, C2> + SameNumberOfColumns<C, R2>,

Fills this matrix with the content of the transpose another one.

source

pub fn apply_into<F>(self, f: F) -> Matrix<T, R, C, S>
where F: FnMut(&mut T),

Returns self with each of its components replaced by the result of a closure f applied on it.

source§

impl<T, D, S> Matrix<T, D, Const<1>, S>
where D: Dim, S: RawStorage<T, D>,

source

pub unsafe fn vget_unchecked(&self, i: usize) -> &T

Gets a reference to the i-th element of this column vector without bound checking.

source§

impl<T, D, S> Matrix<T, D, Const<1>, S>
where D: Dim, S: RawStorageMut<T, D>,

source

pub unsafe fn vget_unchecked_mut(&mut self, i: usize) -> &mut T

Gets a mutable reference to the i-th element of this column vector without bound checking.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where R: Dim, C: Dim, S: RawStorage<T, R, C> + IsContiguous,

source

pub fn as_slice(&self) -> &[T]

Extracts a slice containing the entire matrix entries ordered column-by-columns.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where R: Dim, C: Dim, S: RawStorageMut<T, R, C> + IsContiguous,

source

pub fn as_mut_slice(&mut self) -> &mut [T]

Extracts a mutable slice containing the entire matrix entries ordered column-by-columns.

source§

impl<T, D, S> Matrix<T, D, D, S>
where T: Scalar, D: Dim, S: RawStorageMut<T, D, D>,

source

pub fn transpose_mut(&mut self)

Transposes the square matrix self in-place.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where T: SimdComplexField, R: Dim, C: Dim, S: RawStorage<T, R, C>,

source

pub fn adjoint_to<R2, C2, SB>(&self, out: &mut Matrix<T, R2, C2, SB>)
where R2: Dim, C2: Dim, SB: RawStorageMut<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R, C2> + SameNumberOfColumns<C, R2>,

Takes the adjoint (aka. conjugate-transpose) of self and store the result into out.

source

pub fn adjoint( &self, ) -> Matrix<T, C, R, <DefaultAllocator as Allocator<T, C, R>>::Buffer>
where DefaultAllocator: Allocator<T, C, R>,

The adjoint (aka. conjugate-transpose) of self.

source

pub fn conjugate_transpose_to<R2, C2, SB>( &self, out: &mut Matrix<T, R2, C2, SB>, )
where R2: Dim, C2: Dim, SB: RawStorageMut<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R, C2> + SameNumberOfColumns<C, R2>,

👎Deprecated: Renamed self.adjoint_to(out).

Takes the conjugate and transposes self and store the result into out.

source

pub fn conjugate_transpose( &self, ) -> Matrix<T, C, R, <DefaultAllocator as Allocator<T, C, R>>::Buffer>
where DefaultAllocator: Allocator<T, C, R>,

👎Deprecated: Renamed self.adjoint().

The conjugate transposition of self.

source

pub fn conjugate( &self, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where DefaultAllocator: Allocator<T, R, C>,

The conjugate of self.

source

pub fn unscale( &self, real: <T as SimdComplexField>::SimdRealField, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where DefaultAllocator: Allocator<T, R, C>,

Divides each component of the complex matrix self by the given real.

source

pub fn scale( &self, real: <T as SimdComplexField>::SimdRealField, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where DefaultAllocator: Allocator<T, R, C>,

Multiplies each component of the complex matrix self by the given real.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where T: SimdComplexField, R: Dim, C: Dim, S: RawStorageMut<T, R, C>,

source

pub fn conjugate_mut(&mut self)

The conjugate of the complex matrix self computed in-place.

source

pub fn unscale_mut(&mut self, real: <T as SimdComplexField>::SimdRealField)

Divides each component of the complex matrix self by the given real.

source

pub fn scale_mut(&mut self, real: <T as SimdComplexField>::SimdRealField)

Multiplies each component of the complex matrix self by the given real.

source§

impl<T, D, S> Matrix<T, D, D, S>
where T: SimdComplexField, D: Dim, S: RawStorageMut<T, D, D>,

source

pub fn conjugate_transform_mut(&mut self)

👎Deprecated: Renamed to self.adjoint_mut().

Sets self to its adjoint.

source

pub fn adjoint_mut(&mut self)

Sets self to its adjoint (aka. conjugate-transpose).

source§

impl<T, D, S> Matrix<T, D, D, S>
where T: Scalar, D: Dim, S: RawStorage<T, D, D>,

source

pub fn diagonal( &self, ) -> Matrix<T, D, Const<1>, <DefaultAllocator as Allocator<T, D>>::Buffer>

The diagonal of this matrix.

source

pub fn map_diagonal<T2>( &self, f: impl FnMut(T) -> T2, ) -> Matrix<T2, D, Const<1>, <DefaultAllocator as Allocator<T2, D>>::Buffer>
where T2: Scalar, DefaultAllocator: Allocator<T2, D>,

Apply the given function to this matrix’s diagonal and returns it.

This is a more efficient version of self.diagonal().map(f) since this allocates only once.

source

pub fn trace(&self) -> T
where T: Scalar + Zero + ClosedAdd,

Computes a trace of a square matrix, i.e., the sum of its diagonal elements.

source§

impl<T, D, S> Matrix<T, D, D, S>
where T: SimdComplexField, D: Dim, S: Storage<T, D, D>,

source

pub fn symmetric_part( &self, ) -> Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>
where DefaultAllocator: Allocator<T, D, D>,

The symmetric part of self, i.e., 0.5 * (self + self.transpose()).

source

pub fn hermitian_part( &self, ) -> Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>
where DefaultAllocator: Allocator<T, D, D>,

The hermitian part of self, i.e., 0.5 * (self + self.adjoint()).

source§

impl<T, D, S> Matrix<T, D, D, S>
where T: Scalar + Zero + One, D: DimAdd<Const<1>> + IsNotStaticOne, S: RawStorage<T, D, D>,

source

pub fn to_homogeneous( &self, ) -> Matrix<T, <D as DimAdd<Const<1>>>::Output, <D as DimAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T, <D as DimAdd<Const<1>>>::Output, <D as DimAdd<Const<1>>>::Output>>::Buffer>
where DefaultAllocator: Allocator<T, <D as DimAdd<Const<1>>>::Output, <D as DimAdd<Const<1>>>::Output>,

Yields the homogeneous matrix for this matrix, i.e., appending an additional dimension and and setting the diagonal element to 1.

source§

impl<T, D, S> Matrix<T, D, Const<1>, S>
where T: Scalar + Zero, D: DimAdd<Const<1>>, S: RawStorage<T, D>,

source

pub fn to_homogeneous( &self, ) -> Matrix<T, <D as DimAdd<Const<1>>>::Output, Const<1>, <DefaultAllocator as Allocator<T, <D as DimAdd<Const<1>>>::Output>>::Buffer>
where DefaultAllocator: Allocator<T, <D as DimAdd<Const<1>>>::Output>,

Computes the coordinates in projective space of this vector, i.e., appends a 0 to its coordinates.

source

pub fn from_homogeneous<SB>( v: Matrix<T, <D as DimAdd<Const<1>>>::Output, Const<1>, SB>, ) -> Option<Matrix<T, D, Const<1>, <DefaultAllocator as Allocator<T, D>>::Buffer>>
where SB: RawStorage<T, <D as DimAdd<Const<1>>>::Output>, DefaultAllocator: Allocator<T, 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.

source§

impl<T, D, S> Matrix<T, D, Const<1>, S>
where T: Scalar, D: DimAdd<Const<1>>, S: RawStorage<T, D>,

source

pub fn push( &self, element: T, ) -> Matrix<T, <D as DimAdd<Const<1>>>::Output, Const<1>, <DefaultAllocator as Allocator<T, <D as DimAdd<Const<1>>>::Output>>::Buffer>
where DefaultAllocator: Allocator<T, <D as DimAdd<Const<1>>>::Output>,

Constructs a new vector of higher dimension by appending element to the end of self.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where T: Scalar + ClosedAdd + ClosedSub + ClosedMul, R: Dim, C: Dim, S: RawStorage<T, R, C>,

§Cross product

source

pub fn perp<R2, C2, SB>(&self, b: &Matrix<T, R2, C2, SB>) -> T
where R2: Dim, C2: Dim, SB: RawStorage<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R, Const<2>> + SameNumberOfColumns<C, Const<1>> + SameNumberOfRows<R2, Const<2>> + SameNumberOfColumns<C2, Const<1>>,

The perpendicular product between two 2D column vectors, i.e. a.x * b.y - a.y * b.x.

source

pub fn cross<R2, C2, SB>( &self, b: &Matrix<T, R2, C2, SB>, ) -> Matrix<T, <ShapeConstraint as SameNumberOfRows<R, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C, C2>>::Representative, <DefaultAllocator as Allocator<T, <ShapeConstraint as SameNumberOfRows<R, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C, C2>>::Representative>>::Buffer>
where R2: Dim, C2: Dim, SB: RawStorage<T, R2, C2>, DefaultAllocator: SameShapeAllocator<T, R, C, R2, C2>, ShapeConstraint: SameNumberOfRows<R, R2> + SameNumberOfColumns<C, C2>,

The 3D cross product between two vectors.

Panics if the shape is not 3D vector. In the future, this will be implemented only for dynamically-sized matrices and statically-sized 3D matrices.

source§

impl<T, S> Matrix<T, Const<3>, Const<1>, S>
where T: Scalar + Field, S: RawStorage<T, Const<3>>,

source

pub fn cross_matrix( &self, ) -> Matrix<T, Const<3>, Const<3>, <DefaultAllocator as Allocator<T, Const<3>, Const<3>>>::Buffer>

Computes the matrix M such that for all vector v we have M * v == self.cross(&v).

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where T: SimdComplexField, R: Dim, C: Dim, S: Storage<T, R, C>,

source

pub fn angle<R2, C2, SB>( &self, other: &Matrix<T, R2, C2, SB>, ) -> <T as SimdComplexField>::SimdRealField
where R2: Dim, C2: Dim, SB: Storage<T, R2, C2>, ShapeConstraint: DimEq<R, R2> + DimEq<C, C2>,

The smallest angle between two vectors.

source§

impl<T, S> Matrix<T, Const<1>, Const<1>, S>
where S: RawStorage<T, Const<1>>,

source

pub fn as_scalar(&self) -> &T

Returns a reference to the single element in this matrix.

As opposed to indexing, using this provides type-safety when flattening dimensions.

§Example
let v = Vector3::new(0., 0., 1.);
let inner_product: f32 = *(v.transpose() * v).as_scalar();
 let v = Vector3::new(0., 0., 1.);
 let inner_product = (v * v.transpose()).item(); // Typo, does not compile.
source

pub fn as_scalar_mut(&mut self) -> &mut T
where S: RawStorageMut<T, Const<1>>,

Get a mutable reference to the single element in this matrix

As opposed to indexing, using this provides type-safety when flattening dimensions.

§Example
let v = Vector3::new(0., 0., 1.);
let mut inner_product = (v.transpose() * v);
*inner_product.as_scalar_mut() = 3.;
 let v = Vector3::new(0., 0., 1.);
 let mut inner_product = (v * v.transpose());
 *inner_product.as_scalar_mut() = 3.;
source

pub fn to_scalar(&self) -> T
where T: Clone,

Convert this 1x1 matrix by reference into a scalar.

As opposed to indexing, using this provides type-safety when flattening dimensions.

§Example
let v = Vector3::new(0., 0., 1.);
let mut inner_product: f32 = (v.transpose() * v).to_scalar();
 let v = Vector3::new(0., 0., 1.);
 let mut inner_product: f32 = (v * v.transpose()).to_scalar();
source§

impl<T> Matrix<T, Const<1>, Const<1>, ArrayStorage<T, 1, 1>>

source

pub fn into_scalar(self) -> T

Convert this 1x1 matrix into a scalar.

As opposed to indexing, using this provides type-safety when flattening dimensions.

§Example
let v = Vector3::new(0., 0., 1.);
let inner_product: f32 = (v.transpose() * v).into_scalar();
assert_eq!(inner_product, 1.);
 let v = Vector3::new(0., 0., 1.);
 let mut inner_product: f32 = (v * v.transpose()).into_scalar();
source§

impl<T, R, C, S> Matrix<T, R, C, S>
where R: Dim, C: Dim, S: RawStorage<T, R, C>,

§Views based on index and length

source

pub fn row( &self, i: usize, ) -> Matrix<T, Const<1>, C, ViewStorage<'_, T, Const<1>, C, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

Returns a view containing the i-th row of this matrix.

source

pub fn row_part( &self, i: usize, n: usize, ) -> Matrix<T, Const<1>, Dyn, ViewStorage<'_, T, Const<1>, Dyn, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

Returns a view containing the n first elements of the i-th row of this matrix.

source

pub fn rows( &self, first_row: usize, nrows: usize, ) -> Matrix<T, Dyn, C, ViewStorage<'_, T, Dyn, C, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

Extracts from this matrix a set of consecutive rows.

source

pub fn rows_with_step( &self, first_row: usize, nrows: usize, step: usize, ) -> Matrix<T, Dyn, C, ViewStorage<'_, T, Dyn, C, Dyn, <S as RawStorage<T, R, C>>::CStride>>

Extracts from this matrix a set of consecutive rows regularly skipping step rows.

source

pub fn fixed_rows<const RVIEW: usize>( &self, first_row: usize, ) -> Matrix<T, Const<RVIEW>, C, ViewStorage<'_, T, Const<RVIEW>, C, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

Extracts a compile-time number of consecutive rows from this matrix.

source

pub fn fixed_rows_with_step<const RVIEW: usize>( &self, first_row: usize, step: usize, ) -> Matrix<T, Const<RVIEW>, C, ViewStorage<'_, T, Const<RVIEW>, C, Dyn, <S as RawStorage<T, R, C>>::CStride>>

Extracts from this matrix a compile-time number of rows regularly skipping step rows.

source

pub fn rows_generic<RView>( &self, row_start: usize, nrows: RView, ) -> Matrix<T, RView, C, ViewStorage<'_, T, RView, C, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>
where RView: Dim,

Extracts from this matrix nrows rows regularly skipping step rows. Both argument may or may not be values known at compile-time.

source

pub fn rows_generic_with_step<RView>( &self, row_start: usize, nrows: RView, step: usize, ) -> Matrix<T, RView, C, ViewStorage<'_, T, RView, C, Dyn, <S as RawStorage<T, R, C>>::CStride>>
where RView: Dim,

Extracts from this matrix nrows rows regularly skipping step rows. Both argument may or may not be values known at compile-time.

source

pub fn column( &self, i: usize, ) -> Matrix<T, R, Const<1>, ViewStorage<'_, T, R, Const<1>, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

Returns a view containing the i-th column of this matrix.

source

pub fn column_part( &self, i: usize, n: usize, ) -> Matrix<T, Dyn, Const<1>, ViewStorage<'_, T, Dyn, Const<1>, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

Returns a view containing the n first elements of the i-th column of this matrix.

source

pub fn columns( &self, first_col: usize, ncols: usize, ) -> Matrix<T, R, Dyn, ViewStorage<'_, T, R, Dyn, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

Extracts from this matrix a set of consecutive columns.

source

pub fn columns_with_step( &self, first_col: usize, ncols: usize, step: usize, ) -> Matrix<T, R, Dyn, ViewStorage<'_, T, R, Dyn, <S as RawStorage<T, R, C>>::RStride, Dyn>>

Extracts from this matrix a set of consecutive columns regularly skipping step columns.

source

pub fn fixed_columns<const CVIEW: usize>( &self, first_col: usize, ) -> Matrix<T, R, Const<CVIEW>, ViewStorage<'_, T, R, Const<CVIEW>, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

Extracts a compile-time number of consecutive columns from this matrix.

source

pub fn fixed_columns_with_step<const CVIEW: usize>( &self, first_col: usize, step: usize, ) -> Matrix<T, R, Const<CVIEW>, ViewStorage<'_, T, R, Const<CVIEW>, <S as RawStorage<T, R, C>>::RStride, Dyn>>

Extracts from this matrix a compile-time number of columns regularly skipping step columns.

source

pub fn columns_generic<CView>( &self, first_col: usize, ncols: CView, ) -> Matrix<T, R, CView, ViewStorage<'_, T, R, CView, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>
where CView: Dim,

Extracts from this matrix ncols columns. The number of columns may or may not be known at compile-time.

source

pub fn columns_generic_with_step<CView>( &self, first_col: usize, ncols: CView, step: usize, ) -> Matrix<T, R, CView, ViewStorage<'_, T, R, CView, <S as RawStorage<T, R, C>>::RStride, Dyn>>
where CView: Dim,

Extracts from this matrix ncols columns skipping step columns. Both argument may or may not be values known at compile-time.

source

pub fn slice( &self, start: (usize, usize), shape: (usize, usize), ) -> Matrix<T, Dyn, Dyn, ViewStorage<'_, T, Dyn, Dyn, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

👎Deprecated: Use view instead. See issue #1076 for more information.

Slices this matrix starting at its component (irow, icol) and with (nrows, ncols) consecutive elements.

source

pub fn view( &self, start: (usize, usize), shape: (usize, usize), ) -> Matrix<T, Dyn, Dyn, ViewStorage<'_, T, Dyn, Dyn, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

Return a view of this matrix starting at its component (irow, icol) and with (nrows, ncols) consecutive elements.

source

pub fn slice_with_steps( &self, start: (usize, usize), shape: (usize, usize), steps: (usize, usize), ) -> Matrix<T, Dyn, Dyn, ViewStorage<'_, T, Dyn, Dyn, Dyn, Dyn>>

👎Deprecated: Use view_with_steps instead. See issue #1076 for more information.

Slices this matrix starting at its component (start.0, start.1) and with (shape.0, shape.1) components. Each row (resp. column) of the sliced matrix is separated by steps.0 (resp. steps.1) ignored rows (resp. columns) of the original matrix.

source

pub fn view_with_steps( &self, start: (usize, usize), shape: (usize, usize), steps: (usize, usize), ) -> Matrix<T, Dyn, Dyn, ViewStorage<'_, T, Dyn, Dyn, Dyn, Dyn>>

Return a view of this matrix starting at its component (start.0, start.1) and with (shape.0, shape.1) components. Each row (resp. column) of the matrix view is separated by steps.0 (resp. steps.1) ignored rows (resp. columns) of the original matrix.

source

pub fn fixed_slice<const RVIEW: usize, const CVIEW: usize>( &self, irow: usize, icol: usize, ) -> Matrix<T, Const<RVIEW>, Const<CVIEW>, ViewStorage<'_, T, Const<RVIEW>, Const<CVIEW>, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

👎Deprecated: Use fixed_view instead. See issue #1076 for more information.

Slices this matrix starting at its component (irow, icol) and with (R::dim(), CView::dim()) consecutive components.

source

pub fn fixed_view<const RVIEW: usize, const CVIEW: usize>( &self, irow: usize, icol: usize, ) -> Matrix<T, Const<RVIEW>, Const<CVIEW>, ViewStorage<'_, T, Const<RVIEW>, Const<CVIEW>, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

Return a view of this matrix starting at its component (irow, icol) and with (R::dim(), CView::dim()) consecutive components.

source

pub fn fixed_slice_with_steps<const RVIEW: usize, const CVIEW: usize>( &self, start: (usize, usize), steps: (usize, usize), ) -> Matrix<T, Const<RVIEW>, Const<CVIEW>, ViewStorage<'_, T, Const<RVIEW>, Const<CVIEW>, Dyn, Dyn>>

👎Deprecated: Use fixed_view_with_steps instead. See issue #1076 for more information.

Slices this matrix starting at its component (start.0, start.1) and with (RVIEW, CVIEW) components. Each row (resp. column) of the sliced matrix is separated by steps.0 (resp. steps.1) ignored rows (resp. columns) of the original matrix.

source

pub fn fixed_view_with_steps<const RVIEW: usize, const CVIEW: usize>( &self, start: (usize, usize), steps: (usize, usize), ) -> Matrix<T, Const<RVIEW>, Const<CVIEW>, ViewStorage<'_, T, Const<RVIEW>, Const<CVIEW>, Dyn, Dyn>>

Returns a view of this matrix starting at its component (start.0, start.1) and with (RVIEW, CVIEW) components. Each row (resp. column) of the matrix view is separated by steps.0 (resp. steps.1) ignored rows (resp. columns) of the original matrix.

source

pub fn generic_slice<RView, CView>( &self, start: (usize, usize), shape: (RView, CView), ) -> Matrix<T, RView, CView, ViewStorage<'_, T, RView, CView, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>
where RView: Dim, CView: Dim,

👎Deprecated: Use generic_view instead. See issue #1076 for more information.

Creates a slice that may or may not have a fixed size and stride.

source

pub fn generic_view<RView, CView>( &self, start: (usize, usize), shape: (RView, CView), ) -> Matrix<T, RView, CView, ViewStorage<'_, T, RView, CView, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>
where RView: Dim, CView: Dim,

Creates a matrix view that may or may not have a fixed size and stride.

source

pub fn generic_slice_with_steps<RView, CView>( &self, start: (usize, usize), shape: (RView, CView), steps: (usize, usize), ) -> Matrix<T, RView, CView, ViewStorage<'_, T, RView, CView, Dyn, Dyn>>
where RView: Dim, CView: Dim,

👎Deprecated: Use generic_view_with_steps instead. See issue #1076 for more information.

Creates a slice that may or may not have a fixed size and stride.

source

pub fn generic_view_with_steps<RView, CView>( &self, start: (usize, usize), shape: (RView, CView), steps: (usize, usize), ) -> Matrix<T, RView, CView, ViewStorage<'_, T, RView, CView, Dyn, Dyn>>
where RView: Dim, CView: Dim,

Creates a matrix view that may or may not have a fixed size and stride.

source

pub fn rows_range_pair<Range1, Range2>( &self, r1: Range1, r2: Range2, ) -> (Matrix<T, <Range1 as DimRange<R>>::Size, C, ViewStorage<'_, T, <Range1 as DimRange<R>>::Size, C, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>, Matrix<T, <Range2 as DimRange<R>>::Size, C, ViewStorage<'_, T, <Range2 as DimRange<R>>::Size, C, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>)
where Range1: DimRange<R>, Range2: DimRange<R>,

Splits this NxM matrix into two parts delimited by two ranges.

Panics if the ranges overlap or if the first range is empty.

source

pub fn columns_range_pair<Range1, Range2>( &self, r1: Range1, r2: Range2, ) -> (Matrix<T, R, <Range1 as DimRange<C>>::Size, ViewStorage<'_, T, R, <Range1 as DimRange<C>>::Size, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>, Matrix<T, R, <Range2 as DimRange<C>>::Size, ViewStorage<'_, T, R, <Range2 as DimRange<C>>::Size, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>)
where Range1: DimRange<C>, Range2: DimRange<C>,

Splits this NxM matrix into two parts delimited by two ranges.

Panics if the ranges overlap or if the first range is empty.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where R: Dim, C: Dim, S: RawStorageMut<T, R, C>,

§Mutable views based on index and length

source

pub fn row_mut( &mut self, i: usize, ) -> Matrix<T, Const<1>, C, ViewStorageMut<'_, T, Const<1>, C, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

Returns a view containing the i-th row of this matrix.

source

pub fn row_part_mut( &mut self, i: usize, n: usize, ) -> Matrix<T, Const<1>, Dyn, ViewStorageMut<'_, T, Const<1>, Dyn, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

Returns a view containing the n first elements of the i-th row of this matrix.

source

pub fn rows_mut( &mut self, first_row: usize, nrows: usize, ) -> Matrix<T, Dyn, C, ViewStorageMut<'_, T, Dyn, C, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

Extracts from this matrix a set of consecutive rows.

source

pub fn rows_with_step_mut( &mut self, first_row: usize, nrows: usize, step: usize, ) -> Matrix<T, Dyn, C, ViewStorageMut<'_, T, Dyn, C, Dyn, <S as RawStorage<T, R, C>>::CStride>>

Extracts from this matrix a set of consecutive rows regularly skipping step rows.

source

pub fn fixed_rows_mut<const RVIEW: usize>( &mut self, first_row: usize, ) -> Matrix<T, Const<RVIEW>, C, ViewStorageMut<'_, T, Const<RVIEW>, C, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

Extracts a compile-time number of consecutive rows from this matrix.

source

pub fn fixed_rows_with_step_mut<const RVIEW: usize>( &mut self, first_row: usize, step: usize, ) -> Matrix<T, Const<RVIEW>, C, ViewStorageMut<'_, T, Const<RVIEW>, C, Dyn, <S as RawStorage<T, R, C>>::CStride>>

Extracts from this matrix a compile-time number of rows regularly skipping step rows.

source

pub fn rows_generic_mut<RView>( &mut self, row_start: usize, nrows: RView, ) -> Matrix<T, RView, C, ViewStorageMut<'_, T, RView, C, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>
where RView: Dim,

Extracts from this matrix nrows rows regularly skipping step rows. Both argument may or may not be values known at compile-time.

source

pub fn rows_generic_with_step_mut<RView>( &mut self, row_start: usize, nrows: RView, step: usize, ) -> Matrix<T, RView, C, ViewStorageMut<'_, T, RView, C, Dyn, <S as RawStorage<T, R, C>>::CStride>>
where RView: Dim,

Extracts from this matrix nrows rows regularly skipping step rows. Both argument may or may not be values known at compile-time.

source

pub fn column_mut( &mut self, i: usize, ) -> Matrix<T, R, Const<1>, ViewStorageMut<'_, T, R, Const<1>, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

Returns a view containing the i-th column of this matrix.

source

pub fn column_part_mut( &mut self, i: usize, n: usize, ) -> Matrix<T, Dyn, Const<1>, ViewStorageMut<'_, T, Dyn, Const<1>, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

Returns a view containing the n first elements of the i-th column of this matrix.

source

pub fn columns_mut( &mut self, first_col: usize, ncols: usize, ) -> Matrix<T, R, Dyn, ViewStorageMut<'_, T, R, Dyn, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

Extracts from this matrix a set of consecutive columns.

source

pub fn columns_with_step_mut( &mut self, first_col: usize, ncols: usize, step: usize, ) -> Matrix<T, R, Dyn, ViewStorageMut<'_, T, R, Dyn, <S as RawStorage<T, R, C>>::RStride, Dyn>>

Extracts from this matrix a set of consecutive columns regularly skipping step columns.

source

pub fn fixed_columns_mut<const CVIEW: usize>( &mut self, first_col: usize, ) -> Matrix<T, R, Const<CVIEW>, ViewStorageMut<'_, T, R, Const<CVIEW>, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

Extracts a compile-time number of consecutive columns from this matrix.

source

pub fn fixed_columns_with_step_mut<const CVIEW: usize>( &mut self, first_col: usize, step: usize, ) -> Matrix<T, R, Const<CVIEW>, ViewStorageMut<'_, T, R, Const<CVIEW>, <S as RawStorage<T, R, C>>::RStride, Dyn>>

Extracts from this matrix a compile-time number of columns regularly skipping step columns.

source

pub fn columns_generic_mut<CView>( &mut self, first_col: usize, ncols: CView, ) -> Matrix<T, R, CView, ViewStorageMut<'_, T, R, CView, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>
where CView: Dim,

Extracts from this matrix ncols columns. The number of columns may or may not be known at compile-time.

source

pub fn columns_generic_with_step_mut<CView>( &mut self, first_col: usize, ncols: CView, step: usize, ) -> Matrix<T, R, CView, ViewStorageMut<'_, T, R, CView, <S as RawStorage<T, R, C>>::RStride, Dyn>>
where CView: Dim,

Extracts from this matrix ncols columns skipping step columns. Both argument may or may not be values known at compile-time.

source

pub fn slice_mut( &mut self, start: (usize, usize), shape: (usize, usize), ) -> Matrix<T, Dyn, Dyn, ViewStorageMut<'_, T, Dyn, Dyn, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

👎Deprecated: Use view_mut instead. See issue #1076 for more information.

Slices this matrix starting at its component (irow, icol) and with (nrows, ncols) consecutive elements.

source

pub fn view_mut( &mut self, start: (usize, usize), shape: (usize, usize), ) -> Matrix<T, Dyn, Dyn, ViewStorageMut<'_, T, Dyn, Dyn, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

Return a view of this matrix starting at its component (irow, icol) and with (nrows, ncols) consecutive elements.

source

pub fn slice_with_steps_mut( &mut self, start: (usize, usize), shape: (usize, usize), steps: (usize, usize), ) -> Matrix<T, Dyn, Dyn, ViewStorageMut<'_, T, Dyn, Dyn, Dyn, Dyn>>

👎Deprecated: Use view_with_steps_mut instead. See issue #1076 for more information.

Slices this matrix starting at its component (start.0, start.1) and with (shape.0, shape.1) components. Each row (resp. column) of the sliced matrix is separated by steps.0 (resp. steps.1) ignored rows (resp. columns) of the original matrix.

source

pub fn view_with_steps_mut( &mut self, start: (usize, usize), shape: (usize, usize), steps: (usize, usize), ) -> Matrix<T, Dyn, Dyn, ViewStorageMut<'_, T, Dyn, Dyn, Dyn, Dyn>>

Return a view of this matrix starting at its component (start.0, start.1) and with (shape.0, shape.1) components. Each row (resp. column) of the matrix view is separated by steps.0 (resp. steps.1) ignored rows (resp. columns) of the original matrix.

source

pub fn fixed_slice_mut<const RVIEW: usize, const CVIEW: usize>( &mut self, irow: usize, icol: usize, ) -> Matrix<T, Const<RVIEW>, Const<CVIEW>, ViewStorageMut<'_, T, Const<RVIEW>, Const<CVIEW>, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

👎Deprecated: Use fixed_view_mut instead. See issue #1076 for more information.

Slices this matrix starting at its component (irow, icol) and with (R::dim(), CView::dim()) consecutive components.

source

pub fn fixed_view_mut<const RVIEW: usize, const CVIEW: usize>( &mut self, irow: usize, icol: usize, ) -> Matrix<T, Const<RVIEW>, Const<CVIEW>, ViewStorageMut<'_, T, Const<RVIEW>, Const<CVIEW>, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>

Return a view of this matrix starting at its component (irow, icol) and with (R::dim(), CView::dim()) consecutive components.

source

pub fn fixed_slice_with_steps_mut<const RVIEW: usize, const CVIEW: usize>( &mut self, start: (usize, usize), steps: (usize, usize), ) -> Matrix<T, Const<RVIEW>, Const<CVIEW>, ViewStorageMut<'_, T, Const<RVIEW>, Const<CVIEW>, Dyn, Dyn>>

👎Deprecated: Use fixed_view_with_steps_mut instead. See issue #1076 for more information.

Slices this matrix starting at its component (start.0, start.1) and with (RVIEW, CVIEW) components. Each row (resp. column) of the sliced matrix is separated by steps.0 (resp. steps.1) ignored rows (resp. columns) of the original matrix.

source

pub fn fixed_view_with_steps_mut<const RVIEW: usize, const CVIEW: usize>( &mut self, start: (usize, usize), steps: (usize, usize), ) -> Matrix<T, Const<RVIEW>, Const<CVIEW>, ViewStorageMut<'_, T, Const<RVIEW>, Const<CVIEW>, Dyn, Dyn>>

Returns a view of this matrix starting at its component (start.0, start.1) and with (RVIEW, CVIEW) components. Each row (resp. column) of the matrix view is separated by steps.0 (resp. steps.1) ignored rows (resp. columns) of the original matrix.

source

pub fn generic_slice_mut<RView, CView>( &mut self, start: (usize, usize), shape: (RView, CView), ) -> Matrix<T, RView, CView, ViewStorageMut<'_, T, RView, CView, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>
where RView: Dim, CView: Dim,

👎Deprecated: Use generic_view_mut instead. See issue #1076 for more information.

Creates a slice that may or may not have a fixed size and stride.

source

pub fn generic_view_mut<RView, CView>( &mut self, start: (usize, usize), shape: (RView, CView), ) -> Matrix<T, RView, CView, ViewStorageMut<'_, T, RView, CView, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>
where RView: Dim, CView: Dim,

Creates a matrix view that may or may not have a fixed size and stride.

source

pub fn generic_slice_with_steps_mut<RView, CView>( &mut self, start: (usize, usize), shape: (RView, CView), steps: (usize, usize), ) -> Matrix<T, RView, CView, ViewStorageMut<'_, T, RView, CView, Dyn, Dyn>>
where RView: Dim, CView: Dim,

👎Deprecated: Use generic_view_with_steps_mut instead. See issue #1076 for more information.

Creates a slice that may or may not have a fixed size and stride.

source

pub fn generic_view_with_steps_mut<RView, CView>( &mut self, start: (usize, usize), shape: (RView, CView), steps: (usize, usize), ) -> Matrix<T, RView, CView, ViewStorageMut<'_, T, RView, CView, Dyn, Dyn>>
where RView: Dim, CView: Dim,

Creates a matrix view that may or may not have a fixed size and stride.

source

pub fn rows_range_pair_mut<Range1, Range2>( &mut self, r1: Range1, r2: Range2, ) -> (Matrix<T, <Range1 as DimRange<R>>::Size, C, ViewStorageMut<'_, T, <Range1 as DimRange<R>>::Size, C, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>, Matrix<T, <Range2 as DimRange<R>>::Size, C, ViewStorageMut<'_, T, <Range2 as DimRange<R>>::Size, C, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>)
where Range1: DimRange<R>, Range2: DimRange<R>,

Splits this NxM matrix into two parts delimited by two ranges.

Panics if the ranges overlap or if the first range is empty.

source

pub fn columns_range_pair_mut<Range1, Range2>( &mut self, r1: Range1, r2: Range2, ) -> (Matrix<T, R, <Range1 as DimRange<C>>::Size, ViewStorageMut<'_, T, R, <Range1 as DimRange<C>>::Size, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>, Matrix<T, R, <Range2 as DimRange<C>>::Size, ViewStorageMut<'_, T, R, <Range2 as DimRange<C>>::Size, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>)
where Range1: DimRange<C>, Range2: DimRange<C>,

Splits this NxM matrix into two parts delimited by two ranges.

Panics if the ranges overlap or if the first range is empty.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where R: Dim, C: Dim, S: RawStorage<T, R, C>,

source

pub fn slice_range<RowRange, ColRange>( &self, rows: RowRange, cols: ColRange, ) -> Matrix<T, <RowRange as DimRange<R>>::Size, <ColRange as DimRange<C>>::Size, ViewStorage<'_, T, <RowRange as DimRange<R>>::Size, <ColRange as DimRange<C>>::Size, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>
where RowRange: DimRange<R>, ColRange: DimRange<C>,

👎Deprecated: Use view_range instead. See issue #1076 for more information.

Slices a sub-matrix containing the rows indexed by the range rows and the columns indexed by the range cols.

source

pub fn view_range<RowRange, ColRange>( &self, rows: RowRange, cols: ColRange, ) -> Matrix<T, <RowRange as DimRange<R>>::Size, <ColRange as DimRange<C>>::Size, ViewStorage<'_, T, <RowRange as DimRange<R>>::Size, <ColRange as DimRange<C>>::Size, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>
where RowRange: DimRange<R>, ColRange: DimRange<C>,

Returns a view containing the rows indexed by the range rows and the columns indexed by the range cols.

source

pub fn rows_range<RowRange>( &self, rows: RowRange, ) -> Matrix<T, <RowRange as DimRange<R>>::Size, C, ViewStorage<'_, T, <RowRange as DimRange<R>>::Size, C, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>
where RowRange: DimRange<R>,

View containing all the rows indexed by the range rows.

source

pub fn columns_range<ColRange>( &self, cols: ColRange, ) -> Matrix<T, R, <ColRange as DimRange<C>>::Size, ViewStorage<'_, T, R, <ColRange as DimRange<C>>::Size, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>
where ColRange: DimRange<C>,

View containing all the columns indexed by the range rows.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where R: Dim, C: Dim, S: RawStorageMut<T, R, C>,

source

pub fn slice_range_mut<RowRange, ColRange>( &mut self, rows: RowRange, cols: ColRange, ) -> Matrix<T, <RowRange as DimRange<R>>::Size, <ColRange as DimRange<C>>::Size, ViewStorageMut<'_, T, <RowRange as DimRange<R>>::Size, <ColRange as DimRange<C>>::Size, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>
where RowRange: DimRange<R>, ColRange: DimRange<C>,

👎Deprecated: Use view_range_mut instead. See issue #1076 for more information.

Slices a mutable sub-matrix containing the rows indexed by the range rows and the columns indexed by the range cols.

source

pub fn view_range_mut<RowRange, ColRange>( &mut self, rows: RowRange, cols: ColRange, ) -> Matrix<T, <RowRange as DimRange<R>>::Size, <ColRange as DimRange<C>>::Size, ViewStorageMut<'_, T, <RowRange as DimRange<R>>::Size, <ColRange as DimRange<C>>::Size, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>
where RowRange: DimRange<R>, ColRange: DimRange<C>,

Return a mutable view containing the rows indexed by the range rows and the columns indexed by the range cols.

source

pub fn rows_range_mut<RowRange>( &mut self, rows: RowRange, ) -> Matrix<T, <RowRange as DimRange<R>>::Size, C, ViewStorageMut<'_, T, <RowRange as DimRange<R>>::Size, C, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>
where RowRange: DimRange<R>,

Mutable view containing all the rows indexed by the range rows.

source

pub fn columns_range_mut<ColRange>( &mut self, cols: ColRange, ) -> Matrix<T, R, <ColRange as DimRange<C>>::Size, ViewStorageMut<'_, T, R, <ColRange as DimRange<C>>::Size, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>
where ColRange: DimRange<C>,

Mutable view containing all the columns indexed by the range cols.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where R: Dim, C: Dim, S: RawStorage<T, R, C>,

source

pub fn as_view<RView, CView, RViewStride, CViewStride>( &self, ) -> Matrix<T, RView, CView, ViewStorage<'_, T, RView, CView, RViewStride, CViewStride>>
where RView: Dim, CView: Dim, RViewStride: Dim, CViewStride: Dim, ShapeConstraint: DimEq<R, RView> + DimEq<C, CView> + DimEq<RViewStride, <S as RawStorage<T, R, C>>::RStride> + DimEq<CViewStride, <S as RawStorage<T, R, C>>::CStride>,

Returns this matrix as a view.

The returned view type is generally ambiguous unless specified. This is particularly useful when working with functions or methods that take matrix views as input.

§Panics

Panics if the dimensions of the view and the matrix are not compatible and this cannot be proven at compile-time. This might happen, for example, when constructing a static view of size 3x3 from a dynamically sized matrix of dimension 5x5.

§Examples
use nalgebra::{DMatrixSlice, SMatrixView};

fn consume_view(_: DMatrixSlice<f64>) {}

let matrix = nalgebra::Matrix3::zeros();
consume_view(matrix.as_view());

let dynamic_view: DMatrixSlice<f64> = matrix.as_view();
let static_view_from_dyn: SMatrixView<f64, 3, 3> = dynamic_view.as_view();
source§

impl<T, R, C, S> Matrix<T, R, C, S>
where R: Dim, C: Dim, S: RawStorageMut<T, R, C>,

source

pub fn as_view_mut<RView, CView, RViewStride, CViewStride>( &mut self, ) -> Matrix<T, RView, CView, ViewStorageMut<'_, T, RView, CView, RViewStride, CViewStride>>
where RView: Dim, CView: Dim, RViewStride: Dim, CViewStride: Dim, ShapeConstraint: DimEq<R, RView> + DimEq<C, CView> + DimEq<RViewStride, <S as RawStorage<T, R, C>>::RStride> + DimEq<CViewStride, <S as RawStorage<T, R, C>>::CStride>,

Returns this matrix as a mutable view.

The returned view type is generally ambiguous unless specified. This is particularly useful when working with functions or methods that take matrix views as input.

§Panics

Panics if the dimensions of the view and the matrix are not compatible and this cannot be proven at compile-time. This might happen, for example, when constructing a static view of size 3x3 from a dynamically sized matrix of dimension 5x5.

§Examples
use nalgebra::{DMatrixViewMut, SMatrixViewMut};

fn consume_view(_: DMatrixViewMut<f64>) {}

let mut matrix = nalgebra::Matrix3::zeros();
consume_view(matrix.as_view_mut());

let mut dynamic_view: DMatrixViewMut<f64> = matrix.as_view_mut();
let static_view_from_dyn: SMatrixViewMut<f64, 3, 3> = dynamic_view.as_view_mut();
source§

impl<T, R, C, S> Matrix<T, R, C, S>
where T: Scalar, R: Dim, C: Dim, S: Storage<T, R, C>,

§Magnitude and norms

source

pub fn norm_squared(&self) -> <T as SimdComplexField>::SimdRealField

The squared L2 norm of this vector.

source

pub fn norm(&self) -> <T as SimdComplexField>::SimdRealField

The L2 norm of this matrix.

Use .apply_norm to apply a custom norm.

source

pub fn metric_distance<R2, C2, S2>( &self, rhs: &Matrix<T, R2, C2, S2>, ) -> <T as SimdComplexField>::SimdRealField
where T: SimdComplexField, R2: Dim, C2: Dim, S2: Storage<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R, R2> + SameNumberOfColumns<C, C2>,

Compute the distance between self and rhs using the metric induced by the euclidean norm.

Use .apply_metric_distance to apply a custom norm.

source

pub fn apply_norm( &self, norm: &impl Norm<T>, ) -> <T as SimdComplexField>::SimdRealField

Uses the given norm to compute the norm of self.

§Example

let v = Vector3::new(1.0, 2.0, 3.0);
assert_eq!(v.apply_norm(&UniformNorm), 3.0);
assert_eq!(v.apply_norm(&LpNorm(1)), 6.0);
assert_eq!(v.apply_norm(&EuclideanNorm), v.norm());
source

pub fn apply_metric_distance<R2, C2, S2>( &self, rhs: &Matrix<T, R2, C2, S2>, norm: &impl Norm<T>, ) -> <T as SimdComplexField>::SimdRealField
where T: SimdComplexField, R2: Dim, C2: Dim, S2: Storage<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R, R2> + SameNumberOfColumns<C, C2>,

Uses the metric induced by the given norm to compute the metric distance between self and rhs.

§Example

let v1 = Vector3::new(1.0, 2.0, 3.0);
let v2 = Vector3::new(10.0, 20.0, 30.0);

assert_eq!(v1.apply_metric_distance(&v2, &UniformNorm), 27.0);
assert_eq!(v1.apply_metric_distance(&v2, &LpNorm(1)), 27.0 + 18.0 + 9.0);
assert_eq!(v1.apply_metric_distance(&v2, &EuclideanNorm), (v1 - v2).norm());
source

pub fn magnitude(&self) -> <T as SimdComplexField>::SimdRealField

A synonym for the norm of this matrix.

Aka the length.

This function is simply implemented as a call to norm()

source

pub fn magnitude_squared(&self) -> <T as SimdComplexField>::SimdRealField

A synonym for the squared norm of this matrix.

Aka the squared length.

This function is simply implemented as a call to norm_squared()

source

pub fn set_magnitude( &mut self, magnitude: <T as SimdComplexField>::SimdRealField, )
where T: SimdComplexField, S: StorageMut<T, R, C>,

Sets the magnitude of this vector.

source

pub fn normalize( &self, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

Returns a normalized version of this matrix.

source

pub fn lp_norm(&self, p: i32) -> <T as SimdComplexField>::SimdRealField

The Lp norm of this matrix.

source

pub fn simd_try_normalize( &self, min_norm: <T as SimdComplexField>::SimdRealField, ) -> SimdOption<Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>>

Attempts to normalize self.

The components of this matrix can be SIMD types.

source

pub fn try_set_magnitude( &mut self, magnitude: <T as ComplexField>::RealField, min_magnitude: <T as ComplexField>::RealField, )
where T: ComplexField, S: StorageMut<T, R, C>,

Sets the magnitude of this vector unless it is smaller than min_magnitude.

If self.magnitude() is smaller than min_magnitude, it will be left unchanged. Otherwise this is equivalent to: `*self = self.normalize() * magnitude.

source

pub fn cap_magnitude( &self, max: <T as ComplexField>::RealField, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

Returns a new vector with the same magnitude as self clamped between 0.0 and max.

source

pub fn simd_cap_magnitude( &self, max: <T as SimdComplexField>::SimdRealField, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

Returns a new vector with the same magnitude as self clamped between 0.0 and max.

source

pub fn try_normalize( &self, min_norm: <T as ComplexField>::RealField, ) -> Option<Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>>

Returns a normalized version of this matrix unless its norm as smaller or equal to eps.

The components of this matrix cannot be SIMD types (see simd_try_normalize) instead.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where T: Scalar, R: Dim, C: Dim, S: StorageMut<T, R, C>,

§In-place normalization

source

pub fn normalize_mut(&mut self) -> <T as SimdComplexField>::SimdRealField

Normalizes this matrix in-place and returns its norm.

The components of the matrix cannot be SIMD types (see simd_try_normalize_mut instead).

source

pub fn simd_try_normalize_mut( &mut self, min_norm: <T as SimdComplexField>::SimdRealField, ) -> SimdOption<<T as SimdComplexField>::SimdRealField>

Normalizes this matrix in-place and return its norm.

The components of the matrix can be SIMD types.

source

pub fn try_normalize_mut( &mut self, min_norm: <T as ComplexField>::RealField, ) -> Option<<T as ComplexField>::RealField>
where T: ComplexField,

Normalizes this matrix in-place or does nothing if its norm is smaller or equal to eps.

If the normalization succeeded, returns the old norm of this matrix.

source§

impl<T, D> Matrix<T, D, Const<1>, <DefaultAllocator as Allocator<T, D>>::Buffer>

§Basis and orthogonalization

source

pub fn orthonormalize( vs: &mut [Matrix<T, D, Const<1>, <DefaultAllocator as Allocator<T, D>>::Buffer>], ) -> usize

Orthonormalizes the given family of vectors. The largest free family of vectors is moved at the beginning of the array and its size is returned. Vectors at an indices larger or equal to this length can be modified to an arbitrary value.

source

pub fn orthonormal_subspace_basis<F>( vs: &[Matrix<T, D, Const<1>, <DefaultAllocator as Allocator<T, D>>::Buffer>], f: F, )
where F: FnMut(&Matrix<T, D, Const<1>, <DefaultAllocator as Allocator<T, D>>::Buffer>) -> bool,

Applies the given closure to each element of the orthonormal basis of the subspace orthogonal to free family of vectors vs. If vs is not a free family, the result is unspecified.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where R: Dim, C: Dim, S: RawStorage<T, R, C>,

source

pub fn len(&self) -> usize

The total number of elements of this matrix.

§Examples:
let mat = Matrix3x4::<f32>::zeros();
assert_eq!(mat.len(), 12);
source

pub fn is_empty(&self) -> bool

Returns true if the matrix contains no elements.

§Examples:
let mat = Matrix3x4::<f32>::zeros();
assert!(!mat.is_empty());
source

pub fn is_square(&self) -> bool

Indicates if this is a square matrix.

source

pub fn is_identity(&self, eps: <T as AbsDiffEq>::Epsilon) -> bool
where T: Zero + One + RelativeEq, <T as AbsDiffEq>::Epsilon: Clone,

Indicated if this is the identity matrix within a relative error of eps.

If the matrix is diagonal, this checks that diagonal elements (i.e. at coordinates (i, i) for i from 0 to min(R, C)) are equal one; and that all other elements are zero.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where T: ComplexField, R: Dim, C: Dim, S: Storage<T, R, C>,

source

pub fn is_orthogonal(&self, eps: <T as AbsDiffEq>::Epsilon) -> bool
where T: Zero + One + ClosedAdd + ClosedMul + RelativeEq, S: Storage<T, R, C>, <T as AbsDiffEq>::Epsilon: Clone, DefaultAllocator: Allocator<T, R, C> + Allocator<T, C, C>,

Checks that Mᵀ × M = Id.

In this definition Id is approximately equal to the identity matrix with a relative error equal to eps.

source§

impl<T, D, S> Matrix<T, D, D, S>
where T: RealField, D: Dim, S: Storage<T, D, D>, DefaultAllocator: Allocator<T, D, D>,

source

pub fn is_special_orthogonal(&self, eps: T) -> bool
where D: DimMin<D, Output = D>, DefaultAllocator: Allocator<(usize, usize), D>,

Checks that this matrix is orthogonal and has a determinant equal to 1.

source

pub fn is_invertible(&self) -> bool

Returns true if this matrix is invertible.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where T: Scalar, R: Dim, C: Dim, S: RawStorage<T, R, C>,

§Folding on columns and rows

source

pub fn compress_rows( &self, f: impl Fn(Matrix<T, R, Const<1>, ViewStorage<'_, T, R, Const<1>, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>) -> T, ) -> Matrix<T, Const<1>, C, <DefaultAllocator as Allocator<T, Const<1>, C>>::Buffer>
where DefaultAllocator: Allocator<T, Const<1>, C>,

Returns a row vector where each element is the result of the application of f on the corresponding column of the original matrix.

source

pub fn compress_rows_tr( &self, f: impl Fn(Matrix<T, R, Const<1>, ViewStorage<'_, T, R, Const<1>, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>) -> T, ) -> Matrix<T, C, Const<1>, <DefaultAllocator as Allocator<T, C>>::Buffer>

Returns a column vector where each element is the result of the application of f on the corresponding column of the original matrix.

This is the same as self.compress_rows(f).transpose().

source

pub fn compress_columns( &self, init: Matrix<T, R, Const<1>, <DefaultAllocator as Allocator<T, R>>::Buffer>, f: impl Fn(&mut Matrix<T, R, Const<1>, <DefaultAllocator as Allocator<T, R>>::Buffer>, Matrix<T, R, Const<1>, ViewStorage<'_, T, R, Const<1>, <S as RawStorage<T, R, C>>::RStride, <S as RawStorage<T, R, C>>::CStride>>), ) -> Matrix<T, R, Const<1>, <DefaultAllocator as Allocator<T, R>>::Buffer>

Returns a column vector resulting from the folding of f on each column of this matrix.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where T: Scalar, R: Dim, C: Dim, S: RawStorage<T, R, C>,

§Common statistics operations

source

pub fn sum(&self) -> T
where T: ClosedAdd + Zero,

The sum of all the elements of this matrix.

§Example

let m = Matrix2x3::new(1.0, 2.0, 3.0,
                       4.0, 5.0, 6.0);
assert_eq!(m.sum(), 21.0);
source

pub fn row_sum( &self, ) -> Matrix<T, Const<1>, C, <DefaultAllocator as Allocator<T, Const<1>, C>>::Buffer>

The sum of all the rows of this matrix.

Use .row_sum_tr if you need the result in a column vector instead.

§Example

let m = Matrix2x3::new(1.0, 2.0, 3.0,
                       4.0, 5.0, 6.0);
assert_eq!(m.row_sum(), RowVector3::new(5.0, 7.0, 9.0));

let mint = Matrix3x2::new(1, 2,
                          3, 4,
                          5, 6);
assert_eq!(mint.row_sum(), RowVector2::new(9,12));
source

pub fn row_sum_tr( &self, ) -> Matrix<T, C, Const<1>, <DefaultAllocator as Allocator<T, C>>::Buffer>

The sum of all the rows of this matrix. The result is transposed and returned as a column vector.

§Example

let m = Matrix2x3::new(1.0, 2.0, 3.0,
                       4.0, 5.0, 6.0);
assert_eq!(m.row_sum_tr(), Vector3::new(5.0, 7.0, 9.0));

let mint = Matrix3x2::new(1, 2,
                          3, 4,
                          5, 6);
assert_eq!(mint.row_sum_tr(), Vector2::new(9, 12));
source

pub fn column_sum( &self, ) -> Matrix<T, R, Const<1>, <DefaultAllocator as Allocator<T, R>>::Buffer>

The sum of all the columns of this matrix.

§Example

let m = Matrix2x3::new(1.0, 2.0, 3.0,
                       4.0, 5.0, 6.0);
assert_eq!(m.column_sum(), Vector2::new(6.0, 15.0));

let mint = Matrix3x2::new(1, 2,
                          3, 4,
                          5, 6);
assert_eq!(mint.column_sum(), Vector3::new(3, 7, 11));
source

pub fn product(&self) -> T
where T: ClosedMul + One,

The product of all the elements of this matrix.

§Example

let m = Matrix2x3::new(1.0, 2.0, 3.0,
                       4.0, 5.0, 6.0);
assert_eq!(m.product(), 720.0);
source

pub fn row_product( &self, ) -> Matrix<T, Const<1>, C, <DefaultAllocator as Allocator<T, Const<1>, C>>::Buffer>
where T: ClosedMul + One, DefaultAllocator: Allocator<T, Const<1>, C>,

The product of all the rows of this matrix.

Use .row_sum_tr if you need the result in a column vector instead.

§Example

let m = Matrix2x3::new(1.0, 2.0, 3.0,
                       4.0, 5.0, 6.0);
assert_eq!(m.row_product(), RowVector3::new(4.0, 10.0, 18.0));

let mint = Matrix3x2::new(1, 2,
                          3, 4,
                          5, 6);
assert_eq!(mint.row_product(), RowVector2::new(15, 48));
source

pub fn row_product_tr( &self, ) -> Matrix<T, C, Const<1>, <DefaultAllocator as Allocator<T, C>>::Buffer>

The product of all the rows of this matrix. The result is transposed and returned as a column vector.

§Example

let m = Matrix2x3::new(1.0, 2.0, 3.0,
                       4.0, 5.0, 6.0);
assert_eq!(m.row_product_tr(), Vector3::new(4.0, 10.0, 18.0));

let mint = Matrix3x2::new(1, 2,
                          3, 4,
                          5, 6);
assert_eq!(mint.row_product_tr(), Vector2::new(15, 48));
source

pub fn column_product( &self, ) -> Matrix<T, R, Const<1>, <DefaultAllocator as Allocator<T, R>>::Buffer>

The product of all the columns of this matrix.

§Example

let m = Matrix2x3::new(1.0, 2.0, 3.0,
                       4.0, 5.0, 6.0);
assert_eq!(m.column_product(), Vector2::new(6.0, 120.0));

let mint = Matrix3x2::new(1, 2,
                          3, 4,
                          5, 6);
assert_eq!(mint.column_product(), Vector3::new(2, 12, 30));
source

pub fn variance(&self) -> T
where T: Field + SupersetOf<f64>,

The variance of all the elements of this matrix.

§Example

let m = Matrix2x3::new(1.0, 2.0, 3.0,
                       4.0, 5.0, 6.0);
assert_relative_eq!(m.variance(), 35.0 / 12.0, epsilon = 1.0e-8);
source

pub fn row_variance( &self, ) -> Matrix<T, Const<1>, C, <DefaultAllocator as Allocator<T, Const<1>, C>>::Buffer>
where T: Field + SupersetOf<f64>, DefaultAllocator: Allocator<T, Const<1>, C>,

The variance of all the rows of this matrix.

Use .row_variance_tr if you need the result in a column vector instead.

§Example

let m = Matrix2x3::new(1.0, 2.0, 3.0,
                       4.0, 5.0, 6.0);
assert_eq!(m.row_variance(), RowVector3::new(2.25, 2.25, 2.25));
source

pub fn row_variance_tr( &self, ) -> Matrix<T, C, Const<1>, <DefaultAllocator as Allocator<T, C>>::Buffer>
where T: Field + SupersetOf<f64>, DefaultAllocator: Allocator<T, C>,

The variance of all the rows of this matrix. The result is transposed and returned as a column vector.

§Example

let m = Matrix2x3::new(1.0, 2.0, 3.0,
                       4.0, 5.0, 6.0);
assert_eq!(m.row_variance_tr(), Vector3::new(2.25, 2.25, 2.25));
source

pub fn column_variance( &self, ) -> Matrix<T, R, Const<1>, <DefaultAllocator as Allocator<T, R>>::Buffer>
where T: Field + SupersetOf<f64>, DefaultAllocator: Allocator<T, R>,

The variance of all the columns of this matrix.

§Example

let m = Matrix2x3::new(1.0, 2.0, 3.0,
                       4.0, 5.0, 6.0);
assert_relative_eq!(m.column_variance(), Vector2::new(2.0 / 3.0, 2.0 / 3.0), epsilon = 1.0e-8);
source

pub fn mean(&self) -> T
where T: Field + SupersetOf<f64>,

The mean of all the elements of this matrix.

§Example

let m = Matrix2x3::new(1.0, 2.0, 3.0,
                       4.0, 5.0, 6.0);
assert_eq!(m.mean(), 3.5);
source

pub fn row_mean( &self, ) -> Matrix<T, Const<1>, C, <DefaultAllocator as Allocator<T, Const<1>, C>>::Buffer>
where T: Field + SupersetOf<f64>, DefaultAllocator: Allocator<T, Const<1>, C>,

The mean of all the rows of this matrix.

Use .row_mean_tr if you need the result in a column vector instead.

§Example

let m = Matrix2x3::new(1.0, 2.0, 3.0,
                       4.0, 5.0, 6.0);
assert_eq!(m.row_mean(), RowVector3::new(2.5, 3.5, 4.5));
source

pub fn row_mean_tr( &self, ) -> Matrix<T, C, Const<1>, <DefaultAllocator as Allocator<T, C>>::Buffer>
where T: Field + SupersetOf<f64>, DefaultAllocator: Allocator<T, C>,

The mean of all the rows of this matrix. The result is transposed and returned as a column vector.

§Example

let m = Matrix2x3::new(1.0, 2.0, 3.0,
                       4.0, 5.0, 6.0);
assert_eq!(m.row_mean_tr(), Vector3::new(2.5, 3.5, 4.5));
source

pub fn column_mean( &self, ) -> Matrix<T, R, Const<1>, <DefaultAllocator as Allocator<T, R>>::Buffer>
where T: Field + SupersetOf<f64>, DefaultAllocator: Allocator<T, R>,

The mean of all the columns of this matrix.

§Example

let m = Matrix2x3::new(1.0, 2.0, 3.0,
                       4.0, 5.0, 6.0);
assert_eq!(m.column_mean(), Vector2::new(2.0, 5.0));
source§

impl<T, D, S> Matrix<T, D, Const<1>, S>
where T: Scalar, S: RawStorage<T, D>, D: DimName + ToTypenum,

§Swizzling

source

pub fn xx(&self) -> Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>
where <D as ToTypenum>::Typenum: Cmp<UTerm, Output = Greater>,

Builds a new vector from components of self.

source

pub fn xxx(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UTerm, Output = Greater>,

Builds a new vector from components of self.

source

pub fn xy(&self) -> Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn yx(&self) -> Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn yy(&self) -> Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn xxy(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn xyx(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn xyy(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn yxx(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn yxy(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn yyx(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn yyy(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn xz(&self) -> Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn yz(&self) -> Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn zx(&self) -> Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn zy(&self) -> Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn zz(&self) -> Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn xxz(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn xyz(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn xzx(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn xzy(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn xzz(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn yxz(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn yyz(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn yzx(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn yzy(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn yzz(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn zxx(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn zxy(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn zxz(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn zyx(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn zyy(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn zyz(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn zzx(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn zzy(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source

pub fn zzz(&self) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
where <D as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new vector from components of self.

source§

impl<T, D, S> Matrix<T, D, Const<1>, S>
where T: Scalar + Zero + One + ClosedAdd + ClosedSub + ClosedMul, D: Dim, S: Storage<T, D>,

§Interpolation

source

pub fn lerp<S2>( &self, rhs: &Matrix<T, D, Const<1>, S2>, t: T, ) -> Matrix<T, D, Const<1>, <DefaultAllocator as Allocator<T, D>>::Buffer>
where S2: Storage<T, D>, DefaultAllocator: Allocator<T, D>,

Returns self * (1.0 - t) + rhs * t, i.e., the linear blend of the vectors x and y using the scalar value a.

The value for a is not restricted to the range [0, 1].

§Examples:
let x = Vector3::new(1.0, 2.0, 3.0);
let y = Vector3::new(10.0, 20.0, 30.0);
assert_eq!(x.lerp(&y, 0.1), Vector3::new(1.9, 3.8, 5.7));
source

pub fn slerp<S2>( &self, rhs: &Matrix<T, D, Const<1>, S2>, t: T, ) -> Matrix<T, D, Const<1>, <DefaultAllocator as Allocator<T, D>>::Buffer>
where S2: Storage<T, D>, T: RealField, DefaultAllocator: Allocator<T, D>,

Computes the spherical linear interpolation between two non-zero vectors.

The result is a unit vector.

§Examples:

let v1 =Vector2::new(1.0, 2.0);
let v2 = Vector2::new(2.0, -3.0);

let v = v1.slerp(&v2, 1.0);

assert_eq!(v, v2.normalize());
source§

impl<T, R, C, S> Matrix<T, R, C, S>
where T: Scalar, R: Dim, C: Dim, S: RawStorage<T, R, C>,

§Find the min and max components

source

pub fn amax(&self) -> T
where T: Zero + SimdSigned + SimdPartialOrd,

Returns the absolute value of the component with the largest absolute value.

§Example
assert_eq!(Vector3::new(-1.0, 2.0, 3.0).amax(), 3.0);
assert_eq!(Vector3::new(-1.0, -2.0, -3.0).amax(), 3.0);
source

pub fn camax(&self) -> <T as SimdComplexField>::SimdRealField

Returns the the 1-norm of the complex component with the largest 1-norm.

§Example
assert_eq!(Vector3::new(
    Complex::new(-3.0, -2.0),
    Complex::new(1.0, 2.0),
    Complex::new(1.0, 3.0)).camax(), 5.0);
source

pub fn max(&self) -> T
where T: SimdPartialOrd + Zero,

Returns the component with the largest value.

§Example
assert_eq!(Vector3::new(-1.0, 2.0, 3.0).max(), 3.0);
assert_eq!(Vector3::new(-1.0, -2.0, -3.0).max(), -1.0);
assert_eq!(Vector3::new(5u32, 2, 3).max(), 5);
source

pub fn amin(&self) -> T
where T: Zero + SimdPartialOrd + SimdSigned,

Returns the absolute value of the component with the smallest absolute value.

§Example
assert_eq!(Vector3::new(-1.0, 2.0, -3.0).amin(), 1.0);
assert_eq!(Vector3::new(10.0, 2.0, 30.0).amin(), 2.0);
source

pub fn camin(&self) -> <T as SimdComplexField>::SimdRealField

Returns the the 1-norm of the complex component with the smallest 1-norm.

§Example
assert_eq!(Vector3::new(
    Complex::new(-3.0, -2.0),
    Complex::new(1.0, 2.0),
    Complex::new(1.0, 3.0)).camin(), 3.0);
source

pub fn min(&self) -> T
where T: SimdPartialOrd + Zero,

Returns the component with the smallest value.

§Example
assert_eq!(Vector3::new(-1.0, 2.0, 3.0).min(), -1.0);
assert_eq!(Vector3::new(1.0, 2.0, 3.0).min(), 1.0);
assert_eq!(Vector3::new(5u32, 2, 3).min(), 2);
source

pub fn icamax_full(&self) -> (usize, usize)
where T: ComplexField,

Computes the index of the matrix component with the largest absolute value.

§Examples:
let mat = Matrix2x3::new(Complex::new(11.0, 1.0), Complex::new(-12.0, 2.0), Complex::new(13.0, 3.0),
                         Complex::new(21.0, 43.0), Complex::new(22.0, 5.0), Complex::new(-23.0, 0.0));
assert_eq!(mat.icamax_full(), (1, 0));
source§

impl<T, R, C, S> Matrix<T, R, C, S>
where T: Scalar + PartialOrd + Signed, R: Dim, C: Dim, S: RawStorage<T, R, C>,

source

pub fn iamax_full(&self) -> (usize, usize)

Computes the index of the matrix component with the largest absolute value.

§Examples:
let mat = Matrix2x3::new(11, -12, 13,
                         21, 22, -23);
assert_eq!(mat.iamax_full(), (1, 2));
source§

impl<T, D, S> Matrix<T, D, Const<1>, S>
where T: Scalar, D: Dim, S: RawStorage<T, D>,

§Find the min and max components (vector-specific methods)

source

pub fn icamax(&self) -> usize
where T: ComplexField,

Computes the index of the vector component with the largest complex or real absolute value.

§Examples:
let vec = Vector3::new(Complex::new(11.0, 3.0), Complex::new(-15.0, 0.0), Complex::new(13.0, 5.0));
assert_eq!(vec.icamax(), 2);
source

pub fn argmax(&self) -> (usize, T)
where T: PartialOrd,

Computes the index and value of the vector component with the largest value.

§Examples:
let vec = Vector3::new(11, -15, 13);
assert_eq!(vec.argmax(), (2, 13));
source

pub fn imax(&self) -> usize
where T: PartialOrd,

Computes the index of the vector component with the largest value.

§Examples:
let vec = Vector3::new(11, -15, 13);
assert_eq!(vec.imax(), 2);
source

pub fn iamax(&self) -> usize
where T: PartialOrd + Signed,

Computes the index of the vector component with the largest absolute value.

§Examples:
let vec = Vector3::new(11, -15, 13);
assert_eq!(vec.iamax(), 1);
source

pub fn argmin(&self) -> (usize, T)
where T: PartialOrd,

Computes the index and value of the vector component with the smallest value.

§Examples:
let vec = Vector3::new(11, -15, 13);
assert_eq!(vec.argmin(), (1, -15));
source

pub fn imin(&self) -> usize
where T: PartialOrd,

Computes the index of the vector component with the smallest value.

§Examples:
let vec = Vector3::new(11, -15, 13);
assert_eq!(vec.imin(), 1);
source

pub fn iamin(&self) -> usize
where T: PartialOrd + Signed,

Computes the index of the vector component with the smallest absolute value.

§Examples:
let vec = Vector3::new(11, -15, 13);
assert_eq!(vec.iamin(), 0);
source§

impl<T, D1, S1> Matrix<T, D1, Const<1>, S1>
where T: RealField, D1: Dim, S1: Storage<T, D1>,

source

pub fn convolve_full<D2, S2>( &self, kernel: Matrix<T, D2, Const<1>, S2>, ) -> Matrix<T, <<D1 as DimAdd<D2>>::Output as DimSub<Const<1>>>::Output, Const<1>, <DefaultAllocator as Allocator<T, <<D1 as DimAdd<D2>>::Output as DimSub<Const<1>>>::Output>>::Buffer>
where D1: DimAdd<D2>, D2: DimAdd<D1, Output = <D1 as DimAdd<D2>>::Output>, <D1 as DimAdd<D2>>::Output: DimSub<Const<1>>, S2: Storage<T, D2>, DefaultAllocator: Allocator<T, <<D1 as DimAdd<D2>>::Output as DimSub<Const<1>>>::Output>,

Returns the convolution of the target vector and a kernel.

§Arguments
  • kernel - A Vector with size > 0
§Errors

Inputs must satisfy vector.len() >= kernel.len() > 0.

source

pub fn convolve_valid<D2, S2>( &self, kernel: Matrix<T, D2, Const<1>, S2>, ) -> Matrix<T, <<D1 as DimAdd<Const<1>>>::Output as DimSub<D2>>::Output, Const<1>, <DefaultAllocator as Allocator<T, <<D1 as DimAdd<Const<1>>>::Output as DimSub<D2>>::Output>>::Buffer>
where D1: DimAdd<Const<1>>, D2: Dim, <D1 as DimAdd<Const<1>>>::Output: DimSub<D2>, S2: Storage<T, D2>, DefaultAllocator: Allocator<T, <<D1 as DimAdd<Const<1>>>::Output as DimSub<D2>>::Output>,

Returns the convolution of the target vector and a kernel.

The output convolution consists only of those elements that do not rely on the zero-padding.

§Arguments
  • kernel - A Vector with size > 0
§Errors

Inputs must satisfy self.len() >= kernel.len() > 0.

source

pub fn convolve_same<D2, S2>( &self, kernel: Matrix<T, D2, Const<1>, S2>, ) -> Matrix<T, D1, Const<1>, <DefaultAllocator as Allocator<T, D1>>::Buffer>
where D2: Dim, S2: Storage<T, D2>, DefaultAllocator: Allocator<T, D1>,

Returns the convolution of the target vector and a kernel.

The output convolution is the same size as vector, centered with respect to the ‘full’ output.

§Arguments
  • kernel - A Vector with size > 0
§Errors

Inputs must satisfy self.len() >= kernel.len() > 0.

source§

impl<T, D, S> Matrix<T, D, D, S>
where T: ComplexField, D: DimMin<D, Output = D>, S: Storage<T, D, D>,

source

pub fn determinant(&self) -> T
where DefaultAllocator: Allocator<T, D, D> + Allocator<(usize, usize), D>,

Computes the matrix determinant.

If the matrix has a dimension larger than 3, an LU decomposition is used.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where T: ComplexField, R: Dim, C: Dim, S: Storage<T, R, C>,

§Rectangular matrix decomposition

This section contains the methods for computing some common decompositions of rectangular matrices with real or complex components. The following are currently supported:

DecompositionFactorsDetails
QRQ * RQ is an unitary matrix, and R is upper-triangular.
QR with column pivotingQ * R * P⁻¹Q is an unitary matrix, and R is upper-triangular. P is a permutation matrix.
LU with partial pivotingP⁻¹ * L * UL is lower-triangular with a diagonal filled with 1 and U is upper-triangular. P is a permutation matrix.
LU with full pivotingP⁻¹ * L * U * Q⁻¹L is lower-triangular with a diagonal filled with 1 and U is upper-triangular. P and Q are permutation matrices.
SVDU * Σ * VᵀU and V are two orthogonal matrices and Σ is a diagonal matrix containing the singular values.
Polar (Left Polar)P' * UU is semi-unitary/unitary and P' is a positive semi-definite Hermitian Matrix
source

pub fn bidiagonalize(self) -> Bidiagonal<T, R, C>
where R: DimMin<C>, <R as DimMin<C>>::Output: DimSub<Const<1>>, DefaultAllocator: Allocator<T, R, C> + Allocator<T, C> + Allocator<T, R> + Allocator<T, <R as DimMin<C>>::Output> + Allocator<T, <<R as DimMin<C>>::Output as DimSub<Const<1>>>::Output>,

Computes the bidiagonalization using householder reflections.

source

pub fn full_piv_lu(self) -> FullPivLU<T, R, C>
where R: DimMin<C>, DefaultAllocator: Allocator<T, R, C> + Allocator<(usize, usize), <R as DimMin<C>>::Output>,

Computes the LU decomposition with full pivoting of matrix.

This effectively computes P, L, U, Q such that P * matrix * Q = LU.

source

pub fn lu(self) -> LU<T, R, C>
where R: DimMin<C>, DefaultAllocator: Allocator<T, R, C> + Allocator<(usize, usize), <R as DimMin<C>>::Output>,

Computes the LU decomposition with partial (row) pivoting of matrix.

source

pub fn qr(self) -> QR<T, R, C>
where R: DimMin<C>, DefaultAllocator: Allocator<T, R, C> + Allocator<T, R> + Allocator<T, <R as DimMin<C>>::Output>,

Computes the QR decomposition of this matrix.

source

pub fn col_piv_qr(self) -> ColPivQR<T, R, C>
where R: DimMin<C>, DefaultAllocator: Allocator<T, R, C> + Allocator<T, R> + Allocator<T, <R as DimMin<C>>::Output> + Allocator<(usize, usize), <R as DimMin<C>>::Output>,

Computes the QR decomposition (with column pivoting) of this matrix.

source

pub fn svd(self, compute_u: bool, compute_v: bool) -> SVD<T, R, C>
where R: DimMin<C>, <R as DimMin<C>>::Output: DimSub<Const<1>>, DefaultAllocator: Allocator<T, R, C> + Allocator<T, C> + Allocator<T, R> + Allocator<T, <<R as DimMin<C>>::Output as DimSub<Const<1>>>::Output> + Allocator<T, <R as DimMin<C>>::Output, C> + Allocator<T, R, <R as DimMin<C>>::Output> + Allocator<T, <R as DimMin<C>>::Output> + Allocator<<T as ComplexField>::RealField, <R as DimMin<C>>::Output> + Allocator<<T as ComplexField>::RealField, <<R as DimMin<C>>::Output as DimSub<Const<1>>>::Output> + Allocator<(usize, usize), <R as DimMin<C>>::Output> + Allocator<(<T as ComplexField>::RealField, usize), <R as DimMin<C>>::Output>,

Computes the Singular Value Decomposition using implicit shift. The singular values are guaranteed to be sorted in descending order. If this order is not required consider using svd_unordered.

source

pub fn svd_unordered(self, compute_u: bool, compute_v: bool) -> SVD<T, R, C>
where R: DimMin<C>, <R as DimMin<C>>::Output: DimSub<Const<1>>, DefaultAllocator: Allocator<T, R, C> + Allocator<T, C> + Allocator<T, R> + Allocator<T, <<R as DimMin<C>>::Output as DimSub<Const<1>>>::Output> + Allocator<T, <R as DimMin<C>>::Output, C> + Allocator<T, R, <R as DimMin<C>>::Output> + Allocator<T, <R as DimMin<C>>::Output> + Allocator<<T as ComplexField>::RealField, <R as DimMin<C>>::Output> + Allocator<<T as ComplexField>::RealField, <<R as DimMin<C>>::Output as DimSub<Const<1>>>::Output>,

Computes the Singular Value Decomposition using implicit shift. The singular values are not guaranteed to be sorted in any particular order. If a descending order is required, consider using svd instead.

source

pub fn try_svd( self, compute_u: bool, compute_v: bool, eps: <T as ComplexField>::RealField, max_niter: usize, ) -> Option<SVD<T, R, C>>
where R: DimMin<C>, <R as DimMin<C>>::Output: DimSub<Const<1>>, DefaultAllocator: Allocator<T, R, C> + Allocator<T, C> + Allocator<T, R> + Allocator<T, <<R as DimMin<C>>::Output as DimSub<Const<1>>>::Output> + Allocator<T, <R as DimMin<C>>::Output, C> + Allocator<T, R, <R as DimMin<C>>::Output> + Allocator<T, <R as DimMin<C>>::Output> + Allocator<<T as ComplexField>::RealField, <R as DimMin<C>>::Output> + Allocator<<T as ComplexField>::RealField, <<R as DimMin<C>>::Output as DimSub<Const<1>>>::Output> + Allocator<(usize, usize), <R as DimMin<C>>::Output> + Allocator<(<T as ComplexField>::RealField, usize), <R as DimMin<C>>::Output>,

Attempts to compute the Singular Value Decomposition of matrix using implicit shift. The singular values are guaranteed to be sorted in descending order. If this order is not required consider using try_svd_unordered.

§Arguments
  • compute_u − set this to true to enable the computation of left-singular vectors.
  • compute_v − set this to true to enable the computation of right-singular vectors.
  • eps − tolerance used to determine when a value converged to 0.
  • max_niter − maximum total number of iterations performed by the algorithm. If this number of iteration is exceeded, None is returned. If niter == 0, then the algorithm continues indefinitely until convergence.
source

pub fn try_svd_unordered( self, compute_u: bool, compute_v: bool, eps: <T as ComplexField>::RealField, max_niter: usize, ) -> Option<SVD<T, R, C>>
where R: DimMin<C>, <R as DimMin<C>>::Output: DimSub<Const<1>>, DefaultAllocator: Allocator<T, R, C> + Allocator<T, C> + Allocator<T, R> + Allocator<T, <<R as DimMin<C>>::Output as DimSub<Const<1>>>::Output> + Allocator<T, <R as DimMin<C>>::Output, C> + Allocator<T, R, <R as DimMin<C>>::Output> + Allocator<T, <R as DimMin<C>>::Output> + Allocator<<T as ComplexField>::RealField, <R as DimMin<C>>::Output> + Allocator<<T as ComplexField>::RealField, <<R as DimMin<C>>::Output as DimSub<Const<1>>>::Output>,

Attempts to compute the Singular Value Decomposition of matrix using implicit shift. The singular values are not guaranteed to be sorted in any particular order. If a descending order is required, consider using try_svd instead.

§Arguments
  • compute_u − set this to true to enable the computation of left-singular vectors.
  • compute_v − set this to true to enable the computation of right-singular vectors.
  • eps − tolerance used to determine when a value converged to 0.
  • max_niter − maximum total number of iterations performed by the algorithm. If this number of iteration is exceeded, None is returned. If niter == 0, then the algorithm continues indefinitely until convergence.
source

pub fn polar( self, ) -> (Matrix<T, R, R, <DefaultAllocator as Allocator<T, R, R>>::Buffer>, Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>)
where R: DimMin<C>, <R as DimMin<C>>::Output: DimSub<Const<1>>, DefaultAllocator: Allocator<T, R, C> + Allocator<T, <R as DimMin<C>>::Output, R> + Allocator<T, <R as DimMin<C>>::Output> + Allocator<T, R, R> + Allocator<T, <R as DimMin<C>>::Output, <R as DimMin<C>>::Output> + Allocator<T, C> + Allocator<T, R> + Allocator<T, <<R as DimMin<C>>::Output as DimSub<Const<1>>>::Output> + Allocator<T, <R as DimMin<C>>::Output, C> + Allocator<T, R, <R as DimMin<C>>::Output> + Allocator<<T as ComplexField>::RealField, <R as DimMin<C>>::Output> + Allocator<<T as ComplexField>::RealField, <<R as DimMin<C>>::Output as DimSub<Const<1>>>::Output>,

Computes the Polar Decomposition of a matrix (indirectly uses SVD).

source

pub fn try_polar( self, eps: <T as ComplexField>::RealField, max_niter: usize, ) -> Option<(Matrix<T, R, R, <DefaultAllocator as Allocator<T, R, R>>::Buffer>, Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>)>
where R: DimMin<C>, <R as DimMin<C>>::Output: DimSub<Const<1>>, DefaultAllocator: Allocator<T, R, C> + Allocator<T, <R as DimMin<C>>::Output, R> + Allocator<T, <R as DimMin<C>>::Output> + Allocator<T, R, R> + Allocator<T, <R as DimMin<C>>::Output, <R as DimMin<C>>::Output> + Allocator<T, C> + Allocator<T, R> + Allocator<T, <<R as DimMin<C>>::Output as DimSub<Const<1>>>::Output> + Allocator<T, <R as DimMin<C>>::Output, C> + Allocator<T, R, <R as DimMin<C>>::Output> + Allocator<<T as ComplexField>::RealField, <R as DimMin<C>>::Output> + Allocator<<T as ComplexField>::RealField, <<R as DimMin<C>>::Output as DimSub<Const<1>>>::Output>,

Attempts to compute the Polar Decomposition of a matrix (indirectly uses SVD).

§Arguments
  • eps − tolerance used to determine when a value converged to 0 when computing the SVD.
  • max_niter − maximum total number of iterations performed by the SVD computation algorithm.
source§

impl<T, D, S> Matrix<T, D, D, S>
where T: ComplexField, D: Dim, S: Storage<T, D, D>,

§Square matrix decomposition

This section contains the methods for computing some common decompositions of square matrices with real or complex components. The following are currently supported:

DecompositionFactorsDetails
HessenbergQ * H * QᵀQ is a unitary matrix and H an upper-Hessenberg matrix.
CholeskyL * LᵀL is a lower-triangular matrix.
UDUU * D * UᵀU is a upper-triangular matrix, and D a diagonal matrix.
Schur decompositionQ * T * QᵀQ is an unitary matrix and T a quasi-upper-triangular matrix.
Symmetric eigendecompositionQ ~ Λ ~ QᵀQ is an unitary matrix, and Λ is a real diagonal matrix.
Symmetric tridiagonalizationQ ~ T ~ QᵀQ is an unitary matrix, and T is a tridiagonal matrix.
source

pub fn cholesky(self) -> Option<Cholesky<T, D>>
where DefaultAllocator: Allocator<T, D, D>,

Attempts to compute the Cholesky decomposition of this matrix.

Returns None if the input matrix is not definite-positive. The input matrix is assumed to be symmetric and only the lower-triangular part is read.

source

pub fn udu(self) -> Option<UDU<T, D>>
where T: RealField, DefaultAllocator: Allocator<T, D> + Allocator<T, D, D>,

Attempts to compute the UDU decomposition of this matrix.

The input matrix self is assumed to be symmetric and this decomposition will only read the upper-triangular part of self.

source

pub fn hessenberg(self) -> Hessenberg<T, D>
where D: DimSub<Const<1>>, DefaultAllocator: Allocator<T, D, D> + Allocator<T, D> + Allocator<T, <D as DimSub<Const<1>>>::Output>,

Computes the Hessenberg decomposition of this matrix using householder reflections.

source

pub fn schur(self) -> Schur<T, D>
where D: DimSub<Const<1>>, DefaultAllocator: Allocator<T, D, <D as DimSub<Const<1>>>::Output> + Allocator<T, <D as DimSub<Const<1>>>::Output> + Allocator<T, D, D> + Allocator<T, D>,

Computes the Schur decomposition of a square matrix.

source

pub fn try_schur( self, eps: <T as ComplexField>::RealField, max_niter: usize, ) -> Option<Schur<T, D>>
where D: DimSub<Const<1>>, DefaultAllocator: Allocator<T, D, <D as DimSub<Const<1>>>::Output> + Allocator<T, <D as DimSub<Const<1>>>::Output> + Allocator<T, D, D> + Allocator<T, D>,

Attempts to compute the Schur decomposition of a square matrix.

If only eigenvalues are needed, it is more efficient to call the matrix method .eigenvalues() instead.

§Arguments
  • eps − tolerance used to determine when a value converged to 0.
  • max_niter − maximum total number of iterations performed by the algorithm. If this number of iteration is exceeded, None is returned. If niter == 0, then the algorithm continues indefinitely until convergence.
source

pub fn symmetric_eigen(self) -> SymmetricEigen<T, D>
where D: DimSub<Const<1>>, DefaultAllocator: Allocator<T, D, D> + Allocator<T, <D as DimSub<Const<1>>>::Output> + Allocator<<T as ComplexField>::RealField, D> + Allocator<<T as ComplexField>::RealField, <D as DimSub<Const<1>>>::Output>,

Computes the eigendecomposition of this symmetric matrix.

Only the lower-triangular part (including the diagonal) of m is read.

source

pub fn try_symmetric_eigen( self, eps: <T as ComplexField>::RealField, max_niter: usize, ) -> Option<SymmetricEigen<T, D>>
where D: DimSub<Const<1>>, DefaultAllocator: Allocator<T, D, D> + Allocator<T, <D as DimSub<Const<1>>>::Output> + Allocator<<T as ComplexField>::RealField, D> + Allocator<<T as ComplexField>::RealField, <D as DimSub<Const<1>>>::Output>,

Computes the eigendecomposition of the given symmetric matrix with user-specified convergence parameters.

Only the lower-triangular part (including the diagonal) of m is read.

§Arguments
  • eps − tolerance used to determine when a value converged to 0.
  • max_niter − maximum total number of iterations performed by the algorithm. If this number of iteration is exceeded, None is returned. If niter == 0, then the algorithm continues indefinitely until convergence.
source

pub fn symmetric_tridiagonalize(self) -> SymmetricTridiagonal<T, D>
where D: DimSub<Const<1>>, DefaultAllocator: Allocator<T, D, D> + Allocator<T, <D as DimSub<Const<1>>>::Output>,

Computes the tridiagonalization of this symmetric matrix.

Only the lower-triangular part (including the diagonal) of m is read.

source§

impl<T, D> Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>
where T: ComplexField, D: DimMin<D, Output = D>, DefaultAllocator: Allocator<T, D, D> + Allocator<(usize, usize), <D as DimMin<D>>::Output> + Allocator<T, D> + Allocator<<T as ComplexField>::RealField, D> + Allocator<<T as ComplexField>::RealField, D, D>,

source

pub fn exp( &self, ) -> Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>

Computes exponential of this matrix

source§

impl<T, D, S> Matrix<T, D, D, S>
where T: ComplexField, D: Dim, S: Storage<T, D, D>,

source

pub fn try_inverse( self, ) -> Option<Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>>
where DefaultAllocator: Allocator<T, D, D>,

Attempts to invert this square matrix.

§Panics

Panics if self isn’t a square matrix.

source§

impl<T, D, S> Matrix<T, D, D, S>
where T: ComplexField, D: Dim, S: StorageMut<T, D, D>,

source

pub fn try_inverse_mut(&mut self) -> bool
where DefaultAllocator: Allocator<T, D, D>,

Attempts to invert this square matrix in-place. Returns false and leaves self untouched if inversion fails.

§Panics

Panics if self isn’t a square matrix.

source§

impl<T, D, S> Matrix<T, D, D, S>
where T: Scalar + Zero + One + ClosedAdd + ClosedMul, D: DimMin<D, Output = D>, S: StorageMut<T, D, D>, DefaultAllocator: Allocator<T, D, D> + Allocator<T, D>,

source

pub fn pow_mut(&mut self, exp: u32)

Raises this matrix to an integral power exp in-place.

source§

impl<T, D, S> Matrix<T, D, D, S>
where S: Storage<T, D, D> + StorageMut<T, D, D>, T: Scalar + Zero + One + ClosedAdd + ClosedMul, D: DimMin<D, Output = D>, DefaultAllocator: Allocator<T, D, D> + Allocator<T, D>,

source

pub fn pow( &self, exp: u32, ) -> Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>

Raise this matrix to an integral power exp.

source§

impl<T, D, S> Matrix<T, D, D, S>
where T: ComplexField, D: Dim + DimSub<Const<1>>, S: Storage<T, D, D>, DefaultAllocator: Allocator<T, D, <D as DimSub<Const<1>>>::Output> + Allocator<T, <D as DimSub<Const<1>>>::Output> + Allocator<T, D, D> + Allocator<T, D>,

source

pub fn eigenvalues( &self, ) -> Option<Matrix<T, D, Const<1>, <DefaultAllocator as Allocator<T, D>>::Buffer>>

Computes the eigenvalues of this matrix.

source

pub fn complex_eigenvalues( &self, ) -> Matrix<Complex<T>, D, Const<1>, <DefaultAllocator as Allocator<Complex<T>, D>>::Buffer>

Computes the eigenvalues of this matrix.

source§

impl<T, D, S> Matrix<T, D, D, S>
where T: ComplexField, D: Dim, S: Storage<T, D, D>,

source

pub fn solve_lower_triangular<R2, C2, S2>( &self, b: &Matrix<T, R2, C2, S2>, ) -> Option<Matrix<T, R2, C2, <DefaultAllocator as Allocator<T, R2, C2>>::Buffer>>
where R2: Dim, C2: Dim, S2: Storage<T, R2, C2>, DefaultAllocator: Allocator<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Computes the solution of the linear system self . x = b where x is the unknown and only the lower-triangular part of self (including the diagonal) is considered not-zero.

source

pub fn solve_upper_triangular<R2, C2, S2>( &self, b: &Matrix<T, R2, C2, S2>, ) -> Option<Matrix<T, R2, C2, <DefaultAllocator as Allocator<T, R2, C2>>::Buffer>>
where R2: Dim, C2: Dim, S2: Storage<T, R2, C2>, DefaultAllocator: Allocator<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Computes the solution of the linear system self . x = b where x is the unknown and only the upper-triangular part of self (including the diagonal) is considered not-zero.

source

pub fn solve_lower_triangular_mut<R2, C2, S2>( &self, b: &mut Matrix<T, R2, C2, S2>, ) -> bool
where R2: Dim, C2: Dim, S2: StorageMut<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Solves the linear system self . x = b where x is the unknown and only the lower-triangular part of self (including the diagonal) is considered not-zero.

source

pub fn solve_lower_triangular_with_diag_mut<R2, C2, S2>( &self, b: &mut Matrix<T, R2, C2, S2>, diag: T, ) -> bool
where R2: Dim, C2: Dim, S2: StorageMut<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Solves the linear system self . x = b where x is the unknown and only the lower-triangular part of self is considered not-zero. The diagonal is never read as it is assumed to be equal to diag. Returns false and does not modify its inputs if diag is zero.

source

pub fn solve_upper_triangular_mut<R2, C2, S2>( &self, b: &mut Matrix<T, R2, C2, S2>, ) -> bool
where R2: Dim, C2: Dim, S2: StorageMut<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Solves the linear system self . x = b where x is the unknown and only the upper-triangular part of self (including the diagonal) is considered not-zero.

source

pub fn tr_solve_lower_triangular<R2, C2, S2>( &self, b: &Matrix<T, R2, C2, S2>, ) -> Option<Matrix<T, R2, C2, <DefaultAllocator as Allocator<T, R2, C2>>::Buffer>>
where R2: Dim, C2: Dim, S2: Storage<T, R2, C2>, DefaultAllocator: Allocator<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Computes the solution of the linear system self.transpose() . x = b where x is the unknown and only the lower-triangular part of self (including the diagonal) is considered not-zero.

source

pub fn tr_solve_upper_triangular<R2, C2, S2>( &self, b: &Matrix<T, R2, C2, S2>, ) -> Option<Matrix<T, R2, C2, <DefaultAllocator as Allocator<T, R2, C2>>::Buffer>>
where R2: Dim, C2: Dim, S2: Storage<T, R2, C2>, DefaultAllocator: Allocator<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Computes the solution of the linear system self.transpose() . x = b where x is the unknown and only the upper-triangular part of self (including the diagonal) is considered not-zero.

source

pub fn tr_solve_lower_triangular_mut<R2, C2, S2>( &self, b: &mut Matrix<T, R2, C2, S2>, ) -> bool
where R2: Dim, C2: Dim, S2: StorageMut<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Solves the linear system self.transpose() . x = b where x is the unknown and only the lower-triangular part of self (including the diagonal) is considered not-zero.

source

pub fn tr_solve_upper_triangular_mut<R2, C2, S2>( &self, b: &mut Matrix<T, R2, C2, S2>, ) -> bool
where R2: Dim, C2: Dim, S2: StorageMut<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Solves the linear system self.transpose() . x = b where x is the unknown and only the upper-triangular part of self (including the diagonal) is considered not-zero.

source

pub fn ad_solve_lower_triangular<R2, C2, S2>( &self, b: &Matrix<T, R2, C2, S2>, ) -> Option<Matrix<T, R2, C2, <DefaultAllocator as Allocator<T, R2, C2>>::Buffer>>
where R2: Dim, C2: Dim, S2: Storage<T, R2, C2>, DefaultAllocator: Allocator<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Computes the solution of the linear system self.adjoint() . x = b where x is the unknown and only the lower-triangular part of self (including the diagonal) is considered not-zero.

source

pub fn ad_solve_upper_triangular<R2, C2, S2>( &self, b: &Matrix<T, R2, C2, S2>, ) -> Option<Matrix<T, R2, C2, <DefaultAllocator as Allocator<T, R2, C2>>::Buffer>>
where R2: Dim, C2: Dim, S2: Storage<T, R2, C2>, DefaultAllocator: Allocator<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Computes the solution of the linear system self.adjoint() . x = b where x is the unknown and only the upper-triangular part of self (including the diagonal) is considered not-zero.

source

pub fn ad_solve_lower_triangular_mut<R2, C2, S2>( &self, b: &mut Matrix<T, R2, C2, S2>, ) -> bool
where R2: Dim, C2: Dim, S2: StorageMut<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Solves the linear system self.adjoint() . x = b where x is the unknown and only the lower-triangular part of self (including the diagonal) is considered not-zero.

source

pub fn ad_solve_upper_triangular_mut<R2, C2, S2>( &self, b: &mut Matrix<T, R2, C2, S2>, ) -> bool
where R2: Dim, C2: Dim, S2: StorageMut<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Solves the linear system self.adjoint() . x = b where x is the unknown and only the upper-triangular part of self (including the diagonal) is considered not-zero.

source§

impl<T, D, S> Matrix<T, D, D, S>
where T: SimdComplexField, D: Dim, S: Storage<T, D, D>,

source

pub fn solve_lower_triangular_unchecked<R2, C2, S2>( &self, b: &Matrix<T, R2, C2, S2>, ) -> Matrix<T, R2, C2, <DefaultAllocator as Allocator<T, R2, C2>>::Buffer>
where R2: Dim, C2: Dim, S2: Storage<T, R2, C2>, DefaultAllocator: Allocator<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Computes the solution of the linear system self . x = b where x is the unknown and only the lower-triangular part of self (including the diagonal) is considered not-zero.

source

pub fn solve_upper_triangular_unchecked<R2, C2, S2>( &self, b: &Matrix<T, R2, C2, S2>, ) -> Matrix<T, R2, C2, <DefaultAllocator as Allocator<T, R2, C2>>::Buffer>
where R2: Dim, C2: Dim, S2: Storage<T, R2, C2>, DefaultAllocator: Allocator<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Computes the solution of the linear system self . x = b where x is the unknown and only the upper-triangular part of self (including the diagonal) is considered not-zero.

source

pub fn solve_lower_triangular_unchecked_mut<R2, C2, S2>( &self, b: &mut Matrix<T, R2, C2, S2>, )
where R2: Dim, C2: Dim, S2: StorageMut<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Solves the linear system self . x = b where x is the unknown and only the lower-triangular part of self (including the diagonal) is considered not-zero.

source

pub fn solve_lower_triangular_with_diag_unchecked_mut<R2, C2, S2>( &self, b: &mut Matrix<T, R2, C2, S2>, diag: T, )
where R2: Dim, C2: Dim, S2: StorageMut<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Solves the linear system self . x = b where x is the unknown and only the lower-triangular part of self is considered not-zero. The diagonal is never read as it is assumed to be equal to diag. Returns false and does not modify its inputs if diag is zero.

source

pub fn solve_upper_triangular_unchecked_mut<R2, C2, S2>( &self, b: &mut Matrix<T, R2, C2, S2>, )
where R2: Dim, C2: Dim, S2: StorageMut<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Solves the linear system self . x = b where x is the unknown and only the upper-triangular part of self (including the diagonal) is considered not-zero.

source

pub fn tr_solve_lower_triangular_unchecked<R2, C2, S2>( &self, b: &Matrix<T, R2, C2, S2>, ) -> Matrix<T, R2, C2, <DefaultAllocator as Allocator<T, R2, C2>>::Buffer>
where R2: Dim, C2: Dim, S2: Storage<T, R2, C2>, DefaultAllocator: Allocator<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Computes the solution of the linear system self.transpose() . x = b where x is the unknown and only the lower-triangular part of self (including the diagonal) is considered not-zero.

source

pub fn tr_solve_upper_triangular_unchecked<R2, C2, S2>( &self, b: &Matrix<T, R2, C2, S2>, ) -> Matrix<T, R2, C2, <DefaultAllocator as Allocator<T, R2, C2>>::Buffer>
where R2: Dim, C2: Dim, S2: Storage<T, R2, C2>, DefaultAllocator: Allocator<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Computes the solution of the linear system self.transpose() . x = b where x is the unknown and only the upper-triangular part of self (including the diagonal) is considered not-zero.

source

pub fn tr_solve_lower_triangular_unchecked_mut<R2, C2, S2>( &self, b: &mut Matrix<T, R2, C2, S2>, )
where R2: Dim, C2: Dim, S2: StorageMut<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Solves the linear system self.transpose() . x = b where x is the unknown and only the lower-triangular part of self (including the diagonal) is considered not-zero.

source

pub fn tr_solve_upper_triangular_unchecked_mut<R2, C2, S2>( &self, b: &mut Matrix<T, R2, C2, S2>, )
where R2: Dim, C2: Dim, S2: StorageMut<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Solves the linear system self.transpose() . x = b where x is the unknown and only the upper-triangular part of self (including the diagonal) is considered not-zero.

source

pub fn ad_solve_lower_triangular_unchecked<R2, C2, S2>( &self, b: &Matrix<T, R2, C2, S2>, ) -> Matrix<T, R2, C2, <DefaultAllocator as Allocator<T, R2, C2>>::Buffer>
where R2: Dim, C2: Dim, S2: Storage<T, R2, C2>, DefaultAllocator: Allocator<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Computes the solution of the linear system self.adjoint() . x = b where x is the unknown and only the lower-triangular part of self (including the diagonal) is considered not-zero.

source

pub fn ad_solve_upper_triangular_unchecked<R2, C2, S2>( &self, b: &Matrix<T, R2, C2, S2>, ) -> Matrix<T, R2, C2, <DefaultAllocator as Allocator<T, R2, C2>>::Buffer>
where R2: Dim, C2: Dim, S2: Storage<T, R2, C2>, DefaultAllocator: Allocator<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Computes the solution of the linear system self.adjoint() . x = b where x is the unknown and only the upper-triangular part of self (including the diagonal) is considered not-zero.

source

pub fn ad_solve_lower_triangular_unchecked_mut<R2, C2, S2>( &self, b: &mut Matrix<T, R2, C2, S2>, )
where R2: Dim, C2: Dim, S2: StorageMut<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Solves the linear system self.adjoint() . x = b where x is the unknown and only the lower-triangular part of self (including the diagonal) is considered not-zero.

source

pub fn ad_solve_upper_triangular_unchecked_mut<R2, C2, S2>( &self, b: &mut Matrix<T, R2, C2, S2>, )
where R2: Dim, C2: Dim, S2: StorageMut<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R2, D>,

Solves the linear system self.adjoint() . x = b where x is the unknown and only the upper-triangular part of self (including the diagonal) is considered not-zero.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where T: ComplexField, R: DimMin<C>, C: Dim, S: Storage<T, R, C>, <R as DimMin<C>>::Output: DimSub<Const<1>>, DefaultAllocator: Allocator<T, R, C> + Allocator<T, C> + Allocator<T, R> + Allocator<T, <<R as DimMin<C>>::Output as DimSub<Const<1>>>::Output> + Allocator<T, <R as DimMin<C>>::Output, C> + Allocator<T, R, <R as DimMin<C>>::Output> + Allocator<T, <R as DimMin<C>>::Output> + Allocator<<T as ComplexField>::RealField, <R as DimMin<C>>::Output> + Allocator<<T as ComplexField>::RealField, <<R as DimMin<C>>::Output as DimSub<Const<1>>>::Output>,

source

pub fn singular_values_unordered( &self, ) -> Matrix<<T as ComplexField>::RealField, <R as DimMin<C>>::Output, Const<1>, <DefaultAllocator as Allocator<<T as ComplexField>::RealField, <R as DimMin<C>>::Output>>::Buffer>

Computes the singular values of this matrix. The singular values are not guaranteed to be sorted in any particular order. If a descending order is required, consider using singular_values instead.

source

pub fn rank(&self, eps: <T as ComplexField>::RealField) -> usize

Computes the rank of this matrix.

All singular values below eps are considered equal to 0.

source

pub fn pseudo_inverse( self, eps: <T as ComplexField>::RealField, ) -> Result<Matrix<T, C, R, <DefaultAllocator as Allocator<T, C, R>>::Buffer>, &'static str>
where DefaultAllocator: Allocator<T, C, R>,

Computes the pseudo-inverse of this matrix.

All singular values below eps are considered equal to 0.

source§

impl<T, R, C, S> Matrix<T, R, C, S>
where T: ComplexField, R: DimMin<C>, C: Dim, S: Storage<T, R, C>, <R as DimMin<C>>::Output: DimSub<Const<1>>, DefaultAllocator: Allocator<T, R, C> + Allocator<T, C> + Allocator<T, R> + Allocator<T, <<R as DimMin<C>>::Output as DimSub<Const<1>>>::Output> + Allocator<T, <R as DimMin<C>>::Output, C> + Allocator<T, R, <R as DimMin<C>>::Output> + Allocator<T, <R as DimMin<C>>::Output> + Allocator<<T as ComplexField>::RealField, <R as DimMin<C>>::Output> + Allocator<<T as ComplexField>::RealField, <<R as DimMin<C>>::Output as DimSub<Const<1>>>::Output> + Allocator<(usize, usize), <R as DimMin<C>>::Output> + Allocator<(<T as ComplexField>::RealField, usize), <R as DimMin<C>>::Output>,

source

pub fn singular_values( &self, ) -> Matrix<<T as ComplexField>::RealField, <R as DimMin<C>>::Output, Const<1>, <DefaultAllocator as Allocator<<T as ComplexField>::RealField, <R as DimMin<C>>::Output>>::Buffer>

Computes the singular values of this matrix. The singular values are guaranteed to be sorted in descending order. If this order is not required consider using singular_values_unordered.

source§

impl<T, D, S> Matrix<T, D, D, S>
where T: ComplexField, D: DimSub<Const<1>>, S: Storage<T, D, D>, DefaultAllocator: Allocator<T, D, D> + Allocator<T, <D as DimSub<Const<1>>>::Output> + Allocator<<T as ComplexField>::RealField, D> + Allocator<<T as ComplexField>::RealField, <D as DimSub<Const<1>>>::Output>,

source

pub fn symmetric_eigenvalues( &self, ) -> Matrix<<T as ComplexField>::RealField, D, Const<1>, <DefaultAllocator as Allocator<<T as ComplexField>::RealField, D>>::Buffer>

Computes the eigenvalues of this symmetric matrix.

Only the lower-triangular part of the matrix is read.

Trait Implementations§

source§

impl<T, R, C, S> AbsDiffEq for Matrix<T, R, C, S>
where R: Dim, C: Dim, T: Scalar + AbsDiffEq, S: RawStorage<T, R, C>, <T as AbsDiffEq>::Epsilon: Clone,

§

type Epsilon = <T as AbsDiffEq>::Epsilon

Used for specifying relative comparisons.
source§

fn default_epsilon() -> <Matrix<T, R, C, S> as AbsDiffEq>::Epsilon

The default tolerance to use when testing values that are close together. Read more
source§

fn abs_diff_eq( &self, other: &Matrix<T, R, C, S>, epsilon: <Matrix<T, R, C, S> as AbsDiffEq>::Epsilon, ) -> bool

A test for equality that uses the absolute difference to compute the approximate equality of two numbers.
§

fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool

The inverse of [AbsDiffEq::abs_diff_eq].
source§

impl<'a, 'b, T, D1, D2, SB> Add<&'b Matrix<T, D2, Const<1>, SB>> for &'a OPoint<T, D1>
where T: Scalar + ClosedAdd, ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<Const<1>, Const<1>, Representative = Const<1>>, D1: DimName, D2: Dim, SB: Storage<T, D2>, DefaultAllocator: Allocator<T, D1>,

§

type Output = OPoint<T, D1>

The resulting type after applying the + operator.
source§

fn add( self, right: &'b Matrix<T, D2, Const<1>, SB>, ) -> <&'a OPoint<T, D1> as Add<&'b Matrix<T, D2, Const<1>, SB>>>::Output

Performs the + operation. Read more
source§

impl<'b, T, D1, D2, SB> Add<&'b Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>
where T: Scalar + ClosedAdd, ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<Const<1>, Const<1>, Representative = Const<1>>, D1: DimName, D2: Dim, SB: Storage<T, D2>, DefaultAllocator: Allocator<T, D1>,

§

type Output = OPoint<T, D1>

The resulting type after applying the + operator.
source§

fn add( self, right: &'b Matrix<T, D2, Const<1>, SB>, ) -> <OPoint<T, D1> as Add<&'b Matrix<T, D2, Const<1>, SB>>>::Output

Performs the + operation. Read more
source§

impl<'a, 'b, T, R1, C1, R2, C2, SA, SB> Add<&'b Matrix<T, R2, C2, SB>> for &'a Matrix<T, R1, C1, SA>
where R1: Dim, C1: Dim, R2: Dim, C2: Dim, T: Scalar + ClosedAdd, SA: Storage<T, R1, C1>, SB: Storage<T, R2, C2>, DefaultAllocator: SameShapeAllocator<T, R1, C1, R2, C2>, ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfColumns<C1, C2>,

§

type Output = Matrix<T, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative, <DefaultAllocator as Allocator<T, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative>>::Buffer>

The resulting type after applying the + operator.
source§

fn add( self, rhs: &'b Matrix<T, R2, C2, SB>, ) -> <&'a Matrix<T, R1, C1, SA> as Add<&'b Matrix<T, R2, C2, SB>>>::Output

Performs the + operation. Read more
source§

impl<'b, T, R1, C1, R2, C2, SA, SB> Add<&'b Matrix<T, R2, C2, SB>> for Matrix<T, R1, C1, SA>
where R1: Dim, C1: Dim, R2: Dim, C2: Dim, T: Scalar + ClosedAdd, SA: Storage<T, R1, C1>, SB: Storage<T, R2, C2>, DefaultAllocator: SameShapeAllocator<T, R1, C1, R2, C2>, ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfColumns<C1, C2>,

§

type Output = Matrix<T, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative, <DefaultAllocator as Allocator<T, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative>>::Buffer>

The resulting type after applying the + operator.
source§

fn add( self, rhs: &'b Matrix<T, R2, C2, SB>, ) -> <Matrix<T, R1, C1, SA> as Add<&'b Matrix<T, R2, C2, SB>>>::Output

Performs the + operation. Read more
source§

impl<'a, T, D1, D2, SB> Add<Matrix<T, D2, Const<1>, SB>> for &'a OPoint<T, D1>
where T: Scalar + ClosedAdd, ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<Const<1>, Const<1>, Representative = Const<1>>, D1: DimName, D2: Dim, SB: Storage<T, D2>, DefaultAllocator: Allocator<T, D1>,

§

type Output = OPoint<T, D1>

The resulting type after applying the + operator.
source§

fn add( self, right: Matrix<T, D2, Const<1>, SB>, ) -> <&'a OPoint<T, D1> as Add<Matrix<T, D2, Const<1>, SB>>>::Output

Performs the + operation. Read more
source§

impl<T, D1, D2, SB> Add<Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>
where T: Scalar + ClosedAdd, ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<Const<1>, Const<1>, Representative = Const<1>>, D1: DimName, D2: Dim, SB: Storage<T, D2>, DefaultAllocator: Allocator<T, D1>,

§

type Output = OPoint<T, D1>

The resulting type after applying the + operator.
source§

fn add( self, right: Matrix<T, D2, Const<1>, SB>, ) -> <OPoint<T, D1> as Add<Matrix<T, D2, Const<1>, SB>>>::Output

Performs the + operation. Read more
source§

impl<'a, T, R1, C1, R2, C2, SA, SB> Add<Matrix<T, R2, C2, SB>> for &'a Matrix<T, R1, C1, SA>
where R1: Dim, C1: Dim, R2: Dim, C2: Dim, T: Scalar + ClosedAdd, SA: Storage<T, R1, C1>, SB: Storage<T, R2, C2>, DefaultAllocator: SameShapeAllocator<T, R2, C2, R1, C1>, ShapeConstraint: SameNumberOfRows<R2, R1> + SameNumberOfColumns<C2, C1>,

§

type Output = Matrix<T, <ShapeConstraint as SameNumberOfRows<R2, R1>>::Representative, <ShapeConstraint as SameNumberOfColumns<C2, C1>>::Representative, <DefaultAllocator as Allocator<T, <ShapeConstraint as SameNumberOfRows<R2, R1>>::Representative, <ShapeConstraint as SameNumberOfColumns<C2, C1>>::Representative>>::Buffer>

The resulting type after applying the + operator.
source§

fn add( self, rhs: Matrix<T, R2, C2, SB>, ) -> <&'a Matrix<T, R1, C1, SA> as Add<Matrix<T, R2, C2, SB>>>::Output

Performs the + operation. Read more
source§

impl<T, R1, C1, R2, C2, SA, SB> Add<Matrix<T, R2, C2, SB>> for Matrix<T, R1, C1, SA>
where R1: Dim, C1: Dim, R2: Dim, C2: Dim, T: Scalar + ClosedAdd, SA: Storage<T, R1, C1>, SB: Storage<T, R2, C2>, DefaultAllocator: SameShapeAllocator<T, R1, C1, R2, C2>, ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfColumns<C1, C2>,

§

type Output = Matrix<T, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative, <DefaultAllocator as Allocator<T, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative>>::Buffer>

The resulting type after applying the + operator.
source§

fn add( self, rhs: Matrix<T, R2, C2, SB>, ) -> <Matrix<T, R1, C1, SA> as Add<Matrix<T, R2, C2, SB>>>::Output

Performs the + operation. Read more
source§

impl<'b, T, D1, D2, SB> AddAssign<&'b Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>
where D1: DimName, D2: Dim, T: Scalar + ClosedAdd, SB: Storage<T, D2>, ShapeConstraint: SameNumberOfRows<D1, D2>, DefaultAllocator: Allocator<T, D1>,

source§

fn add_assign(&mut self, right: &'b Matrix<T, D2, Const<1>, SB>)

Performs the += operation. Read more
source§

impl<'b, T, R1, C1, R2, C2, SA, SB> AddAssign<&'b Matrix<T, R2, C2, SB>> for Matrix<T, R1, C1, SA>
where R1: Dim, C1: Dim, R2: Dim, C2: Dim, T: Scalar + ClosedAdd, SA: StorageMut<T, R1, C1>, SB: Storage<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfColumns<C1, C2>,

source§

fn add_assign(&mut self, rhs: &'b Matrix<T, R2, C2, SB>)

Performs the += operation. Read more
source§

impl<T, D1, D2, SB> AddAssign<Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>
where D1: DimName, D2: Dim, T: Scalar + ClosedAdd, SB: Storage<T, D2>, ShapeConstraint: SameNumberOfRows<D1, D2>, DefaultAllocator: Allocator<T, D1>,

source§

fn add_assign(&mut self, right: Matrix<T, D2, Const<1>, SB>)

Performs the += operation. Read more
source§

impl<T, R1, C1, R2, C2, SA, SB> AddAssign<Matrix<T, R2, C2, SB>> for Matrix<T, R1, C1, SA>
where R1: Dim, C1: Dim, R2: Dim, C2: Dim, T: Scalar + ClosedAdd, SA: StorageMut<T, R1, C1>, SB: Storage<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfColumns<C1, C2>,

source§

fn add_assign(&mut self, rhs: Matrix<T, R2, C2, SB>)

Performs the += operation. Read more
source§

impl<T> Array1<T> for Matrix<T, Dyn, Const<1>, VecStorage<T, Dyn, Const<1>>>

source§

fn len(&self) -> usize

The number of heights on this storage.
source§

fn is_empty(&self) -> bool

Is this array empty?
source§

fn get_at(&self, i: usize) -> Option<&T>

Gets the i-th element of this array, if it exists.
source§

impl<T> Array2 for Matrix<T, Dyn, Dyn, VecStorage<T, Dyn, Dyn>>
where T: Scalar,

§

type Item = T

The type of heights.
source§

fn nrows(&self) -> usize

The number of rows of the heights grid.
source§

fn ncols(&self) -> usize

The number of columns of the heights grid.
source§

fn get( &self, i: usize, j: usize, ) -> <Matrix<T, Dyn, Dyn, VecStorage<T, Dyn, Dyn>> as Array2>::Item

Gets the height on the (i, j)-th cell of the height grid.
source§

fn set( &mut self, i: usize, j: usize, val: <Matrix<T, Dyn, Dyn, VecStorage<T, Dyn, Dyn>> as Array2>::Item, )

Sets the height on the (i, j)-th cell of the height grid.
source§

impl<N> AsBytes for Matrix<N, Const<2>, Const<1>, ArrayStorage<N, 2, 1>>
where N: RealField,

source§

fn as_bytes(&self) -> &[u8]

Converts self to a slice of bytes.
source§

impl<N> AsBytes for Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>
where N: RealField,

source§

fn as_bytes(&self) -> &[u8]

Converts self to a slice of bytes.
source§

impl<T, S> AsMut<[[T; 2]; 2]> for Matrix<T, Const<2>, Const<2>, S>
where T: Scalar, S: RawStorageMut<T, Const<2>, Const<2>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 2]; 2]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 2]; 3]> for Matrix<T, Const<2>, Const<3>, S>
where T: Scalar, S: RawStorageMut<T, Const<2>, Const<3>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 2]; 3]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 2]; 4]> for Matrix<T, Const<2>, Const<4>, S>
where T: Scalar, S: RawStorageMut<T, Const<2>, Const<4>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 2]; 4]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 2]; 5]> for Matrix<T, Const<2>, Const<5>, S>
where T: Scalar, S: RawStorageMut<T, Const<2>, Const<5>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 2]; 5]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 2]; 6]> for Matrix<T, Const<2>, Const<6>, S>
where T: Scalar, S: RawStorageMut<T, Const<2>, Const<6>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 2]; 6]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 3]; 2]> for Matrix<T, Const<3>, Const<2>, S>
where T: Scalar, S: RawStorageMut<T, Const<3>, Const<2>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 3]; 2]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 3]; 3]> for Matrix<T, Const<3>, Const<3>, S>
where T: Scalar, S: RawStorageMut<T, Const<3>, Const<3>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 3]; 3]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 3]; 4]> for Matrix<T, Const<3>, Const<4>, S>
where T: Scalar, S: RawStorageMut<T, Const<3>, Const<4>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 3]; 4]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 3]; 5]> for Matrix<T, Const<3>, Const<5>, S>
where T: Scalar, S: RawStorageMut<T, Const<3>, Const<5>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 3]; 5]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 3]; 6]> for Matrix<T, Const<3>, Const<6>, S>
where T: Scalar, S: RawStorageMut<T, Const<3>, Const<6>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 3]; 6]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 4]; 2]> for Matrix<T, Const<4>, Const<2>, S>
where T: Scalar, S: RawStorageMut<T, Const<4>, Const<2>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 4]; 2]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 4]; 3]> for Matrix<T, Const<4>, Const<3>, S>
where T: Scalar, S: RawStorageMut<T, Const<4>, Const<3>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 4]; 3]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 4]; 4]> for Matrix<T, Const<4>, Const<4>, S>
where T: Scalar, S: RawStorageMut<T, Const<4>, Const<4>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 4]; 4]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 4]; 5]> for Matrix<T, Const<4>, Const<5>, S>
where T: Scalar, S: RawStorageMut<T, Const<4>, Const<5>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 4]; 5]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 4]; 6]> for Matrix<T, Const<4>, Const<6>, S>
where T: Scalar, S: RawStorageMut<T, Const<4>, Const<6>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 4]; 6]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 5]; 2]> for Matrix<T, Const<5>, Const<2>, S>
where T: Scalar, S: RawStorageMut<T, Const<5>, Const<2>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 5]; 2]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 5]; 3]> for Matrix<T, Const<5>, Const<3>, S>
where T: Scalar, S: RawStorageMut<T, Const<5>, Const<3>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 5]; 3]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 5]; 4]> for Matrix<T, Const<5>, Const<4>, S>
where T: Scalar, S: RawStorageMut<T, Const<5>, Const<4>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 5]; 4]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 5]; 5]> for Matrix<T, Const<5>, Const<5>, S>
where T: Scalar, S: RawStorageMut<T, Const<5>, Const<5>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 5]; 5]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 5]; 6]> for Matrix<T, Const<5>, Const<6>, S>
where T: Scalar, S: RawStorageMut<T, Const<5>, Const<6>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 5]; 6]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 6]; 2]> for Matrix<T, Const<6>, Const<2>, S>
where T: Scalar, S: RawStorageMut<T, Const<6>, Const<2>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 6]; 2]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 6]; 3]> for Matrix<T, Const<6>, Const<3>, S>
where T: Scalar, S: RawStorageMut<T, Const<6>, Const<3>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 6]; 3]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 6]; 4]> for Matrix<T, Const<6>, Const<4>, S>
where T: Scalar, S: RawStorageMut<T, Const<6>, Const<4>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 6]; 4]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 6]; 5]> for Matrix<T, Const<6>, Const<5>, S>
where T: Scalar, S: RawStorageMut<T, Const<6>, Const<5>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 6]; 5]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[[T; 6]; 6]> for Matrix<T, Const<6>, Const<6>, S>
where T: Scalar, S: RawStorageMut<T, Const<6>, Const<6>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [[T; 6]; 6]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 1]> for Matrix<T, Const<1>, Const<1>, S>
where T: Scalar, S: RawStorageMut<T, Const<1>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 1]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 10]> for Matrix<T, Const<1>, Const<10>, S>
where T: Scalar, S: RawStorageMut<T, Const<1>, Const<10>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 10]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 10]> for Matrix<T, Const<10>, Const<1>, S>
where T: Scalar, S: RawStorageMut<T, Const<10>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 10]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 11]> for Matrix<T, Const<1>, Const<11>, S>
where T: Scalar, S: RawStorageMut<T, Const<1>, Const<11>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 11]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 11]> for Matrix<T, Const<11>, Const<1>, S>
where T: Scalar, S: RawStorageMut<T, Const<11>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 11]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 12]> for Matrix<T, Const<1>, Const<12>, S>
where T: Scalar, S: RawStorageMut<T, Const<1>, Const<12>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 12]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 12]> for Matrix<T, Const<12>, Const<1>, S>
where T: Scalar, S: RawStorageMut<T, Const<12>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 12]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 13]> for Matrix<T, Const<1>, Const<13>, S>
where T: Scalar, S: RawStorageMut<T, Const<1>, Const<13>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 13]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 13]> for Matrix<T, Const<13>, Const<1>, S>
where T: Scalar, S: RawStorageMut<T, Const<13>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 13]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 14]> for Matrix<T, Const<1>, Const<14>, S>
where T: Scalar, S: RawStorageMut<T, Const<1>, Const<14>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 14]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 14]> for Matrix<T, Const<14>, Const<1>, S>
where T: Scalar, S: RawStorageMut<T, Const<14>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 14]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 15]> for Matrix<T, Const<1>, Const<15>, S>
where T: Scalar, S: RawStorageMut<T, Const<1>, Const<15>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 15]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 15]> for Matrix<T, Const<15>, Const<1>, S>
where T: Scalar, S: RawStorageMut<T, Const<15>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 15]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 16]> for Matrix<T, Const<1>, Const<16>, S>
where T: Scalar, S: RawStorageMut<T, Const<1>, Const<16>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 16]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 16]> for Matrix<T, Const<16>, Const<1>, S>
where T: Scalar, S: RawStorageMut<T, Const<16>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 16]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 2]> for Matrix<T, Const<1>, Const<2>, S>
where T: Scalar, S: RawStorageMut<T, Const<1>, Const<2>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 2]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 2]> for Matrix<T, Const<2>, Const<1>, S>
where T: Scalar, S: RawStorageMut<T, Const<2>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 2]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 3]> for Matrix<T, Const<1>, Const<3>, S>
where T: Scalar, S: RawStorageMut<T, Const<1>, Const<3>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 3]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 3]> for Matrix<T, Const<3>, Const<1>, S>
where T: Scalar, S: RawStorageMut<T, Const<3>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 3]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 4]> for Matrix<T, Const<1>, Const<4>, S>
where T: Scalar, S: RawStorageMut<T, Const<1>, Const<4>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 4]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 4]> for Matrix<T, Const<4>, Const<1>, S>
where T: Scalar, S: RawStorageMut<T, Const<4>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 4]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 5]> for Matrix<T, Const<1>, Const<5>, S>
where T: Scalar, S: RawStorageMut<T, Const<1>, Const<5>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 5]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 5]> for Matrix<T, Const<5>, Const<1>, S>
where T: Scalar, S: RawStorageMut<T, Const<5>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 5]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 6]> for Matrix<T, Const<1>, Const<6>, S>
where T: Scalar, S: RawStorageMut<T, Const<1>, Const<6>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 6]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 6]> for Matrix<T, Const<6>, Const<1>, S>
where T: Scalar, S: RawStorageMut<T, Const<6>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 6]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 7]> for Matrix<T, Const<1>, Const<7>, S>
where T: Scalar, S: RawStorageMut<T, Const<1>, Const<7>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 7]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 7]> for Matrix<T, Const<7>, Const<1>, S>
where T: Scalar, S: RawStorageMut<T, Const<7>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 7]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 8]> for Matrix<T, Const<1>, Const<8>, S>
where T: Scalar, S: RawStorageMut<T, Const<1>, Const<8>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 8]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 8]> for Matrix<T, Const<8>, Const<1>, S>
where T: Scalar, S: RawStorageMut<T, Const<8>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 8]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 9]> for Matrix<T, Const<1>, Const<9>, S>
where T: Scalar, S: RawStorageMut<T, Const<1>, Const<9>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 9]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsMut<[T; 9]> for Matrix<T, Const<9>, Const<1>, S>
where T: Scalar, S: RawStorageMut<T, Const<9>> + IsContiguous,

source§

fn as_mut(&mut self) -> &mut [T; 9]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 2]; 2]> for Matrix<T, Const<2>, Const<2>, S>
where T: Scalar, S: RawStorage<T, Const<2>, Const<2>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 2]; 2]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 2]; 3]> for Matrix<T, Const<2>, Const<3>, S>
where T: Scalar, S: RawStorage<T, Const<2>, Const<3>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 2]; 3]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 2]; 4]> for Matrix<T, Const<2>, Const<4>, S>
where T: Scalar, S: RawStorage<T, Const<2>, Const<4>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 2]; 4]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 2]; 5]> for Matrix<T, Const<2>, Const<5>, S>
where T: Scalar, S: RawStorage<T, Const<2>, Const<5>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 2]; 5]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 2]; 6]> for Matrix<T, Const<2>, Const<6>, S>
where T: Scalar, S: RawStorage<T, Const<2>, Const<6>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 2]; 6]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 3]; 2]> for Matrix<T, Const<3>, Const<2>, S>
where T: Scalar, S: RawStorage<T, Const<3>, Const<2>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 3]; 2]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 3]; 3]> for Matrix<T, Const<3>, Const<3>, S>
where T: Scalar, S: RawStorage<T, Const<3>, Const<3>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 3]; 3]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 3]; 4]> for Matrix<T, Const<3>, Const<4>, S>
where T: Scalar, S: RawStorage<T, Const<3>, Const<4>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 3]; 4]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 3]; 5]> for Matrix<T, Const<3>, Const<5>, S>
where T: Scalar, S: RawStorage<T, Const<3>, Const<5>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 3]; 5]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 3]; 6]> for Matrix<T, Const<3>, Const<6>, S>
where T: Scalar, S: RawStorage<T, Const<3>, Const<6>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 3]; 6]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 4]; 2]> for Matrix<T, Const<4>, Const<2>, S>
where T: Scalar, S: RawStorage<T, Const<4>, Const<2>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 4]; 2]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 4]; 3]> for Matrix<T, Const<4>, Const<3>, S>
where T: Scalar, S: RawStorage<T, Const<4>, Const<3>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 4]; 3]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 4]; 4]> for Matrix<T, Const<4>, Const<4>, S>
where T: Scalar, S: RawStorage<T, Const<4>, Const<4>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 4]; 4]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 4]; 5]> for Matrix<T, Const<4>, Const<5>, S>
where T: Scalar, S: RawStorage<T, Const<4>, Const<5>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 4]; 5]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 4]; 6]> for Matrix<T, Const<4>, Const<6>, S>
where T: Scalar, S: RawStorage<T, Const<4>, Const<6>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 4]; 6]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 5]; 2]> for Matrix<T, Const<5>, Const<2>, S>
where T: Scalar, S: RawStorage<T, Const<5>, Const<2>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 5]; 2]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 5]; 3]> for Matrix<T, Const<5>, Const<3>, S>
where T: Scalar, S: RawStorage<T, Const<5>, Const<3>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 5]; 3]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 5]; 4]> for Matrix<T, Const<5>, Const<4>, S>
where T: Scalar, S: RawStorage<T, Const<5>, Const<4>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 5]; 4]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 5]; 5]> for Matrix<T, Const<5>, Const<5>, S>
where T: Scalar, S: RawStorage<T, Const<5>, Const<5>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 5]; 5]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 5]; 6]> for Matrix<T, Const<5>, Const<6>, S>
where T: Scalar, S: RawStorage<T, Const<5>, Const<6>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 5]; 6]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 6]; 2]> for Matrix<T, Const<6>, Const<2>, S>
where T: Scalar, S: RawStorage<T, Const<6>, Const<2>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 6]; 2]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 6]; 3]> for Matrix<T, Const<6>, Const<3>, S>
where T: Scalar, S: RawStorage<T, Const<6>, Const<3>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 6]; 3]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 6]; 4]> for Matrix<T, Const<6>, Const<4>, S>
where T: Scalar, S: RawStorage<T, Const<6>, Const<4>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 6]; 4]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 6]; 5]> for Matrix<T, Const<6>, Const<5>, S>
where T: Scalar, S: RawStorage<T, Const<6>, Const<5>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 6]; 5]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[[T; 6]; 6]> for Matrix<T, Const<6>, Const<6>, S>
where T: Scalar, S: RawStorage<T, Const<6>, Const<6>> + IsContiguous,

source§

fn as_ref(&self) -> &[[T; 6]; 6]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 1]> for Matrix<T, Const<1>, Const<1>, S>
where T: Scalar, S: RawStorage<T, Const<1>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 1]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 10]> for Matrix<T, Const<1>, Const<10>, S>
where T: Scalar, S: RawStorage<T, Const<1>, Const<10>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 10]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 10]> for Matrix<T, Const<10>, Const<1>, S>
where T: Scalar, S: RawStorage<T, Const<10>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 10]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 11]> for Matrix<T, Const<1>, Const<11>, S>
where T: Scalar, S: RawStorage<T, Const<1>, Const<11>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 11]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 11]> for Matrix<T, Const<11>, Const<1>, S>
where T: Scalar, S: RawStorage<T, Const<11>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 11]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 12]> for Matrix<T, Const<1>, Const<12>, S>
where T: Scalar, S: RawStorage<T, Const<1>, Const<12>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 12]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 12]> for Matrix<T, Const<12>, Const<1>, S>
where T: Scalar, S: RawStorage<T, Const<12>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 12]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 13]> for Matrix<T, Const<1>, Const<13>, S>
where T: Scalar, S: RawStorage<T, Const<1>, Const<13>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 13]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 13]> for Matrix<T, Const<13>, Const<1>, S>
where T: Scalar, S: RawStorage<T, Const<13>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 13]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 14]> for Matrix<T, Const<1>, Const<14>, S>
where T: Scalar, S: RawStorage<T, Const<1>, Const<14>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 14]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 14]> for Matrix<T, Const<14>, Const<1>, S>
where T: Scalar, S: RawStorage<T, Const<14>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 14]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 15]> for Matrix<T, Const<1>, Const<15>, S>
where T: Scalar, S: RawStorage<T, Const<1>, Const<15>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 15]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 15]> for Matrix<T, Const<15>, Const<1>, S>
where T: Scalar, S: RawStorage<T, Const<15>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 15]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 16]> for Matrix<T, Const<1>, Const<16>, S>
where T: Scalar, S: RawStorage<T, Const<1>, Const<16>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 16]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 16]> for Matrix<T, Const<16>, Const<1>, S>
where T: Scalar, S: RawStorage<T, Const<16>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 16]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 2]> for Matrix<T, Const<1>, Const<2>, S>
where T: Scalar, S: RawStorage<T, Const<1>, Const<2>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 2]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 2]> for Matrix<T, Const<2>, Const<1>, S>
where T: Scalar, S: RawStorage<T, Const<2>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 2]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 3]> for Matrix<T, Const<1>, Const<3>, S>
where T: Scalar, S: RawStorage<T, Const<1>, Const<3>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 3]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 3]> for Matrix<T, Const<3>, Const<1>, S>
where T: Scalar, S: RawStorage<T, Const<3>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 3]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 4]> for Matrix<T, Const<1>, Const<4>, S>
where T: Scalar, S: RawStorage<T, Const<1>, Const<4>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 4]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 4]> for Matrix<T, Const<4>, Const<1>, S>
where T: Scalar, S: RawStorage<T, Const<4>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 4]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 5]> for Matrix<T, Const<1>, Const<5>, S>
where T: Scalar, S: RawStorage<T, Const<1>, Const<5>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 5]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 5]> for Matrix<T, Const<5>, Const<1>, S>
where T: Scalar, S: RawStorage<T, Const<5>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 5]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 6]> for Matrix<T, Const<1>, Const<6>, S>
where T: Scalar, S: RawStorage<T, Const<1>, Const<6>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 6]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 6]> for Matrix<T, Const<6>, Const<1>, S>
where T: Scalar, S: RawStorage<T, Const<6>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 6]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 7]> for Matrix<T, Const<1>, Const<7>, S>
where T: Scalar, S: RawStorage<T, Const<1>, Const<7>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 7]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 7]> for Matrix<T, Const<7>, Const<1>, S>
where T: Scalar, S: RawStorage<T, Const<7>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 7]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 8]> for Matrix<T, Const<1>, Const<8>, S>
where T: Scalar, S: RawStorage<T, Const<1>, Const<8>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 8]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 8]> for Matrix<T, Const<8>, Const<1>, S>
where T: Scalar, S: RawStorage<T, Const<8>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 8]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 9]> for Matrix<T, Const<1>, Const<9>, S>
where T: Scalar, S: RawStorage<T, Const<1>, Const<9>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 9]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, S> AsRef<[T; 9]> for Matrix<T, Const<9>, Const<1>, S>
where T: Scalar, S: RawStorage<T, Const<9>> + IsContiguous,

source§

fn as_ref(&self) -> &[T; 9]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, R, C, S> Binary for Matrix<T, R, C, S>
where R: Dim, C: Dim, T: Scalar + Binary, S: RawStorage<T, R, C>,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<T, S> Borrow<[[T; 2]; 2]> for Matrix<T, Const<2>, Const<2>, S>
where T: Scalar, S: RawStorage<T, Const<2>, Const<2>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 2]; 2]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 2]; 3]> for Matrix<T, Const<2>, Const<3>, S>
where T: Scalar, S: RawStorage<T, Const<2>, Const<3>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 2]; 3]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 2]; 4]> for Matrix<T, Const<2>, Const<4>, S>
where T: Scalar, S: RawStorage<T, Const<2>, Const<4>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 2]; 4]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 2]; 5]> for Matrix<T, Const<2>, Const<5>, S>
where T: Scalar, S: RawStorage<T, Const<2>, Const<5>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 2]; 5]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 2]; 6]> for Matrix<T, Const<2>, Const<6>, S>
where T: Scalar, S: RawStorage<T, Const<2>, Const<6>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 2]; 6]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 3]; 2]> for Matrix<T, Const<3>, Const<2>, S>
where T: Scalar, S: RawStorage<T, Const<3>, Const<2>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 3]; 2]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 3]; 3]> for Matrix<T, Const<3>, Const<3>, S>
where T: Scalar, S: RawStorage<T, Const<3>, Const<3>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 3]; 3]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 3]; 4]> for Matrix<T, Const<3>, Const<4>, S>
where T: Scalar, S: RawStorage<T, Const<3>, Const<4>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 3]; 4]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 3]; 5]> for Matrix<T, Const<3>, Const<5>, S>
where T: Scalar, S: RawStorage<T, Const<3>, Const<5>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 3]; 5]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 3]; 6]> for Matrix<T, Const<3>, Const<6>, S>
where T: Scalar, S: RawStorage<T, Const<3>, Const<6>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 3]; 6]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 4]; 2]> for Matrix<T, Const<4>, Const<2>, S>
where T: Scalar, S: RawStorage<T, Const<4>, Const<2>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 4]; 2]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 4]; 3]> for Matrix<T, Const<4>, Const<3>, S>
where T: Scalar, S: RawStorage<T, Const<4>, Const<3>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 4]; 3]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 4]; 4]> for Matrix<T, Const<4>, Const<4>, S>
where T: Scalar, S: RawStorage<T, Const<4>, Const<4>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 4]; 4]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 4]; 5]> for Matrix<T, Const<4>, Const<5>, S>
where T: Scalar, S: RawStorage<T, Const<4>, Const<5>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 4]; 5]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 4]; 6]> for Matrix<T, Const<4>, Const<6>, S>
where T: Scalar, S: RawStorage<T, Const<4>, Const<6>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 4]; 6]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 5]; 2]> for Matrix<T, Const<5>, Const<2>, S>
where T: Scalar, S: RawStorage<T, Const<5>, Const<2>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 5]; 2]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 5]; 3]> for Matrix<T, Const<5>, Const<3>, S>
where T: Scalar, S: RawStorage<T, Const<5>, Const<3>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 5]; 3]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 5]; 4]> for Matrix<T, Const<5>, Const<4>, S>
where T: Scalar, S: RawStorage<T, Const<5>, Const<4>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 5]; 4]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 5]; 5]> for Matrix<T, Const<5>, Const<5>, S>
where T: Scalar, S: RawStorage<T, Const<5>, Const<5>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 5]; 5]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 5]; 6]> for Matrix<T, Const<5>, Const<6>, S>
where T: Scalar, S: RawStorage<T, Const<5>, Const<6>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 5]; 6]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 6]; 2]> for Matrix<T, Const<6>, Const<2>, S>
where T: Scalar, S: RawStorage<T, Const<6>, Const<2>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 6]; 2]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 6]; 3]> for Matrix<T, Const<6>, Const<3>, S>
where T: Scalar, S: RawStorage<T, Const<6>, Const<3>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 6]; 3]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 6]; 4]> for Matrix<T, Const<6>, Const<4>, S>
where T: Scalar, S: RawStorage<T, Const<6>, Const<4>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 6]; 4]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 6]; 5]> for Matrix<T, Const<6>, Const<5>, S>
where T: Scalar, S: RawStorage<T, Const<6>, Const<5>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 6]; 5]

Immutably borrows from an owned value. Read more
source§

impl<T, S> Borrow<[[T; 6]; 6]> for Matrix<T, Const<6>, Const<6>, S>
where T: Scalar, S: RawStorage<T, Const<6>, Const<6>> + IsContiguous,

source§

fn borrow(&self) -> &[[T; 6]; 6]

Immutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 2]; 2]> for Matrix<T, Const<2>, Const<2>, S>
where T: Scalar, S: RawStorageMut<T, Const<2>, Const<2>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 2]; 2]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 2]; 3]> for Matrix<T, Const<2>, Const<3>, S>
where T: Scalar, S: RawStorageMut<T, Const<2>, Const<3>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 2]; 3]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 2]; 4]> for Matrix<T, Const<2>, Const<4>, S>
where T: Scalar, S: RawStorageMut<T, Const<2>, Const<4>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 2]; 4]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 2]; 5]> for Matrix<T, Const<2>, Const<5>, S>
where T: Scalar, S: RawStorageMut<T, Const<2>, Const<5>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 2]; 5]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 2]; 6]> for Matrix<T, Const<2>, Const<6>, S>
where T: Scalar, S: RawStorageMut<T, Const<2>, Const<6>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 2]; 6]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 3]; 2]> for Matrix<T, Const<3>, Const<2>, S>
where T: Scalar, S: RawStorageMut<T, Const<3>, Const<2>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 3]; 2]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 3]; 3]> for Matrix<T, Const<3>, Const<3>, S>
where T: Scalar, S: RawStorageMut<T, Const<3>, Const<3>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 3]; 3]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 3]; 4]> for Matrix<T, Const<3>, Const<4>, S>
where T: Scalar, S: RawStorageMut<T, Const<3>, Const<4>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 3]; 4]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 3]; 5]> for Matrix<T, Const<3>, Const<5>, S>
where T: Scalar, S: RawStorageMut<T, Const<3>, Const<5>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 3]; 5]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 3]; 6]> for Matrix<T, Const<3>, Const<6>, S>
where T: Scalar, S: RawStorageMut<T, Const<3>, Const<6>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 3]; 6]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 4]; 2]> for Matrix<T, Const<4>, Const<2>, S>
where T: Scalar, S: RawStorageMut<T, Const<4>, Const<2>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 4]; 2]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 4]; 3]> for Matrix<T, Const<4>, Const<3>, S>
where T: Scalar, S: RawStorageMut<T, Const<4>, Const<3>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 4]; 3]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 4]; 4]> for Matrix<T, Const<4>, Const<4>, S>
where T: Scalar, S: RawStorageMut<T, Const<4>, Const<4>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 4]; 4]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 4]; 5]> for Matrix<T, Const<4>, Const<5>, S>
where T: Scalar, S: RawStorageMut<T, Const<4>, Const<5>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 4]; 5]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 4]; 6]> for Matrix<T, Const<4>, Const<6>, S>
where T: Scalar, S: RawStorageMut<T, Const<4>, Const<6>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 4]; 6]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 5]; 2]> for Matrix<T, Const<5>, Const<2>, S>
where T: Scalar, S: RawStorageMut<T, Const<5>, Const<2>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 5]; 2]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 5]; 3]> for Matrix<T, Const<5>, Const<3>, S>
where T: Scalar, S: RawStorageMut<T, Const<5>, Const<3>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 5]; 3]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 5]; 4]> for Matrix<T, Const<5>, Const<4>, S>
where T: Scalar, S: RawStorageMut<T, Const<5>, Const<4>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 5]; 4]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 5]; 5]> for Matrix<T, Const<5>, Const<5>, S>
where T: Scalar, S: RawStorageMut<T, Const<5>, Const<5>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 5]; 5]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 5]; 6]> for Matrix<T, Const<5>, Const<6>, S>
where T: Scalar, S: RawStorageMut<T, Const<5>, Const<6>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 5]; 6]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 6]; 2]> for Matrix<T, Const<6>, Const<2>, S>
where T: Scalar, S: RawStorageMut<T, Const<6>, Const<2>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 6]; 2]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 6]; 3]> for Matrix<T, Const<6>, Const<3>, S>
where T: Scalar, S: RawStorageMut<T, Const<6>, Const<3>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 6]; 3]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 6]; 4]> for Matrix<T, Const<6>, Const<4>, S>
where T: Scalar, S: RawStorageMut<T, Const<6>, Const<4>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 6]; 4]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 6]; 5]> for Matrix<T, Const<6>, Const<5>, S>
where T: Scalar, S: RawStorageMut<T, Const<6>, Const<5>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 6]; 5]

Mutably borrows from an owned value. Read more
source§

impl<T, S> BorrowMut<[[T; 6]; 6]> for Matrix<T, Const<6>, Const<6>, S>
where T: Scalar, S: RawStorageMut<T, Const<6>, Const<6>> + IsContiguous,

source§

fn borrow_mut(&mut self) -> &mut [[T; 6]; 6]

Mutably borrows from an owned value. Read more
source§

impl<T, R, C> Bounded for Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where R: DimName, C: DimName, T: Scalar + Bounded, DefaultAllocator: Allocator<T, R, C>,

source§

fn max_value() -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

Returns the largest finite number this type can represent
source§

fn min_value() -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

Returns the smallest finite number this type can represent
source§

impl<T, R, C, S> Clone for Matrix<T, R, C, S>
where T: Clone, R: Clone, C: Clone, S: Clone,

source§

fn clone(&self) -> Matrix<T, R, C, S>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T, R, C, S> Debug for Matrix<T, R, C, S>
where R: Dim, C: Dim, S: Debug,

source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<T, R, C, S> Default for Matrix<T, R, C, S>
where T: Scalar, R: Dim, C: Dim, S: Default,

source§

fn default() -> Matrix<T, R, C, S>

Returns the “default value” for a type. Read more
source§

impl<T, S> Deref for Matrix<T, Const<1>, Const<1>, S>
where T: Scalar, S: RawStorage<T, Const<1>> + IsContiguous,

§

type Target = X<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<1>, Const<1>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<1>, Const<2>, S>
where T: Scalar, S: RawStorage<T, Const<1>, Const<2>> + IsContiguous,

§

type Target = XY<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<1>, Const<2>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<1>, Const<3>, S>
where T: Scalar, S: RawStorage<T, Const<1>, Const<3>> + IsContiguous,

§

type Target = XYZ<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<1>, Const<3>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<1>, Const<4>, S>
where T: Scalar, S: RawStorage<T, Const<1>, Const<4>> + IsContiguous,

§

type Target = XYZW<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<1>, Const<4>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<1>, Const<5>, S>
where T: Scalar, S: RawStorage<T, Const<1>, Const<5>> + IsContiguous,

§

type Target = XYZWA<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<1>, Const<5>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<1>, Const<6>, S>
where T: Scalar, S: RawStorage<T, Const<1>, Const<6>> + IsContiguous,

§

type Target = XYZWAB<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<1>, Const<6>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<2>, Const<1>, S>
where T: Scalar, S: RawStorage<T, Const<2>> + IsContiguous,

§

type Target = XY<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<2>, Const<1>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<2>, Const<2>, S>
where T: Scalar, S: RawStorage<T, Const<2>, Const<2>> + IsContiguous,

§

type Target = M2x2<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<2>, Const<2>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<2>, Const<3>, S>
where T: Scalar, S: RawStorage<T, Const<2>, Const<3>> + IsContiguous,

§

type Target = M2x3<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<2>, Const<3>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<2>, Const<4>, S>
where T: Scalar, S: RawStorage<T, Const<2>, Const<4>> + IsContiguous,

§

type Target = M2x4<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<2>, Const<4>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<2>, Const<5>, S>
where T: Scalar, S: RawStorage<T, Const<2>, Const<5>> + IsContiguous,

§

type Target = M2x5<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<2>, Const<5>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<2>, Const<6>, S>
where T: Scalar, S: RawStorage<T, Const<2>, Const<6>> + IsContiguous,

§

type Target = M2x6<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<2>, Const<6>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<3>, Const<1>, S>
where T: Scalar, S: RawStorage<T, Const<3>> + IsContiguous,

§

type Target = XYZ<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<3>, Const<1>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<3>, Const<2>, S>
where T: Scalar, S: RawStorage<T, Const<3>, Const<2>> + IsContiguous,

§

type Target = M3x2<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<3>, Const<2>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<3>, Const<3>, S>
where T: Scalar, S: RawStorage<T, Const<3>, Const<3>> + IsContiguous,

§

type Target = M3x3<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<3>, Const<3>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<3>, Const<4>, S>
where T: Scalar, S: RawStorage<T, Const<3>, Const<4>> + IsContiguous,

§

type Target = M3x4<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<3>, Const<4>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<3>, Const<5>, S>
where T: Scalar, S: RawStorage<T, Const<3>, Const<5>> + IsContiguous,

§

type Target = M3x5<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<3>, Const<5>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<3>, Const<6>, S>
where T: Scalar, S: RawStorage<T, Const<3>, Const<6>> + IsContiguous,

§

type Target = M3x6<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<3>, Const<6>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<4>, Const<1>, S>
where T: Scalar, S: RawStorage<T, Const<4>> + IsContiguous,

§

type Target = XYZW<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<4>, Const<1>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<4>, Const<2>, S>
where T: Scalar, S: RawStorage<T, Const<4>, Const<2>> + IsContiguous,

§

type Target = M4x2<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<4>, Const<2>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<4>, Const<3>, S>
where T: Scalar, S: RawStorage<T, Const<4>, Const<3>> + IsContiguous,

§

type Target = M4x3<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<4>, Const<3>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<4>, Const<4>, S>
where T: Scalar, S: RawStorage<T, Const<4>, Const<4>> + IsContiguous,

§

type Target = M4x4<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<4>, Const<4>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<4>, Const<5>, S>
where T: Scalar, S: RawStorage<T, Const<4>, Const<5>> + IsContiguous,

§

type Target = M4x5<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<4>, Const<5>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<4>, Const<6>, S>
where T: Scalar, S: RawStorage<T, Const<4>, Const<6>> + IsContiguous,

§

type Target = M4x6<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<4>, Const<6>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<5>, Const<1>, S>
where T: Scalar, S: RawStorage<T, Const<5>> + IsContiguous,

§

type Target = XYZWA<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<5>, Const<1>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<5>, Const<2>, S>
where T: Scalar, S: RawStorage<T, Const<5>, Const<2>> + IsContiguous,

§

type Target = M5x2<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<5>, Const<2>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<5>, Const<3>, S>
where T: Scalar, S: RawStorage<T, Const<5>, Const<3>> + IsContiguous,

§

type Target = M5x3<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<5>, Const<3>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<5>, Const<4>, S>
where T: Scalar, S: RawStorage<T, Const<5>, Const<4>> + IsContiguous,

§

type Target = M5x4<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<5>, Const<4>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<5>, Const<5>, S>
where T: Scalar, S: RawStorage<T, Const<5>, Const<5>> + IsContiguous,

§

type Target = M5x5<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<5>, Const<5>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<5>, Const<6>, S>
where T: Scalar, S: RawStorage<T, Const<5>, Const<6>> + IsContiguous,

§

type Target = M5x6<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<5>, Const<6>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<6>, Const<1>, S>
where T: Scalar, S: RawStorage<T, Const<6>> + IsContiguous,

§

type Target = XYZWAB<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<6>, Const<1>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<6>, Const<2>, S>
where T: Scalar, S: RawStorage<T, Const<6>, Const<2>> + IsContiguous,

§

type Target = M6x2<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<6>, Const<2>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<6>, Const<3>, S>
where T: Scalar, S: RawStorage<T, Const<6>, Const<3>> + IsContiguous,

§

type Target = M6x3<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<6>, Const<3>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<6>, Const<4>, S>
where T: Scalar, S: RawStorage<T, Const<6>, Const<4>> + IsContiguous,

§

type Target = M6x4<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<6>, Const<4>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<6>, Const<5>, S>
where T: Scalar, S: RawStorage<T, Const<6>, Const<5>> + IsContiguous,

§

type Target = M6x5<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<6>, Const<5>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> Deref for Matrix<T, Const<6>, Const<6>, S>
where T: Scalar, S: RawStorage<T, Const<6>, Const<6>> + IsContiguous,

§

type Target = M6x6<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Matrix<T, Const<6>, Const<6>, S> as Deref>::Target

Dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<1>, Const<1>, S>
where T: Scalar, S: RawStorageMut<T, Const<1>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<1>, Const<1>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<1>, Const<2>, S>
where T: Scalar, S: RawStorageMut<T, Const<1>, Const<2>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<1>, Const<2>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<1>, Const<3>, S>
where T: Scalar, S: RawStorageMut<T, Const<1>, Const<3>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<1>, Const<3>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<1>, Const<4>, S>
where T: Scalar, S: RawStorageMut<T, Const<1>, Const<4>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<1>, Const<4>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<1>, Const<5>, S>
where T: Scalar, S: RawStorageMut<T, Const<1>, Const<5>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<1>, Const<5>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<1>, Const<6>, S>
where T: Scalar, S: RawStorageMut<T, Const<1>, Const<6>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<1>, Const<6>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<2>, Const<1>, S>
where T: Scalar, S: RawStorageMut<T, Const<2>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<2>, Const<1>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<2>, Const<2>, S>
where T: Scalar, S: RawStorageMut<T, Const<2>, Const<2>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<2>, Const<2>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<2>, Const<3>, S>
where T: Scalar, S: RawStorageMut<T, Const<2>, Const<3>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<2>, Const<3>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<2>, Const<4>, S>
where T: Scalar, S: RawStorageMut<T, Const<2>, Const<4>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<2>, Const<4>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<2>, Const<5>, S>
where T: Scalar, S: RawStorageMut<T, Const<2>, Const<5>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<2>, Const<5>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<2>, Const<6>, S>
where T: Scalar, S: RawStorageMut<T, Const<2>, Const<6>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<2>, Const<6>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<3>, Const<1>, S>
where T: Scalar, S: RawStorageMut<T, Const<3>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<3>, Const<1>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<3>, Const<2>, S>
where T: Scalar, S: RawStorageMut<T, Const<3>, Const<2>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<3>, Const<2>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<3>, Const<3>, S>
where T: Scalar, S: RawStorageMut<T, Const<3>, Const<3>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<3>, Const<3>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<3>, Const<4>, S>
where T: Scalar, S: RawStorageMut<T, Const<3>, Const<4>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<3>, Const<4>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<3>, Const<5>, S>
where T: Scalar, S: RawStorageMut<T, Const<3>, Const<5>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<3>, Const<5>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<3>, Const<6>, S>
where T: Scalar, S: RawStorageMut<T, Const<3>, Const<6>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<3>, Const<6>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<4>, Const<1>, S>
where T: Scalar, S: RawStorageMut<T, Const<4>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<4>, Const<1>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<4>, Const<2>, S>
where T: Scalar, S: RawStorageMut<T, Const<4>, Const<2>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<4>, Const<2>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<4>, Const<3>, S>
where T: Scalar, S: RawStorageMut<T, Const<4>, Const<3>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<4>, Const<3>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<4>, Const<4>, S>
where T: Scalar, S: RawStorageMut<T, Const<4>, Const<4>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<4>, Const<4>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<4>, Const<5>, S>
where T: Scalar, S: RawStorageMut<T, Const<4>, Const<5>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<4>, Const<5>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<4>, Const<6>, S>
where T: Scalar, S: RawStorageMut<T, Const<4>, Const<6>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<4>, Const<6>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<5>, Const<1>, S>
where T: Scalar, S: RawStorageMut<T, Const<5>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<5>, Const<1>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<5>, Const<2>, S>
where T: Scalar, S: RawStorageMut<T, Const<5>, Const<2>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<5>, Const<2>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<5>, Const<3>, S>
where T: Scalar, S: RawStorageMut<T, Const<5>, Const<3>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<5>, Const<3>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<5>, Const<4>, S>
where T: Scalar, S: RawStorageMut<T, Const<5>, Const<4>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<5>, Const<4>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<5>, Const<5>, S>
where T: Scalar, S: RawStorageMut<T, Const<5>, Const<5>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<5>, Const<5>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<5>, Const<6>, S>
where T: Scalar, S: RawStorageMut<T, Const<5>, Const<6>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<5>, Const<6>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<6>, Const<1>, S>
where T: Scalar, S: RawStorageMut<T, Const<6>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<6>, Const<1>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<6>, Const<2>, S>
where T: Scalar, S: RawStorageMut<T, Const<6>, Const<2>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<6>, Const<2>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<6>, Const<3>, S>
where T: Scalar, S: RawStorageMut<T, Const<6>, Const<3>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<6>, Const<3>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<6>, Const<4>, S>
where T: Scalar, S: RawStorageMut<T, Const<6>, Const<4>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<6>, Const<4>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<6>, Const<5>, S>
where T: Scalar, S: RawStorageMut<T, Const<6>, Const<5>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<6>, Const<5>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, S> DerefMut for Matrix<T, Const<6>, Const<6>, S>
where T: Scalar, S: RawStorageMut<T, Const<6>, Const<6>> + IsContiguous,

source§

fn deref_mut( &mut self, ) -> &mut <Matrix<T, Const<6>, Const<6>, S> as Deref>::Target

Mutably dereferences the value.
source§

impl<T, R, C, S> Display for Matrix<T, R, C, S>
where R: Dim, C: Dim, T: Scalar + Display, S: RawStorage<T, R, C>,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'a, 'b, T, R1, C1, SA, const D2: usize> Div<&'b Rotation<T, D2>> for &'a Matrix<T, R1, C1, SA>
where T: Scalar + Zero + One + ClosedAdd + ClosedMul, R1: Dim, C1: Dim, SA: Storage<T, R1, C1>, DefaultAllocator: Allocator<T, R1, Const<D2>>, ShapeConstraint: AreMultipliable<R1, C1, Const<D2>, Const<D2>>,

§

type Output = Matrix<T, R1, Const<D2>, <DefaultAllocator as Allocator<T, R1, Const<D2>>>::Buffer>

The resulting type after applying the / operator.
source§

fn div( self, right: &'b Rotation<T, D2>, ) -> <&'a Matrix<T, R1, C1, SA> as Div<&'b Rotation<T, D2>>>::Output

Performs the / operation. Read more
source§

impl<'b, T, R1, C1, SA, const D2: usize> Div<&'b Rotation<T, D2>> for Matrix<T, R1, C1, SA>
where T: Scalar + Zero + One + ClosedAdd + ClosedMul, R1: Dim, C1: Dim, SA: Storage<T, R1, C1>, DefaultAllocator: Allocator<T, R1, Const<D2>>, ShapeConstraint: AreMultipliable<R1, C1, Const<D2>, Const<D2>>,

§

type Output = Matrix<T, R1, Const<D2>, <DefaultAllocator as Allocator<T, R1, Const<D2>>>::Buffer>

The resulting type after applying the / operator.
source§

fn div( self, right: &'b Rotation<T, D2>, ) -> <Matrix<T, R1, C1, SA> as Div<&'b Rotation<T, D2>>>::Output

Performs the / operation. Read more
source§

impl<'a, T, R1, C1, SA, const D2: usize> Div<Rotation<T, D2>> for &'a Matrix<T, R1, C1, SA>
where T: Scalar + Zero + One + ClosedAdd + ClosedMul, R1: Dim, C1: Dim, SA: Storage<T, R1, C1>, DefaultAllocator: Allocator<T, R1, Const<D2>>, ShapeConstraint: AreMultipliable<R1, C1, Const<D2>, Const<D2>>,

§

type Output = Matrix<T, R1, Const<D2>, <DefaultAllocator as Allocator<T, R1, Const<D2>>>::Buffer>

The resulting type after applying the / operator.
source§

fn div( self, right: Rotation<T, D2>, ) -> <&'a Matrix<T, R1, C1, SA> as Div<Rotation<T, D2>>>::Output

Performs the / operation. Read more
source§

impl<T, R1, C1, SA, const D2: usize> Div<Rotation<T, D2>> for Matrix<T, R1, C1, SA>
where T: Scalar + Zero + One + ClosedAdd + ClosedMul, R1: Dim, C1: Dim, SA: Storage<T, R1, C1>, DefaultAllocator: Allocator<T, R1, Const<D2>>, ShapeConstraint: AreMultipliable<R1, C1, Const<D2>, Const<D2>>,

§

type Output = Matrix<T, R1, Const<D2>, <DefaultAllocator as Allocator<T, R1, Const<D2>>>::Buffer>

The resulting type after applying the / operator.
source§

fn div( self, right: Rotation<T, D2>, ) -> <Matrix<T, R1, C1, SA> as Div<Rotation<T, D2>>>::Output

Performs the / operation. Read more
source§

impl<'a, T, R, C, S> Div<T> for &'a Matrix<T, R, C, S>
where R: Dim, C: Dim, T: Scalar + ClosedDiv, S: Storage<T, R, C>, DefaultAllocator: Allocator<T, R, C>,

§

type Output = Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

The resulting type after applying the / operator.
source§

fn div(self, rhs: T) -> <&'a Matrix<T, R, C, S> as Div<T>>::Output

Performs the / operation. Read more
source§

impl<T, R, C, S> Div<T> for Matrix<T, R, C, S>
where R: Dim, C: Dim, T: Scalar + ClosedDiv, S: Storage<T, R, C>, DefaultAllocator: Allocator<T, R, C>,

§

type Output = Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

The resulting type after applying the / operator.
source§

fn div(self, rhs: T) -> <Matrix<T, R, C, S> as Div<T>>::Output

Performs the / operation. Read more
source§

impl<'b, T, const R1: usize, const C1: usize> DivAssign<&'b Rotation<T, C1>> for Matrix<T, Const<R1>, Const<C1>, ArrayStorage<T, R1, C1>>
where T: Scalar + Zero + One + ClosedAdd + ClosedMul,

source§

fn div_assign(&mut self, right: &'b Rotation<T, C1>)

Performs the /= operation. Read more
source§

impl<T, const R1: usize, const C1: usize> DivAssign<Rotation<T, C1>> for Matrix<T, Const<R1>, Const<C1>, ArrayStorage<T, R1, C1>>
where T: Scalar + Zero + One + ClosedAdd + ClosedMul,

source§

fn div_assign(&mut self, right: Rotation<T, C1>)

Performs the /= operation. Read more
source§

impl<T, R, C, S> DivAssign<T> for Matrix<T, R, C, S>
where R: Dim, C: Dim, T: Scalar + ClosedDiv, S: StorageMut<T, R, C>,

source§

fn div_assign(&mut self, rhs: T)

Performs the /= operation. Read more
source§

impl<T, R, S, RV, SV> Extend<Matrix<T, RV, Const<1>, SV>> for Matrix<T, R, Dyn, S>
where T: Scalar, R: Dim, S: Extend<Matrix<T, RV, Const<1>, SV>>, RV: Dim, SV: RawStorage<T, RV>, ShapeConstraint: SameNumberOfRows<R, RV>,

source§

fn extend<I>(&mut self, iter: I)
where I: IntoIterator<Item = Matrix<T, RV, Const<1>, SV>>,

Extends the number of columns of a Matrix with Vectors from a given iterator.

§Example

let data = vec![0, 1, 2,          // column 1
                3, 4, 5];         // column 2

let mut matrix = DMatrix::from_vec(3, 2, data);

matrix.extend(
  vec![Vector3::new(6,  7,  8),   // column 3
       Vector3::new(9, 10, 11)]); // column 4

assert!(matrix.eq(&Matrix3x4::new(0, 3, 6,  9,
                                  1, 4, 7, 10,
                                  2, 5, 8, 11)));
§Panics

This function panics if the dimension of each Vector yielded by the given iterator is not equal to the number of rows of this Matrix.

let mut matrix =
  DMatrix::from_vec(3, 2,
                    vec![0, 1, 2,   // column 1
                         3, 4, 5]); // column 2

// The following panics because this matrix can only be extended with 3-dimensional vectors.
matrix.extend(
  vec![Vector2::new(6,  7)]); // too few dimensions!
let mut matrix =
  DMatrix::from_vec(3, 2,
                    vec![0, 1, 2,   // column 1
                         3, 4, 5]); // column 2

// The following panics because this matrix can only be extended with 3-dimensional vectors.
matrix.extend(
  vec![Vector4::new(6, 7, 8, 9)]); // too few dimensions!
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl<T, R, RV, SV> Extend<Matrix<T, RV, Const<1>, SV>> for VecStorage<T, R, Dyn>
where T: Scalar, R: Dim, RV: Dim, SV: RawStorage<T, RV>, ShapeConstraint: SameNumberOfRows<R, RV>,

source§

fn extend<I>(&mut self, iter: I)
where I: IntoIterator<Item = Matrix<T, RV, Const<1>, SV>>,

Extends the number of columns of the VecStorage with vectors from the given iterator.

§Panics

This function panics if the number of rows of each Vector yielded by the iterator is not equal to the number of rows of this VecStorage.

source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl<T, S> Extend<T> for Matrix<T, Dyn, Const<1>, S>
where T: Scalar, S: Extend<T>,

Extend the number of rows of the Vector with elements from a given iterator.

source§

fn extend<I>(&mut self, iter: I)
where I: IntoIterator<Item = T>,

Extend the number of rows of a Vector with elements from the given iterator.

§Example
let mut vector = DVector::from_vec(vec![0, 1, 2]);
vector.extend(vec![3, 4, 5]);
assert!(vector.eq(&DVector::from_vec(vec![0, 1, 2, 3, 4, 5])));
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl<T, R, S> Extend<T> for Matrix<T, R, Dyn, S>
where T: Scalar, R: Dim, S: Extend<T>,

Extend the number of columns of the Matrix with elements from a given iterator.

source§

fn extend<I>(&mut self, iter: I)
where I: IntoIterator<Item = T>,

Extend the number of columns of the Matrix with elements from the given iterator.

§Example

let data = vec![0, 1, 2,      // column 1
                3, 4, 5];     // column 2

let mut matrix = DMatrix::from_vec(3, 2, data);

matrix.extend(vec![6, 7, 8]); // column 3

assert!(matrix.eq(&Matrix3::new(0, 3, 6,
                                1, 4, 7,
                                2, 5, 8)));
§Panics

This function panics if the number of elements yielded by the given iterator is not a multiple of the number of rows of the Matrix.

let data = vec![0, 1, 2,  // column 1
                3, 4, 5]; // column 2

let mut matrix = DMatrix::from_vec(3, 2, data);

// The following panics because the vec length is not a multiple of 3.
matrix.extend(vec![6, 7, 8, 9]);
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl<'a, T> From<&'a [T]> for Matrix<T, Dyn, Const<1>, ViewStorage<'a, T, Dyn, Const<1>, Const<1>, Dyn>>
where T: Scalar + Copy,

source§

fn from( slice: &'a [T], ) -> Matrix<T, Dyn, Const<1>, ViewStorage<'a, T, Dyn, Const<1>, Const<1>, Dyn>>

Converts to this type from the input type.
source§

impl<'a, T, R, C, S> From<&'a Matrix<T, R, C, S>> for &'a [T]
where T: Scalar + Copy, R: Dim, C: Dim, S: RawStorage<T, R, C> + IsContiguous,

source§

fn from(matrix: &'a Matrix<T, R, C, S>) -> &'a [T]

Converts to this type from the input type.
source§

impl<'a, T, R, C, RView, CView, RStride, CStride, S> From<&'a Matrix<T, R, C, S>> for Matrix<T, RView, CView, ViewStorage<'a, T, RView, CView, RStride, CStride>>
where R: Dim, C: Dim, RView: Dim, CView: Dim, RStride: Dim, CStride: Dim, S: RawStorage<T, R, C>, ShapeConstraint: DimEq<R, RView> + DimEq<C, CView> + DimEq<RStride, <S as RawStorage<T, R, C>>::RStride> + DimEq<CStride, <S as RawStorage<T, R, C>>::CStride>,

source§

fn from( m: &'a Matrix<T, R, C, S>, ) -> Matrix<T, RView, CView, ViewStorage<'a, T, RView, CView, RStride, CStride>>

Converts to this type from the input type.
source§

impl<'a, T> From<&'a mut [T]> for Matrix<T, Dyn, Const<1>, ViewStorageMut<'a, T, Dyn, Const<1>, Const<1>, Dyn>>
where T: Scalar + Copy,

source§

fn from( slice: &'a mut [T], ) -> Matrix<T, Dyn, Const<1>, ViewStorageMut<'a, T, Dyn, Const<1>, Const<1>, Dyn>>

Converts to this type from the input type.
source§

impl<'a, T, R, C, S> From<&'a mut Matrix<T, R, C, S>> for &'a mut [T]
where T: Scalar + Copy, R: Dim, C: Dim, S: RawStorageMut<T, R, C> + IsContiguous,

source§

fn from(matrix: &'a mut Matrix<T, R, C, S>) -> &'a mut [T]

Converts to this type from the input type.
source§

impl<'a, T, R, C, RView, CView, RStride, CStride, S> From<&'a mut Matrix<T, R, C, S>> for Matrix<T, RView, CView, ViewStorage<'a, T, RView, CView, RStride, CStride>>
where R: Dim, C: Dim, RView: Dim, CView: Dim, RStride: Dim, CStride: Dim, S: RawStorage<T, R, C>, ShapeConstraint: DimEq<R, RView> + DimEq<C, CView> + DimEq<RStride, <S as RawStorage<T, R, C>>::RStride> + DimEq<CStride, <S as RawStorage<T, R, C>>::CStride>,

source§

fn from( m: &'a mut Matrix<T, R, C, S>, ) -> Matrix<T, RView, CView, ViewStorage<'a, T, RView, CView, RStride, CStride>>

Converts to this type from the input type.
source§

impl<'a, T, R, C, RView, CView, RStride, CStride, S> From<&'a mut Matrix<T, R, C, S>> for Matrix<T, RView, CView, ViewStorageMut<'a, T, RView, CView, RStride, CStride>>
where R: Dim, C: Dim, RView: Dim, CView: Dim, RStride: Dim, CStride: Dim, S: RawStorageMut<T, R, C>, ShapeConstraint: DimEq<R, RView> + DimEq<C, CView> + DimEq<RStride, <S as RawStorage<T, R, C>>::RStride> + DimEq<CStride, <S as RawStorage<T, R, C>>::CStride>,

source§

fn from( m: &'a mut Matrix<T, R, C, S>, ) -> Matrix<T, RView, CView, ViewStorageMut<'a, T, RView, CView, RStride, CStride>>

Converts to this type from the input type.
source§

impl<T, const R: usize, const C: usize> From<[[T; R]; C]> for Matrix<T, Const<R>, Const<C>, ArrayStorage<T, R, C>>
where T: Scalar,

source§

fn from( arr: [[T; R]; C], ) -> Matrix<T, Const<R>, Const<C>, ArrayStorage<T, R, C>>

Converts to this type from the input type.
source§

impl<T, R, C> From<[Matrix<<T as SimdValue>::Element, R, C, <DefaultAllocator as Allocator<<T as SimdValue>::Element, R, C>>::Buffer>; 16]> for Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where T: Scalar + PrimitiveSimdValue + From<[<T as SimdValue>::Element; 16]>, R: Dim, C: Dim, <T as SimdValue>::Element: Scalar + SimdValue, DefaultAllocator: Allocator<T, R, C> + Allocator<<T as SimdValue>::Element, R, C>,

source§

fn from( arr: [Matrix<<T as SimdValue>::Element, R, C, <DefaultAllocator as Allocator<<T as SimdValue>::Element, R, C>>::Buffer>; 16], ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

Converts to this type from the input type.
source§

impl<T, R, C> From<[Matrix<<T as SimdValue>::Element, R, C, <DefaultAllocator as Allocator<<T as SimdValue>::Element, R, C>>::Buffer>; 2]> for Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where T: Scalar + PrimitiveSimdValue + From<[<T as SimdValue>::Element; 2]>, R: Dim, C: Dim, <T as SimdValue>::Element: Scalar + SimdValue, DefaultAllocator: Allocator<T, R, C> + Allocator<<T as SimdValue>::Element, R, C>,

source§

fn from( arr: [Matrix<<T as SimdValue>::Element, R, C, <DefaultAllocator as Allocator<<T as SimdValue>::Element, R, C>>::Buffer>; 2], ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

Converts to this type from the input type.
source§

impl<T, R, C> From<[Matrix<<T as SimdValue>::Element, R, C, <DefaultAllocator as Allocator<<T as SimdValue>::Element, R, C>>::Buffer>; 4]> for Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where T: Scalar + PrimitiveSimdValue + From<[<T as SimdValue>::Element; 4]>, R: Dim, C: Dim, <T as SimdValue>::Element: Scalar + SimdValue, DefaultAllocator: Allocator<T, R, C> + Allocator<<T as SimdValue>::Element, R, C>,

source§

fn from( arr: [Matrix<<T as SimdValue>::Element, R, C, <DefaultAllocator as Allocator<<T as SimdValue>::Element, R, C>>::Buffer>; 4], ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

Converts to this type from the input type.
source§

impl<T, R, C> From<[Matrix<<T as SimdValue>::Element, R, C, <DefaultAllocator as Allocator<<T as SimdValue>::Element, R, C>>::Buffer>; 8]> for Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where T: Scalar + PrimitiveSimdValue + From<[<T as SimdValue>::Element; 8]>, R: Dim, C: Dim, <T as SimdValue>::Element: Scalar + SimdValue, DefaultAllocator: Allocator<T, R, C> + Allocator<<T as SimdValue>::Element, R, C>,

source§

fn from( arr: [Matrix<<T as SimdValue>::Element, R, C, <DefaultAllocator as Allocator<<T as SimdValue>::Element, R, C>>::Buffer>; 8], ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

Converts to this type from the input type.
source§

impl<T, const D: usize> From<[T; D]> for Matrix<T, Const<1>, Const<D>, ArrayStorage<T, 1, D>>
where T: Scalar, Const<D>: IsNotStaticOne,

source§

fn from(arr: [T; D]) -> Matrix<T, Const<1>, Const<D>, ArrayStorage<T, 1, D>>

Converts to this type from the input type.
source§

impl<T, const D: usize> From<[T; D]> for Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>
where T: Scalar,

source§

fn from(arr: [T; D]) -> Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>

Converts to this type from the input type.
source§

impl From<BVec2> for Matrix<bool, Const<2>, Const<1>, ArrayStorage<bool, 2, 1>>

source§

fn from(e: BVec2) -> Matrix<bool, Const<2>, Const<1>, ArrayStorage<bool, 2, 1>>

Converts to this type from the input type.
source§

impl From<BVec3> for Matrix<bool, Const<3>, Const<1>, ArrayStorage<bool, 3, 1>>

source§

fn from(e: BVec3) -> Matrix<bool, Const<3>, Const<1>, ArrayStorage<bool, 3, 1>>

Converts to this type from the input type.
source§

impl From<BVec4> for Matrix<bool, Const<4>, Const<1>, ArrayStorage<bool, 4, 1>>

source§

fn from(e: BVec4) -> Matrix<bool, Const<4>, Const<1>, ArrayStorage<bool, 4, 1>>

Converts to this type from the input type.
source§

impl From<DMat2> for Matrix<f64, Const<2>, Const<2>, ArrayStorage<f64, 2, 2>>

source§

fn from(e: DMat2) -> Matrix<f64, Const<2>, Const<2>, ArrayStorage<f64, 2, 2>>

Converts to this type from the input type.
source§

impl From<DMat3> for Matrix<f64, Const<3>, Const<3>, ArrayStorage<f64, 3, 3>>

source§

fn from(e: DMat3) -> Matrix<f64, Const<3>, Const<3>, ArrayStorage<f64, 3, 3>>

Converts to this type from the input type.
source§

impl From<DMat4> for Matrix<f64, Const<4>, Const<4>, ArrayStorage<f64, 4, 4>>

source§

fn from(e: DMat4) -> Matrix<f64, Const<4>, Const<4>, ArrayStorage<f64, 4, 4>>

Converts to this type from the input type.
source§

impl From<DVec2> for Matrix<f64, Const<2>, Const<1>, ArrayStorage<f64, 2, 1>>

source§

fn from(e: DVec2) -> Matrix<f64, Const<2>, Const<1>, ArrayStorage<f64, 2, 1>>

Converts to this type from the input type.
source§

impl From<DVec3> for Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>

source§

fn from(e: DVec3) -> Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>

Converts to this type from the input type.
source§

impl From<DVec4> for Matrix<f64, Const<4>, Const<1>, ArrayStorage<f64, 4, 1>>

source§

fn from(e: DVec4) -> Matrix<f64, Const<4>, Const<1>, ArrayStorage<f64, 4, 1>>

Converts to this type from the input type.
source§

impl From<IVec2> for Matrix<i32, Const<2>, Const<1>, ArrayStorage<i32, 2, 1>>

source§

fn from(e: IVec2) -> Matrix<i32, Const<2>, Const<1>, ArrayStorage<i32, 2, 1>>

Converts to this type from the input type.
source§

impl From<IVec3> for Matrix<i32, Const<3>, Const<1>, ArrayStorage<i32, 3, 1>>

source§

fn from(e: IVec3) -> Matrix<i32, Const<3>, Const<1>, ArrayStorage<i32, 3, 1>>

Converts to this type from the input type.
source§

impl From<IVec4> for Matrix<i32, Const<4>, Const<1>, ArrayStorage<i32, 4, 1>>

source§

fn from(e: IVec4) -> Matrix<i32, Const<4>, Const<1>, ArrayStorage<i32, 4, 1>>

Converts to this type from the input type.
source§

impl<T, R, const D: usize> From<Isometry<T, R, D>> for Matrix<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>
where T: SimdRealField, Const<D>: DimNameAdd<Const<1>>, R: SubsetOf<Matrix<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>>, DefaultAllocator: Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>,

source§

fn from( iso: Isometry<T, R, D>, ) -> Matrix<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>

Converts to this type from the input type.
source§

impl From<Mat2> for Matrix<f32, Const<2>, Const<2>, ArrayStorage<f32, 2, 2>>

source§

fn from(e: Mat2) -> Matrix<f32, Const<2>, Const<2>, ArrayStorage<f32, 2, 2>>

Converts to this type from the input type.
source§

impl From<Mat3> for Matrix<f32, Const<3>, Const<3>, ArrayStorage<f32, 3, 3>>

source§

fn from(e: Mat3) -> Matrix<f32, Const<3>, Const<3>, ArrayStorage<f32, 3, 3>>

Converts to this type from the input type.
source§

impl From<Mat4> for Matrix<f32, Const<4>, Const<4>, ArrayStorage<f32, 4, 4>>

source§

fn from(e: Mat4) -> Matrix<f32, Const<4>, Const<4>, ArrayStorage<f32, 4, 4>>

Converts to this type from the input type.
source§

impl<T, const D: usize> From<Matrix<T, Const<1>, Const<D>, ArrayStorage<T, 1, D>>> for [T; D]
where T: Scalar, Const<D>: IsNotStaticOne,

source§

fn from(vec: Matrix<T, Const<1>, Const<D>, ArrayStorage<T, 1, D>>) -> [T; D]

Converts to this type from the input type.
source§

impl<T> From<Matrix<T, Const<4>, Const<1>, ArrayStorage<T, 4, 1>>> for Quaternion<T>
where T: Scalar,

source§

fn from( coords: Matrix<T, Const<4>, Const<1>, ArrayStorage<T, 4, 1>>, ) -> Quaternion<T>

Converts to this type from the input type.
source§

impl<T, const D: usize> From<Matrix<T, Const<D>, Const<1>, <DefaultAllocator as Allocator<T, Const<D>>>::Buffer>> for Scale<T, D>
where T: Scalar,

source§

fn from( vector: Matrix<T, Const<D>, Const<1>, <DefaultAllocator as Allocator<T, Const<D>>>::Buffer>, ) -> Scale<T, D>

Converts to this type from the input type.
source§

impl<T, const D: usize> From<Matrix<T, Const<D>, Const<1>, <DefaultAllocator as Allocator<T, Const<D>>>::Buffer>> for Translation<T, D>
where T: Scalar,

source§

fn from( vector: Matrix<T, Const<D>, Const<1>, <DefaultAllocator as Allocator<T, Const<D>>>::Buffer>, ) -> Translation<T, D>

Converts to this type from the input type.
source§

impl<T, const D: usize> From<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>> for [T; D]
where T: Scalar,

source§

fn from(vec: Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>) -> [T; D]

Converts to this type from the input type.
source§

impl<T, R, const D: usize> From<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>> for Isometry<T, R, D>
where T: SimdRealField, R: AbstractRotation<T, D>,

source§

fn from( coords: Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>, ) -> Isometry<T, R, D>

Converts to this type from the input type.
source§

impl<'a, T, RStride, CStride, const D: usize> From<Matrix<T, Const<D>, Const<1>, ViewStorage<'a, T, Const<D>, Const<1>, RStride, CStride>>> for [T; D]
where T: Scalar, RStride: Dim, CStride: Dim,

source§

fn from( vec: Matrix<T, Const<D>, Const<1>, ViewStorage<'a, T, Const<D>, Const<1>, RStride, CStride>>, ) -> [T; D]

Converts to this type from the input type.
source§

impl<'a, T, RStride, CStride, const D: usize> From<Matrix<T, Const<D>, Const<1>, ViewStorageMut<'a, T, Const<D>, Const<1>, RStride, CStride>>> for [T; D]
where T: Scalar, RStride: Dim, CStride: Dim,

source§

fn from( vec: Matrix<T, Const<D>, Const<1>, ViewStorageMut<'a, T, Const<D>, Const<1>, RStride, CStride>>, ) -> [T; D]

Converts to this type from the input type.
source§

impl<T, const R: usize, const C: usize> From<Matrix<T, Const<R>, Const<C>, ArrayStorage<T, R, C>>> for [[T; R]; C]
where T: Scalar,

source§

fn from( mat: Matrix<T, Const<R>, Const<C>, ArrayStorage<T, R, C>>, ) -> [[T; R]; C]

Converts to this type from the input type.
source§

impl<'a, T, RStride, CStride, const R: usize, const C: usize> From<Matrix<T, Const<R>, Const<C>, ViewStorage<'a, T, Const<R>, Const<C>, RStride, CStride>>> for [[T; R]; C]
where T: Scalar, RStride: Dim, CStride: Dim,

source§

fn from( mat: Matrix<T, Const<R>, Const<C>, ViewStorage<'a, T, Const<R>, Const<C>, RStride, CStride>>, ) -> [[T; R]; C]

Converts to this type from the input type.
source§

impl<'a, T, RStride, CStride, const R: usize, const C: usize> From<Matrix<T, Const<R>, Const<C>, ViewStorage<'a, T, Const<R>, Const<C>, RStride, CStride>>> for Matrix<T, Const<R>, Const<C>, ArrayStorage<T, R, C>>
where T: Scalar, RStride: Dim, CStride: Dim,

source§

fn from( matrix_view: Matrix<T, Const<R>, Const<C>, ViewStorage<'a, T, Const<R>, Const<C>, RStride, CStride>>, ) -> Matrix<T, Const<R>, Const<C>, ArrayStorage<T, R, C>>

Converts to this type from the input type.
source§

impl<'a, T, RStride, CStride, const R: usize, const C: usize> From<Matrix<T, Const<R>, Const<C>, ViewStorageMut<'a, T, Const<R>, Const<C>, RStride, CStride>>> for [[T; R]; C]
where T: Scalar, RStride: Dim, CStride: Dim,

source§

fn from( mat: Matrix<T, Const<R>, Const<C>, ViewStorageMut<'a, T, Const<R>, Const<C>, RStride, CStride>>, ) -> [[T; R]; C]

Converts to this type from the input type.
source§

impl<'a, T, RStride, CStride, const R: usize, const C: usize> From<Matrix<T, Const<R>, Const<C>, ViewStorageMut<'a, T, Const<R>, Const<C>, RStride, CStride>>> for Matrix<T, Const<R>, Const<C>, ArrayStorage<T, R, C>>
where T: Scalar, RStride: Dim, CStride: Dim,

source§

fn from( matrix_view: Matrix<T, Const<R>, Const<C>, ViewStorageMut<'a, T, Const<R>, Const<C>, RStride, CStride>>, ) -> Matrix<T, Const<R>, Const<C>, ArrayStorage<T, R, C>>

Converts to this type from the input type.
source§

impl<T, D> From<Matrix<T, D, Const<1>, <DefaultAllocator as Allocator<T, D>>::Buffer>> for OPoint<T, D>

source§

fn from( coords: Matrix<T, D, Const<1>, <DefaultAllocator as Allocator<T, D>>::Buffer>, ) -> OPoint<T, D>

Converts to this type from the input type.
source§

impl<'a, T, C, RStride, CStride> From<Matrix<T, Dyn, C, ViewStorage<'a, T, Dyn, C, RStride, CStride>>> for Matrix<T, Dyn, C, VecStorage<T, Dyn, C>>
where T: Scalar, C: Dim, RStride: Dim, CStride: Dim,

source§

fn from( matrix_view: Matrix<T, Dyn, C, ViewStorage<'a, T, Dyn, C, RStride, CStride>>, ) -> Matrix<T, Dyn, C, VecStorage<T, Dyn, C>>

Converts to this type from the input type.
source§

impl<'a, T, C, RStride, CStride> From<Matrix<T, Dyn, C, ViewStorageMut<'a, T, Dyn, C, RStride, CStride>>> for Matrix<T, Dyn, C, VecStorage<T, Dyn, C>>
where T: Scalar, C: Dim, RStride: Dim, CStride: Dim,

source§

fn from( matrix_view: Matrix<T, Dyn, C, ViewStorageMut<'a, T, Dyn, C, RStride, CStride>>, ) -> Matrix<T, Dyn, C, VecStorage<T, Dyn, C>>

Converts to this type from the input type.
source§

impl<'a, T> From<Matrix<T, Dyn, Const<1>, ViewStorage<'a, T, Dyn, Const<1>, Const<1>, Dyn>>> for &'a [T]
where T: Scalar,

source§

fn from( vec: Matrix<T, Dyn, Const<1>, ViewStorage<'a, T, Dyn, Const<1>, Const<1>, Dyn>>, ) -> &'a [T]

Converts to this type from the input type.
source§

impl<'a, T> From<Matrix<T, Dyn, Const<1>, ViewStorageMut<'a, T, Dyn, Const<1>, Const<1>, Dyn>>> for &'a mut [T]
where T: Scalar,

source§

fn from( vec: Matrix<T, Dyn, Const<1>, ViewStorageMut<'a, T, Dyn, Const<1>, Const<1>, Dyn>>, ) -> &'a mut [T]

Converts to this type from the input type.
source§

impl<'a, T, R, C, RStride, CStride> From<Matrix<T, R, C, ViewStorageMut<'a, T, R, C, RStride, CStride>>> for Matrix<T, R, C, ViewStorage<'a, T, R, C, RStride, CStride>>
where R: Dim, C: Dim, RStride: Dim, CStride: Dim,

source§

fn from( view_mut: Matrix<T, R, C, ViewStorageMut<'a, T, R, C, RStride, CStride>>, ) -> Matrix<T, R, C, ViewStorage<'a, T, R, C, RStride, CStride>>

Converts to this type from the input type.
source§

impl<'a, T, R, RStride, CStride> From<Matrix<T, R, Dyn, ViewStorage<'a, T, R, Dyn, RStride, CStride>>> for Matrix<T, R, Dyn, VecStorage<T, R, Dyn>>
where T: Scalar, R: DimName, RStride: Dim, CStride: Dim,

source§

fn from( matrix_view: Matrix<T, R, Dyn, ViewStorage<'a, T, R, Dyn, RStride, CStride>>, ) -> Matrix<T, R, Dyn, VecStorage<T, R, Dyn>>

Converts to this type from the input type.
source§

impl<'a, T, R, RStride, CStride> From<Matrix<T, R, Dyn, ViewStorageMut<'a, T, R, Dyn, RStride, CStride>>> for Matrix<T, R, Dyn, VecStorage<T, R, Dyn>>
where T: Scalar, R: DimName, RStride: Dim, CStride: Dim,

source§

fn from( matrix_view: Matrix<T, R, Dyn, ViewStorageMut<'a, T, R, Dyn, RStride, CStride>>, ) -> Matrix<T, R, Dyn, VecStorage<T, R, Dyn>>

Converts to this type from the input type.
source§

impl<S> From<Matrix<bool, Const<2>, Const<1>, S>> for BVec2
where S: RawStorage<bool, Const<2>>,

source§

fn from(e: Matrix<bool, Const<2>, Const<1>, S>) -> BVec2

Converts to this type from the input type.
source§

impl<S> From<Matrix<bool, Const<3>, Const<1>, S>> for BVec3
where S: RawStorage<bool, Const<3>>,

source§

fn from(e: Matrix<bool, Const<3>, Const<1>, S>) -> BVec3

Converts to this type from the input type.
source§

impl<S> From<Matrix<bool, Const<4>, Const<1>, S>> for BVec4
where S: RawStorage<bool, Const<4>>,

source§

fn from(e: Matrix<bool, Const<4>, Const<1>, S>) -> BVec4

Converts to this type from the input type.
source§

impl<S> From<Matrix<f32, Const<2>, Const<1>, S>> for Vec2
where S: RawStorage<f32, Const<2>>,

source§

fn from(e: Matrix<f32, Const<2>, Const<1>, S>) -> Vec2

Converts to this type from the input type.
source§

impl<S> From<Matrix<f32, Const<2>, Const<2>, S>> for Mat2
where S: RawStorage<f32, Const<2>, Const<2>>,

source§

fn from(e: Matrix<f32, Const<2>, Const<2>, S>) -> Mat2

Converts to this type from the input type.
source§

impl<S> From<Matrix<f32, Const<3>, Const<1>, S>> for Vec3
where S: RawStorage<f32, Const<3>>,

source§

fn from(e: Matrix<f32, Const<3>, Const<1>, S>) -> Vec3

Converts to this type from the input type.
source§

impl<S> From<Matrix<f32, Const<3>, Const<1>, S>> for Vec3A
where S: RawStorage<f32, Const<3>>,

source§

fn from(e: Matrix<f32, Const<3>, Const<1>, S>) -> Vec3A

Converts to this type from the input type.
source§

impl<S> From<Matrix<f32, Const<3>, Const<3>, S>> for Mat3
where S: RawStorage<f32, Const<3>, Const<3>>,

source§

fn from(e: Matrix<f32, Const<3>, Const<3>, S>) -> Mat3

Converts to this type from the input type.
source§

impl<S> From<Matrix<f32, Const<4>, Const<1>, S>> for Vec4
where S: RawStorage<f32, Const<4>>,

source§

fn from(e: Matrix<f32, Const<4>, Const<1>, S>) -> Vec4

Converts to this type from the input type.
source§

impl<S> From<Matrix<f32, Const<4>, Const<4>, S>> for Mat4
where S: RawStorage<f32, Const<4>, Const<4>>,

source§

fn from(e: Matrix<f32, Const<4>, Const<4>, S>) -> Mat4

Converts to this type from the input type.
source§

impl<S> From<Matrix<f64, Const<2>, Const<1>, S>> for DVec2
where S: RawStorage<f64, Const<2>>,

source§

fn from(e: Matrix<f64, Const<2>, Const<1>, S>) -> DVec2

Converts to this type from the input type.
source§

impl<S> From<Matrix<f64, Const<2>, Const<2>, S>> for DMat2
where S: RawStorage<f64, Const<2>, Const<2>>,

source§

fn from(e: Matrix<f64, Const<2>, Const<2>, S>) -> DMat2

Converts to this type from the input type.
source§

impl<S> From<Matrix<f64, Const<3>, Const<1>, S>> for DVec3
where S: RawStorage<f64, Const<3>>,

source§

fn from(e: Matrix<f64, Const<3>, Const<1>, S>) -> DVec3

Converts to this type from the input type.
source§

impl<S> From<Matrix<f64, Const<3>, Const<3>, S>> for DMat3
where S: RawStorage<f64, Const<3>, Const<3>>,

source§

fn from(e: Matrix<f64, Const<3>, Const<3>, S>) -> DMat3

Converts to this type from the input type.
source§

impl<S> From<Matrix<f64, Const<4>, Const<1>, S>> for DVec4
where S: RawStorage<f64, Const<4>>,

source§

fn from(e: Matrix<f64, Const<4>, Const<1>, S>) -> DVec4

Converts to this type from the input type.
source§

impl<S> From<Matrix<f64, Const<4>, Const<4>, S>> for DMat4
where S: RawStorage<f64, Const<4>, Const<4>>,

source§

fn from(e: Matrix<f64, Const<4>, Const<4>, S>) -> DMat4

Converts to this type from the input type.
source§

impl<S> From<Matrix<i32, Const<2>, Const<1>, S>> for IVec2
where S: RawStorage<i32, Const<2>>,

source§

fn from(e: Matrix<i32, Const<2>, Const<1>, S>) -> IVec2

Converts to this type from the input type.
source§

impl<S> From<Matrix<i32, Const<3>, Const<1>, S>> for IVec3
where S: RawStorage<i32, Const<3>>,

source§

fn from(e: Matrix<i32, Const<3>, Const<1>, S>) -> IVec3

Converts to this type from the input type.
source§

impl<S> From<Matrix<i32, Const<4>, Const<1>, S>> for IVec4
where S: RawStorage<i32, Const<4>>,

source§

fn from(e: Matrix<i32, Const<4>, Const<1>, S>) -> IVec4

Converts to this type from the input type.
source§

impl<S> From<Matrix<u32, Const<2>, Const<1>, S>> for UVec2
where S: RawStorage<u32, Const<2>>,

source§

fn from(e: Matrix<u32, Const<2>, Const<1>, S>) -> UVec2

Converts to this type from the input type.
source§

impl<S> From<Matrix<u32, Const<3>, Const<1>, S>> for UVec3
where S: RawStorage<u32, Const<3>>,

source§

fn from(e: Matrix<u32, Const<3>, Const<1>, S>) -> UVec3

Converts to this type from the input type.
source§

impl<S> From<Matrix<u32, Const<4>, Const<1>, S>> for UVec4
where S: RawStorage<u32, Const<4>>,

source§

fn from(e: Matrix<u32, Const<4>, Const<1>, S>) -> UVec4

Converts to this type from the input type.
source§

impl<T, D> From<OPoint<T, D>> for Matrix<T, <D as DimNameAdd<Const<1>>>::Output, Const<1>, <DefaultAllocator as Allocator<T, <D as DimNameAdd<Const<1>>>::Output>>::Buffer>
where T: Scalar + Zero + One, D: DimName + DimNameAdd<Const<1>>, DefaultAllocator: Allocator<T, <D as DimNameAdd<Const<1>>>::Output> + Allocator<T, D>,

source§

fn from( t: OPoint<T, D>, ) -> Matrix<T, <D as DimNameAdd<Const<1>>>::Output, Const<1>, <DefaultAllocator as Allocator<T, <D as DimNameAdd<Const<1>>>::Output>>::Buffer>

Converts to this type from the input type.
source§

impl<T> From<Orthographic3<T>> for Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>
where T: RealField,

source§

fn from( orth: Orthographic3<T>, ) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>

Converts to this type from the input type.
source§

impl<T> From<Perspective3<T>> for Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>
where T: RealField,

source§

fn from( pers: Perspective3<T>, ) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>

Converts to this type from the input type.
source§

impl<T> From<Rotation<T, 2>> for Matrix<T, Const<2>, Const<2>, ArrayStorage<T, 2, 2>>
where T: RealField,

source§

fn from( q: Rotation<T, 2>, ) -> Matrix<T, Const<2>, Const<2>, ArrayStorage<T, 2, 2>>

Converts to this type from the input type.
source§

impl<T> From<Rotation<T, 2>> for Matrix<T, Const<3>, Const<3>, ArrayStorage<T, 3, 3>>
where T: RealField,

source§

fn from( q: Rotation<T, 2>, ) -> Matrix<T, Const<3>, Const<3>, ArrayStorage<T, 3, 3>>

Converts to this type from the input type.
source§

impl<T> From<Rotation<T, 3>> for Matrix<T, Const<3>, Const<3>, ArrayStorage<T, 3, 3>>
where T: RealField,

source§

fn from( q: Rotation<T, 3>, ) -> Matrix<T, Const<3>, Const<3>, ArrayStorage<T, 3, 3>>

Converts to this type from the input type.
source§

impl<T> From<Rotation<T, 3>> for Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>
where T: RealField,

source§

fn from( q: Rotation<T, 3>, ) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>

Converts to this type from the input type.
source§

impl<T, const D: usize> From<Scale<T, D>> for Matrix<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>
where T: Scalar + Zero + One, Const<D>: DimNameAdd<Const<1>>, DefaultAllocator: Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output> + Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output> + Allocator<T, Const<D>>,

source§

fn from( t: Scale<T, D>, ) -> Matrix<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>

Converts to this type from the input type.
source§

impl<T, R, const D: usize> From<Similarity<T, R, D>> for Matrix<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>
where T: SimdRealField, Const<D>: DimNameAdd<Const<1>>, R: SubsetOf<Matrix<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>>, DefaultAllocator: Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>,

source§

fn from( sim: Similarity<T, R, D>, ) -> Matrix<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>

Converts to this type from the input type.
source§

impl<T, C, const D: usize> From<Transform<T, C, D>> for Matrix<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>

source§

fn from( t: Transform<T, C, D>, ) -> Matrix<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>

Converts to this type from the input type.
source§

impl<T, const D: usize> From<Translation<T, D>> for Matrix<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>

source§

fn from( t: Translation<T, D>, ) -> Matrix<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>

Converts to this type from the input type.
source§

impl From<UVec2> for Matrix<u32, Const<2>, Const<1>, ArrayStorage<u32, 2, 1>>

source§

fn from(e: UVec2) -> Matrix<u32, Const<2>, Const<1>, ArrayStorage<u32, 2, 1>>

Converts to this type from the input type.
source§

impl From<UVec3> for Matrix<u32, Const<3>, Const<1>, ArrayStorage<u32, 3, 1>>

source§

fn from(e: UVec3) -> Matrix<u32, Const<3>, Const<1>, ArrayStorage<u32, 3, 1>>

Converts to this type from the input type.
source§

impl From<UVec4> for Matrix<u32, Const<4>, Const<1>, ArrayStorage<u32, 4, 1>>

source§

fn from(e: UVec4) -> Matrix<u32, Const<4>, Const<1>, ArrayStorage<u32, 4, 1>>

Converts to this type from the input type.
source§

impl<T> From<Unit<Complex<T>>> for Matrix<T, Const<2>, Const<2>, ArrayStorage<T, 2, 2>>

source§

fn from( q: Unit<Complex<T>>, ) -> Matrix<T, Const<2>, Const<2>, ArrayStorage<T, 2, 2>>

Converts to this type from the input type.
source§

impl<T> From<Unit<Complex<T>>> for Matrix<T, Const<3>, Const<3>, ArrayStorage<T, 3, 3>>

source§

fn from( q: Unit<Complex<T>>, ) -> Matrix<T, Const<3>, Const<3>, ArrayStorage<T, 3, 3>>

Converts to this type from the input type.
source§

impl<T> From<Unit<DualQuaternion<T>>> for Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>

source§

fn from( dq: Unit<DualQuaternion<T>>, ) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>

Converts to this type from the input type.
source§

impl<T> From<Unit<Quaternion<T>>> for Matrix<T, Const<3>, Const<3>, ArrayStorage<T, 3, 3>>

source§

fn from( q: Unit<Quaternion<T>>, ) -> Matrix<T, Const<3>, Const<3>, ArrayStorage<T, 3, 3>>

Converts to this type from the input type.
source§

impl<T> From<Unit<Quaternion<T>>> for Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>

source§

fn from( q: Unit<Quaternion<T>>, ) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>

Converts to this type from the input type.
source§

impl<'a, T> From<Vec<T>> for Matrix<T, Const<1>, Dyn, VecStorage<T, Const<1>, Dyn>>
where T: Scalar,

source§

fn from(vec: Vec<T>) -> Matrix<T, Const<1>, Dyn, VecStorage<T, Const<1>, Dyn>>

Converts to this type from the input type.
source§

impl<'a, T> From<Vec<T>> for Matrix<T, Dyn, Const<1>, VecStorage<T, Dyn, Const<1>>>
where T: Scalar,

source§

fn from(vec: Vec<T>) -> Matrix<T, Dyn, Const<1>, VecStorage<T, Dyn, Const<1>>>

Converts to this type from the input type.
source§

impl From<Vec2> for Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

source§

fn from(e: Vec2) -> Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

Converts to this type from the input type.
source§

impl From<Vec3> for Matrix<f32, Const<3>, Const<1>, ArrayStorage<f32, 3, 1>>

source§

fn from(e: Vec3) -> Matrix<f32, Const<3>, Const<1>, ArrayStorage<f32, 3, 1>>

Converts to this type from the input type.
source§

impl From<Vec3A> for Matrix<f32, Const<3>, Const<1>, ArrayStorage<f32, 3, 1>>

source§

fn from(e: Vec3A) -> Matrix<f32, Const<3>, Const<1>, ArrayStorage<f32, 3, 1>>

Converts to this type from the input type.
source§

impl From<Vec4> for Matrix<f32, Const<4>, Const<1>, ArrayStorage<f32, 4, 1>>

source§

fn from(e: Vec4) -> Matrix<f32, Const<4>, Const<1>, ArrayStorage<f32, 4, 1>>

Converts to this type from the input type.
source§

impl<T, R, C, S> Hash for Matrix<T, R, C, S>
where T: Scalar + Hash, R: Dim, C: Dim, S: RawStorage<T, R, C>,

source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<T, R, C, S> Index<(usize, usize)> for Matrix<T, R, C, S>
where R: Dim, C: Dim, S: RawStorage<T, R, C>,

§

type Output = T

The returned type after indexing.
source§

fn index( &self, ij: (usize, usize), ) -> &<Matrix<T, R, C, S> as Index<(usize, usize)>>::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<T, R, C, S> Index<usize> for Matrix<T, R, C, S>
where R: Dim, C: Dim, S: RawStorage<T, R, C>,

§

type Output = T

The returned type after indexing.
source§

fn index(&self, i: usize) -> &<Matrix<T, R, C, S> as Index<usize>>::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<T, R, C, S> IndexMut<(usize, usize)> for Matrix<T, R, C, S>
where R: Dim, C: Dim, S: RawStorageMut<T, R, C>,

source§

fn index_mut(&mut self, ij: (usize, usize)) -> &mut T

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<T, R, C, S> IndexMut<usize> for Matrix<T, R, C, S>
where R: Dim, C: Dim, S: RawStorageMut<T, R, C>,

source§

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

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<'a, T, R, C, S> IntoIterator for &'a Matrix<T, R, C, S>
where T: Scalar, R: Dim, C: Dim, S: RawStorage<T, R, C>,

§

type Item = &'a T

The type of the elements being iterated over.
§

type IntoIter = MatrixIter<'a, T, R, C, S>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> <&'a Matrix<T, R, C, S> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
source§

impl<'a, T, R, C, S> IntoIterator for &'a mut Matrix<T, R, C, S>
where T: Scalar, R: Dim, C: Dim, S: RawStorageMut<T, R, C>,

§

type Item = &'a mut T

The type of the elements being iterated over.
§

type IntoIter = MatrixIterMut<'a, T, R, C, S>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> <&'a mut Matrix<T, R, C, S> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
source§

impl<T, R, C, S> LowerExp for Matrix<T, R, C, S>
where R: Dim, C: Dim, T: Scalar + LowerExp, S: RawStorage<T, R, C>,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<T, R, C, S> LowerHex for Matrix<T, R, C, S>
where R: Dim, C: Dim, T: Scalar + LowerHex, S: RawStorage<T, R, C>,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'a, 'b, T, S> Mul<&'b Matrix<T, Const<2>, Const<1>, S>> for &'a Unit<Complex<T>>
where T: SimdRealField, S: Storage<T, Const<2>>, <T as SimdValue>::Element: SimdRealField,

§

type Output = Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: &'b Matrix<T, Const<2>, Const<1>, S>, ) -> <&'a Unit<Complex<T>> as Mul<&'b Matrix<T, Const<2>, Const<1>, S>>>::Output

Performs the * operation. Read more
source§

impl<'b, T, S> Mul<&'b Matrix<T, Const<2>, Const<1>, S>> for Unit<Complex<T>>
where T: SimdRealField, S: Storage<T, Const<2>>, <T as SimdValue>::Element: SimdRealField,

§

type Output = Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: &'b Matrix<T, Const<2>, Const<1>, S>, ) -> <Unit<Complex<T>> as Mul<&'b Matrix<T, Const<2>, Const<1>, S>>>::Output

Performs the * operation. Read more
source§

impl<'a, 'b, T, SB> Mul<&'b Matrix<T, Const<3>, Const<1>, SB>> for &'a Unit<DualQuaternion<T>>
where T: SimdRealField, SB: Storage<T, Const<3>>, <T as SimdValue>::Element: SimdRealField,

§

type Output = Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: &'b Matrix<T, Const<3>, Const<1>, SB>, ) -> <&'a Unit<DualQuaternion<T>> as Mul<&'b Matrix<T, Const<3>, Const<1>, SB>>>::Output

Performs the * operation. Read more
source§

impl<'a, 'b, T, SB> Mul<&'b Matrix<T, Const<3>, Const<1>, SB>> for &'a Unit<Quaternion<T>>
where T: SimdRealField, SB: Storage<T, Const<3>>, <T as SimdValue>::Element: SimdRealField,

§

type Output = Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: &'b Matrix<T, Const<3>, Const<1>, SB>, ) -> <&'a Unit<Quaternion<T>> as Mul<&'b Matrix<T, Const<3>, Const<1>, SB>>>::Output

Performs the * operation. Read more
source§

impl<'b, T, SB> Mul<&'b Matrix<T, Const<3>, Const<1>, SB>> for Unit<DualQuaternion<T>>
where T: SimdRealField, SB: Storage<T, Const<3>>, <T as SimdValue>::Element: SimdRealField,

§

type Output = Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: &'b Matrix<T, Const<3>, Const<1>, SB>, ) -> <Unit<DualQuaternion<T>> as Mul<&'b Matrix<T, Const<3>, Const<1>, SB>>>::Output

Performs the * operation. Read more
source§

impl<'b, T, SB> Mul<&'b Matrix<T, Const<3>, Const<1>, SB>> for Unit<Quaternion<T>>
where T: SimdRealField, SB: Storage<T, Const<3>>, <T as SimdValue>::Element: SimdRealField,

§

type Output = Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: &'b Matrix<T, Const<3>, Const<1>, SB>, ) -> <Unit<Quaternion<T>> as Mul<&'b Matrix<T, Const<3>, Const<1>, SB>>>::Output

Performs the * operation. Read more
source§

impl<'a, 'b, T, R, const D: usize> Mul<&'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>> for &'a Isometry<T, R, D>

§

type Output = Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, right: &'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>, ) -> <&'a Isometry<T, R, D> as Mul<&'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>>::Output

Performs the * operation. Read more
source§

impl<'a, 'b, T, const D: usize> Mul<&'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>> for &'a Scale<T, D>
where T: Scalar + ClosedMul, ShapeConstraint: SameNumberOfRows<Const<D>, Const<D>, Representative = Const<D>> + SameNumberOfColumns<Const<1>, Const<1>, Representative = Const<1>>,

§

type Output = Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, right: &'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>, ) -> <&'a Scale<T, D> as Mul<&'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>>::Output

Performs the * operation. Read more
source§

impl<'a, 'b, T, R, const D: usize> Mul<&'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>> for &'a Similarity<T, R, D>

§

type Output = Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, right: &'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>, ) -> <&'a Similarity<T, R, D> as Mul<&'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>>::Output

Performs the * operation. Read more
source§

impl<'a, 'b, T, C, const D: usize> Mul<&'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>> for &'a Transform<T, C, D>

§

type Output = Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: &'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>, ) -> <&'a Transform<T, C, D> as Mul<&'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>>::Output

Performs the * operation. Read more
source§

impl<'b, T, R, const D: usize> Mul<&'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>> for Isometry<T, R, D>

§

type Output = Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, right: &'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>, ) -> <Isometry<T, R, D> as Mul<&'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>>::Output

Performs the * operation. Read more
source§

impl<'b, T, const D: usize> Mul<&'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>> for Scale<T, D>
where T: Scalar + ClosedMul, ShapeConstraint: SameNumberOfRows<Const<D>, Const<D>, Representative = Const<D>> + SameNumberOfColumns<Const<1>, Const<1>, Representative = Const<1>>,

§

type Output = Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, right: &'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>, ) -> <Scale<T, D> as Mul<&'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>>::Output

Performs the * operation. Read more
source§

impl<'b, T, R, const D: usize> Mul<&'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>> for Similarity<T, R, D>

§

type Output = Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, right: &'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>, ) -> <Similarity<T, R, D> as Mul<&'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>>::Output

Performs the * operation. Read more
source§

impl<'b, T, C, const D: usize> Mul<&'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>> for Transform<T, C, D>

§

type Output = Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: &'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>, ) -> <Transform<T, C, D> as Mul<&'b Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>>::Output

Performs the * operation. Read more
source§

impl<'a, 'b, T, R1, C1, R2, C2, SA, SB> Mul<&'b Matrix<T, R2, C2, SB>> for &'a Matrix<T, R1, C1, SA>
where R1: Dim, C1: Dim, R2: Dim, C2: Dim, T: Scalar + Zero + One + ClosedAdd + ClosedMul, SA: Storage<T, R1, C1>, SB: Storage<T, R2, C2>, DefaultAllocator: Allocator<T, R1, C2>, ShapeConstraint: AreMultipliable<R1, C1, R2, C2>,

§

type Output = Matrix<T, R1, C2, <DefaultAllocator as Allocator<T, R1, C2>>::Buffer>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: &'b Matrix<T, R2, C2, SB>, ) -> <&'a Matrix<T, R1, C1, SA> as Mul<&'b Matrix<T, R2, C2, SB>>>::Output

Performs the * operation. Read more
source§

impl<'a, 'b, T, R2, C2, SB, const D1: usize> Mul<&'b Matrix<T, R2, C2, SB>> for &'a Rotation<T, D1>
where T: Scalar + Zero + One + ClosedAdd + ClosedMul, R2: Dim, C2: Dim, SB: Storage<T, R2, C2>, DefaultAllocator: Allocator<T, Const<D1>, C2>, ShapeConstraint: AreMultipliable<Const<D1>, Const<D1>, R2, C2>,

§

type Output = Matrix<T, Const<D1>, C2, <DefaultAllocator as Allocator<T, Const<D1>, C2>>::Buffer>

The resulting type after applying the * operator.
source§

fn mul( self, right: &'b Matrix<T, R2, C2, SB>, ) -> <&'a Rotation<T, D1> as Mul<&'b Matrix<T, R2, C2, SB>>>::Output

Performs the * operation. Read more
source§

impl<'b, T, R1, C1, R2, C2, SA, SB> Mul<&'b Matrix<T, R2, C2, SB>> for Matrix<T, R1, C1, SA>
where R1: Dim, C1: Dim, R2: Dim, C2: Dim, T: Scalar + Zero + One + ClosedAdd + ClosedMul, SB: Storage<T, R2, C2>, SA: Storage<T, R1, C1>, DefaultAllocator: Allocator<T, R1, C2>, ShapeConstraint: AreMultipliable<R1, C1, R2, C2>,

§

type Output = Matrix<T, R1, C2, <DefaultAllocator as Allocator<T, R1, C2>>::Buffer>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: &'b Matrix<T, R2, C2, SB>, ) -> <Matrix<T, R1, C1, SA> as Mul<&'b Matrix<T, R2, C2, SB>>>::Output

Performs the * operation. Read more
source§

impl<'b, T, R2, C2, SB, const D1: usize> Mul<&'b Matrix<T, R2, C2, SB>> for Rotation<T, D1>
where T: Scalar + Zero + One + ClosedAdd + ClosedMul, R2: Dim, C2: Dim, SB: Storage<T, R2, C2>, DefaultAllocator: Allocator<T, Const<D1>, C2>, ShapeConstraint: AreMultipliable<Const<D1>, Const<D1>, R2, C2>,

§

type Output = Matrix<T, Const<D1>, C2, <DefaultAllocator as Allocator<T, Const<D1>, C2>>::Buffer>

The resulting type after applying the * operator.
source§

fn mul( self, right: &'b Matrix<T, R2, C2, SB>, ) -> <Rotation<T, D1> as Mul<&'b Matrix<T, R2, C2, SB>>>::Output

Performs the * operation. Read more
source§

impl<'b, R, C, S> Mul<&'b Matrix<i64, R, C, S>> for i64
where R: Dim, C: Dim, S: Storage<i64, R, C>, DefaultAllocator: Allocator<i64, R, C>,

§

type Output = Matrix<i64, R, C, <DefaultAllocator as Allocator<i64, R, C>>::Buffer>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: &'b Matrix<i64, R, C, S>, ) -> <i64 as Mul<&'b Matrix<i64, R, C, S>>>::Output

Performs the * operation. Read more
source§

impl<'b, R, C, S> Mul<&'b Matrix<u32, R, C, S>> for u32
where R: Dim, C: Dim, S: Storage<u32, R, C>, DefaultAllocator: Allocator<u32, R, C>,

§

type Output = Matrix<u32, R, C, <DefaultAllocator as Allocator<u32, R, C>>::Buffer>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: &'b Matrix<u32, R, C, S>, ) -> <u32 as Mul<&'b Matrix<u32, R, C, S>>>::Output

Performs the * operation. Read more
source§

impl<'a, 'b, T, SA, const D2: usize, const R1: usize, const C1: usize> Mul<&'b OPoint<T, Const<D2>>> for &'a Matrix<T, Const<R1>, Const<C1>, SA>
where T: Scalar + Zero + One + ClosedAdd + ClosedMul, SA: Storage<T, Const<R1>, Const<C1>>, ShapeConstraint: AreMultipliable<Const<R1>, Const<C1>, Const<D2>, Const<1>>,

§

type Output = OPoint<T, Const<R1>>

The resulting type after applying the * operator.
source§

fn mul( self, right: &'b OPoint<T, Const<D2>>, ) -> <&'a Matrix<T, Const<R1>, Const<C1>, SA> as Mul<&'b OPoint<T, Const<D2>>>>::Output

Performs the * operation. Read more
source§

impl<'b, T, SA, const D2: usize, const R1: usize, const C1: usize> Mul<&'b OPoint<T, Const<D2>>> for Matrix<T, Const<R1>, Const<C1>, SA>
where T: Scalar + Zero + One + ClosedAdd + ClosedMul, SA: Storage<T, Const<R1>, Const<C1>>, ShapeConstraint: AreMultipliable<Const<R1>, Const<C1>, Const<D2>, Const<1>>,

§

type Output = OPoint<T, Const<R1>>

The resulting type after applying the * operator.
source§

fn mul( self, right: &'b OPoint<T, Const<D2>>, ) -> <Matrix<T, Const<R1>, Const<C1>, SA> as Mul<&'b OPoint<T, Const<D2>>>>::Output

Performs the * operation. Read more
source§

impl<'a, 'b, T, R1, C1, SA, const D2: usize> Mul<&'b Rotation<T, D2>> for &'a Matrix<T, R1, C1, SA>
where T: Scalar + Zero + One + ClosedAdd + ClosedMul, R1: Dim, C1: Dim, SA: Storage<T, R1, C1>, DefaultAllocator: Allocator<T, R1, Const<D2>>, ShapeConstraint: AreMultipliable<R1, C1, Const<D2>, Const<D2>>,

§

type Output = Matrix<T, R1, Const<D2>, <DefaultAllocator as Allocator<T, R1, Const<D2>>>::Buffer>

The resulting type after applying the * operator.
source§

fn mul( self, right: &'b Rotation<T, D2>, ) -> <&'a Matrix<T, R1, C1, SA> as Mul<&'b Rotation<T, D2>>>::Output

Performs the * operation. Read more
source§

impl<'b, T, R1, C1, SA, const D2: usize> Mul<&'b Rotation<T, D2>> for Matrix<T, R1, C1, SA>
where T: Scalar + Zero + One + ClosedAdd + ClosedMul, R1: Dim, C1: Dim, SA: Storage<T, R1, C1>, DefaultAllocator: Allocator<T, R1, Const<D2>>, ShapeConstraint: AreMultipliable<R1, C1, Const<D2>, Const<D2>>,

§

type Output = Matrix<T, R1, Const<D2>, <DefaultAllocator as Allocator<T, R1, Const<D2>>>::Buffer>

The resulting type after applying the * operator.
source§

fn mul( self, right: &'b Rotation<T, D2>, ) -> <Matrix<T, R1, C1, SA> as Mul<&'b Rotation<T, D2>>>::Output

Performs the * operation. Read more
source§

impl<N> Mul<Matrix<N, Const<2>, Const<1>, ArrayStorage<N, 2, 1>>> for SdpMatrix2<N>
where N: SimdRealField + Copy,

§

type Output = Matrix<N, Const<2>, Const<1>, ArrayStorage<N, 2, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: Matrix<N, Const<2>, Const<1>, ArrayStorage<N, 2, 1>>, ) -> <SdpMatrix2<N> as Mul<Matrix<N, Const<2>, Const<1>, ArrayStorage<N, 2, 1>>>>::Output

Performs the * operation. Read more
source§

impl<'a, T, S> Mul<Matrix<T, Const<2>, Const<1>, S>> for &'a Unit<Complex<T>>
where T: SimdRealField, S: Storage<T, Const<2>>, <T as SimdValue>::Element: SimdRealField,

§

type Output = Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: Matrix<T, Const<2>, Const<1>, S>, ) -> <&'a Unit<Complex<T>> as Mul<Matrix<T, Const<2>, Const<1>, S>>>::Output

Performs the * operation. Read more
source§

impl<T, S> Mul<Matrix<T, Const<2>, Const<1>, S>> for Unit<Complex<T>>
where T: SimdRealField, S: Storage<T, Const<2>>, <T as SimdValue>::Element: SimdRealField,

§

type Output = Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: Matrix<T, Const<2>, Const<1>, S>, ) -> <Unit<Complex<T>> as Mul<Matrix<T, Const<2>, Const<1>, S>>>::Output

Performs the * operation. Read more
source§

impl<'a, T, SB> Mul<Matrix<T, Const<3>, Const<1>, SB>> for &'a Unit<DualQuaternion<T>>
where T: SimdRealField, SB: Storage<T, Const<3>>, <T as SimdValue>::Element: SimdRealField,

§

type Output = Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: Matrix<T, Const<3>, Const<1>, SB>, ) -> <&'a Unit<DualQuaternion<T>> as Mul<Matrix<T, Const<3>, Const<1>, SB>>>::Output

Performs the * operation. Read more
source§

impl<'a, T, SB> Mul<Matrix<T, Const<3>, Const<1>, SB>> for &'a Unit<Quaternion<T>>
where T: SimdRealField, SB: Storage<T, Const<3>>, <T as SimdValue>::Element: SimdRealField,

§

type Output = Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: Matrix<T, Const<3>, Const<1>, SB>, ) -> <&'a Unit<Quaternion<T>> as Mul<Matrix<T, Const<3>, Const<1>, SB>>>::Output

Performs the * operation. Read more
source§

impl<T, SB> Mul<Matrix<T, Const<3>, Const<1>, SB>> for Unit<DualQuaternion<T>>
where T: SimdRealField, SB: Storage<T, Const<3>>, <T as SimdValue>::Element: SimdRealField,

§

type Output = Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: Matrix<T, Const<3>, Const<1>, SB>, ) -> <Unit<DualQuaternion<T>> as Mul<Matrix<T, Const<3>, Const<1>, SB>>>::Output

Performs the * operation. Read more
source§

impl<T, SB> Mul<Matrix<T, Const<3>, Const<1>, SB>> for Unit<Quaternion<T>>
where T: SimdRealField, SB: Storage<T, Const<3>>, <T as SimdValue>::Element: SimdRealField,

§

type Output = Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: Matrix<T, Const<3>, Const<1>, SB>, ) -> <Unit<Quaternion<T>> as Mul<Matrix<T, Const<3>, Const<1>, SB>>>::Output

Performs the * operation. Read more
source§

impl<'a, T, R, const D: usize> Mul<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>> for &'a Isometry<T, R, D>

§

type Output = Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, right: Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>, ) -> <&'a Isometry<T, R, D> as Mul<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>>::Output

Performs the * operation. Read more
source§

impl<'a, T, const D: usize> Mul<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>> for &'a Scale<T, D>
where T: Scalar + ClosedMul, ShapeConstraint: SameNumberOfRows<Const<D>, Const<D>, Representative = Const<D>> + SameNumberOfColumns<Const<1>, Const<1>, Representative = Const<1>>,

§

type Output = Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, right: Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>, ) -> <&'a Scale<T, D> as Mul<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>>::Output

Performs the * operation. Read more
source§

impl<'a, T, R, const D: usize> Mul<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>> for &'a Similarity<T, R, D>

§

type Output = Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, right: Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>, ) -> <&'a Similarity<T, R, D> as Mul<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>>::Output

Performs the * operation. Read more
source§

impl<'a, T, C, const D: usize> Mul<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>> for &'a Transform<T, C, D>

§

type Output = Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>, ) -> <&'a Transform<T, C, D> as Mul<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>>::Output

Performs the * operation. Read more
source§

impl<T, R, const D: usize> Mul<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>> for Isometry<T, R, D>

§

type Output = Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, right: Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>, ) -> <Isometry<T, R, D> as Mul<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>>::Output

Performs the * operation. Read more
source§

impl<T, const D: usize> Mul<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>> for Scale<T, D>
where T: Scalar + ClosedMul, ShapeConstraint: SameNumberOfRows<Const<D>, Const<D>, Representative = Const<D>> + SameNumberOfColumns<Const<1>, Const<1>, Representative = Const<1>>,

§

type Output = Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, right: Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>, ) -> <Scale<T, D> as Mul<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>>::Output

Performs the * operation. Read more
source§

impl<T, R, const D: usize> Mul<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>> for Similarity<T, R, D>

§

type Output = Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, right: Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>, ) -> <Similarity<T, R, D> as Mul<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>>::Output

Performs the * operation. Read more
source§

impl<T, C, const D: usize> Mul<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>> for Transform<T, C, D>

§

type Output = Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>, ) -> <Transform<T, C, D> as Mul<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>>::Output

Performs the * operation. Read more
source§

impl<'a, T, R1, C1, R2, C2, SA, SB> Mul<Matrix<T, R2, C2, SB>> for &'a Matrix<T, R1, C1, SA>
where R1: Dim, C1: Dim, R2: Dim, C2: Dim, T: Scalar + Zero + One + ClosedAdd + ClosedMul, SB: Storage<T, R2, C2>, SA: Storage<T, R1, C1>, DefaultAllocator: Allocator<T, R1, C2>, ShapeConstraint: AreMultipliable<R1, C1, R2, C2>,

§

type Output = Matrix<T, R1, C2, <DefaultAllocator as Allocator<T, R1, C2>>::Buffer>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: Matrix<T, R2, C2, SB>, ) -> <&'a Matrix<T, R1, C1, SA> as Mul<Matrix<T, R2, C2, SB>>>::Output

Performs the * operation. Read more
source§

impl<'a, T, R2, C2, SB, const D1: usize> Mul<Matrix<T, R2, C2, SB>> for &'a Rotation<T, D1>
where T: Scalar + Zero + One + ClosedAdd + ClosedMul, R2: Dim, C2: Dim, SB: Storage<T, R2, C2>, DefaultAllocator: Allocator<T, Const<D1>, C2>, ShapeConstraint: AreMultipliable<Const<D1>, Const<D1>, R2, C2>,

§

type Output = Matrix<T, Const<D1>, C2, <DefaultAllocator as Allocator<T, Const<D1>, C2>>::Buffer>

The resulting type after applying the * operator.
source§

fn mul( self, right: Matrix<T, R2, C2, SB>, ) -> <&'a Rotation<T, D1> as Mul<Matrix<T, R2, C2, SB>>>::Output

Performs the * operation. Read more
source§

impl<T, R1, C1, R2, C2, SA, SB> Mul<Matrix<T, R2, C2, SB>> for Matrix<T, R1, C1, SA>
where R1: Dim, C1: Dim, R2: Dim, C2: Dim, T: Scalar + Zero + One + ClosedAdd + ClosedMul, SB: Storage<T, R2, C2>, SA: Storage<T, R1, C1>, DefaultAllocator: Allocator<T, R1, C2>, ShapeConstraint: AreMultipliable<R1, C1, R2, C2>,

§

type Output = Matrix<T, R1, C2, <DefaultAllocator as Allocator<T, R1, C2>>::Buffer>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: Matrix<T, R2, C2, SB>, ) -> <Matrix<T, R1, C1, SA> as Mul<Matrix<T, R2, C2, SB>>>::Output

Performs the * operation. Read more
source§

impl<T, R2, C2, SB, const D1: usize> Mul<Matrix<T, R2, C2, SB>> for Rotation<T, D1>
where T: Scalar + Zero + One + ClosedAdd + ClosedMul, R2: Dim, C2: Dim, SB: Storage<T, R2, C2>, DefaultAllocator: Allocator<T, Const<D1>, C2>, ShapeConstraint: AreMultipliable<Const<D1>, Const<D1>, R2, C2>,

§

type Output = Matrix<T, Const<D1>, C2, <DefaultAllocator as Allocator<T, Const<D1>, C2>>::Buffer>

The resulting type after applying the * operator.
source§

fn mul( self, right: Matrix<T, R2, C2, SB>, ) -> <Rotation<T, D1> as Mul<Matrix<T, R2, C2, SB>>>::Output

Performs the * operation. Read more
source§

impl<R, C, S> Mul<Matrix<i64, R, C, S>> for i64
where R: Dim, C: Dim, S: Storage<i64, R, C>, DefaultAllocator: Allocator<i64, R, C>,

§

type Output = Matrix<i64, R, C, <DefaultAllocator as Allocator<i64, R, C>>::Buffer>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: Matrix<i64, R, C, S>, ) -> <i64 as Mul<Matrix<i64, R, C, S>>>::Output

Performs the * operation. Read more
source§

impl<R, C, S> Mul<Matrix<u32, R, C, S>> for u32
where R: Dim, C: Dim, S: Storage<u32, R, C>, DefaultAllocator: Allocator<u32, R, C>,

§

type Output = Matrix<u32, R, C, <DefaultAllocator as Allocator<u32, R, C>>::Buffer>

The resulting type after applying the * operator.
source§

fn mul( self, rhs: Matrix<u32, R, C, S>, ) -> <u32 as Mul<Matrix<u32, R, C, S>>>::Output

Performs the * operation. Read more
source§

impl<'a, T, SA, const D2: usize, const R1: usize, const C1: usize> Mul<OPoint<T, Const<D2>>> for &'a Matrix<T, Const<R1>, Const<C1>, SA>
where T: Scalar + Zero + One + ClosedAdd + ClosedMul, SA: Storage<T, Const<R1>, Const<C1>>, ShapeConstraint: AreMultipliable<Const<R1>, Const<C1>, Const<D2>, Const<1>>,

§

type Output = OPoint<T, Const<R1>>

The resulting type after applying the * operator.
source§

fn mul( self, right: OPoint<T, Const<D2>>, ) -> <&'a Matrix<T, Const<R1>, Const<C1>, SA> as Mul<OPoint<T, Const<D2>>>>::Output

Performs the * operation. Read more
source§

impl<T, SA, const D2: usize, const R1: usize, const C1: usize> Mul<OPoint<T, Const<D2>>> for Matrix<T, Const<R1>, Const<C1>, SA>
where T: Scalar + Zero + One + ClosedAdd + ClosedMul, SA: Storage<T, Const<R1>, Const<C1>>, ShapeConstraint: AreMultipliable<Const<R1>, Const<C1>, Const<D2>, Const<1>>,

§

type Output = OPoint<T, Const<R1>>

The resulting type after applying the * operator.
source§

fn mul( self, right: OPoint<T, Const<D2>>, ) -> <Matrix<T, Const<R1>, Const<C1>, SA> as Mul<OPoint<T, Const<D2>>>>::Output

Performs the * operation. Read more
source§

impl<'a, T, R1, C1, SA, const D2: usize> Mul<Rotation<T, D2>> for &'a Matrix<T, R1, C1, SA>
where T: Scalar + Zero + One + ClosedAdd + ClosedMul, R1: Dim, C1: Dim, SA: Storage<T, R1, C1>, DefaultAllocator: Allocator<T, R1, Const<D2>>, ShapeConstraint: AreMultipliable<R1, C1, Const<D2>, Const<D2>>,

§

type Output = Matrix<T, R1, Const<D2>, <DefaultAllocator as Allocator<T, R1, Const<D2>>>::Buffer>

The resulting type after applying the * operator.
source§

fn mul( self, right: Rotation<T, D2>, ) -> <&'a Matrix<T, R1, C1, SA> as Mul<Rotation<T, D2>>>::Output

Performs the * operation. Read more
source§

impl<T, R1, C1, SA, const D2: usize> Mul<Rotation<T, D2>> for Matrix<T, R1, C1, SA>
where T: Scalar + Zero + One + ClosedAdd + ClosedMul, R1: Dim, C1: Dim, SA: Storage<T, R1, C1>, DefaultAllocator: Allocator<T, R1, Const<D2>>, ShapeConstraint: AreMultipliable<R1, C1, Const<D2>, Const<D2>>,

§

type Output = Matrix<T, R1, Const<D2>, <DefaultAllocator as Allocator<T, R1, Const<D2>>>::Buffer>

The resulting type after applying the * operator.
source§

fn mul( self, right: Rotation<T, D2>, ) -> <Matrix<T, R1, C1, SA> as Mul<Rotation<T, D2>>>::Output

Performs the * operation. Read more
source§

impl<'a, T, R, C, S> Mul<T> for &'a Matrix<T, R, C, S>
where R: Dim, C: Dim, T: Scalar + ClosedMul, S: Storage<T, R, C>, DefaultAllocator: Allocator<T, R, C>,

§

type Output = Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: T) -> <&'a Matrix<T, R, C, S> as Mul<T>>::Output

Performs the * operation. Read more
source§

impl<T, R, C, S> Mul<T> for Matrix<T, R, C, S>
where R: Dim, C: Dim, T: Scalar + ClosedMul, S: Storage<T, R, C>, DefaultAllocator: Allocator<T, R, C>,

§

type Output = Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: T) -> <Matrix<T, R, C, S> as Mul<T>>::Output

Performs the * operation. Read more
source§

impl<'b, T, R1, C1, R2, SA, SB> MulAssign<&'b Matrix<T, R2, C1, SB>> for Matrix<T, R1, C1, SA>
where R1: Dim, C1: Dim, R2: Dim, T: Scalar + Zero + One + ClosedAdd + ClosedMul, SB: Storage<T, R2, C1>, SA: StorageMut<T, R1, C1> + IsContiguous + Clone, ShapeConstraint: AreMultipliable<R1, C1, R2, C1>, DefaultAllocator: Allocator<T, R1, C1, Buffer = SA>,

source§

fn mul_assign(&mut self, rhs: &'b Matrix<T, R2, C1, SB>)

Performs the *= operation. Read more
source§

impl<'b, T, const R1: usize, const C1: usize> MulAssign<&'b Rotation<T, C1>> for Matrix<T, Const<R1>, Const<C1>, ArrayStorage<T, R1, C1>>
where T: Scalar + Zero + One + ClosedAdd + ClosedMul,

source§

fn mul_assign(&mut self, right: &'b Rotation<T, C1>)

Performs the *= operation. Read more
source§

impl<T, R1, C1, R2, SA, SB> MulAssign<Matrix<T, R2, C1, SB>> for Matrix<T, R1, C1, SA>
where R1: Dim, C1: Dim, R2: Dim, T: Scalar + Zero + One + ClosedAdd + ClosedMul, SB: Storage<T, R2, C1>, SA: StorageMut<T, R1, C1> + IsContiguous + Clone, ShapeConstraint: AreMultipliable<R1, C1, R2, C1>, DefaultAllocator: Allocator<T, R1, C1, Buffer = SA>,

source§

fn mul_assign(&mut self, rhs: Matrix<T, R2, C1, SB>)

Performs the *= operation. Read more
source§

impl<T, const R1: usize, const C1: usize> MulAssign<Rotation<T, C1>> for Matrix<T, Const<R1>, Const<C1>, ArrayStorage<T, R1, C1>>
where T: Scalar + Zero + One + ClosedAdd + ClosedMul,

source§

fn mul_assign(&mut self, right: Rotation<T, C1>)

Performs the *= operation. Read more
source§

impl<T, R, C, S> MulAssign<T> for Matrix<T, R, C, S>
where R: Dim, C: Dim, T: Scalar + ClosedMul, S: StorageMut<T, R, C>,

source§

fn mul_assign(&mut self, rhs: T)

Performs the *= operation. Read more
source§

impl<'a, T, R, C, S> Neg for &'a Matrix<T, R, C, S>
where R: Dim, C: Dim, T: Scalar + ClosedNeg, S: Storage<T, R, C>, DefaultAllocator: Allocator<T, R, C>,

§

type Output = Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

The resulting type after applying the - operator.
source§

fn neg(self) -> <&'a Matrix<T, R, C, S> as Neg>::Output

Performs the unary - operation. Read more
source§

impl<T, R, C, S> Neg for Matrix<T, R, C, S>
where R: Dim, C: Dim, T: Scalar + ClosedNeg, S: Storage<T, R, C>, DefaultAllocator: Allocator<T, R, C>,

§

type Output = Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

The resulting type after applying the - operator.
source§

fn neg(self) -> <Matrix<T, R, C, S> as Neg>::Output

Performs the unary - operation. Read more
source§

impl<T, R, C> Normed for Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where T: SimdComplexField, R: Dim, C: Dim, DefaultAllocator: Allocator<T, R, C>,

§

type Norm = <T as SimdComplexField>::SimdRealField

The type of the norm.
source§

fn norm(&self) -> <T as SimdComplexField>::SimdRealField

Computes the norm.
source§

fn norm_squared(&self) -> <T as SimdComplexField>::SimdRealField

Computes the squared norm.
source§

fn scale_mut( &mut self, n: <Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer> as Normed>::Norm, )

Multiply self by n.
source§

fn unscale_mut( &mut self, n: <Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer> as Normed>::Norm, )

Divides self by n.
source§

impl<T, R, C, S> Octal for Matrix<T, R, C, S>
where R: Dim, C: Dim, T: Scalar + Octal, S: RawStorage<T, R, C>,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<T, D> One for Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>

source§

fn one() -> Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>

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

fn set_one(&mut self)

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

fn is_one(&self) -> bool
where Self: PartialEq,

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

impl<T, R, R2, C, C2, S, S2> PartialEq<Matrix<T, R2, C2, S2>> for Matrix<T, R, C, S>
where T: PartialEq, C: Dim, C2: Dim, R: Dim, R2: Dim, S: RawStorage<T, R, C>, S2: RawStorage<T, R2, C2>,

source§

fn eq(&self, right: &Matrix<T, R2, C2, S2>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T, R, C, S> PartialOrd for Matrix<T, R, C, S>
where R: Dim, C: Dim, T: Scalar + PartialOrd, S: RawStorage<T, R, C>,

source§

fn partial_cmp(&self, other: &Matrix<T, R, C, S>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
source§

fn lt(&self, right: &Matrix<T, R, C, S>) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
source§

fn le(&self, right: &Matrix<T, R, C, S>) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
source§

fn gt(&self, right: &Matrix<T, R, C, S>) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
source§

fn ge(&self, right: &Matrix<T, R, C, S>) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<T, R, C, S> Pointer for Matrix<T, R, C, S>
where R: Dim, C: Dim, T: Scalar + Pointer, S: RawStorage<T, R, C>,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'a, T, D> Product<&'a Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>> for Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>

source§

fn product<I>( iter: I, ) -> Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>
where I: Iterator<Item = &'a Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>>,

Method which takes an iterator and generates Self from the elements by multiplying the items.
source§

impl<T, D> Product for Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>

source§

fn product<I>( iter: I, ) -> Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>
where I: Iterator<Item = Matrix<T, D, D, <DefaultAllocator as Allocator<T, D, D>>::Buffer>>,

Method which takes an iterator and generates Self from the elements by multiplying the items.
source§

impl<T, R, C, S> RelativeEq for Matrix<T, R, C, S>
where R: Dim, C: Dim, T: Scalar + RelativeEq, S: Storage<T, R, C>, <T as AbsDiffEq>::Epsilon: Clone,

source§

fn default_max_relative() -> <Matrix<T, R, C, S> as AbsDiffEq>::Epsilon

The default relative tolerance for testing values that are far-apart. Read more
source§

fn relative_eq( &self, other: &Matrix<T, R, C, S>, epsilon: <Matrix<T, R, C, S> as AbsDiffEq>::Epsilon, max_relative: <Matrix<T, R, C, S> as AbsDiffEq>::Epsilon, ) -> bool

A test for equality that uses a relative comparison if the values are far apart.
§

fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool

The inverse of [RelativeEq::relative_eq].
§

impl<N> SimdBasis for Matrix<N, Const<2>, Const<1>, ArrayStorage<N, 2, 1>>
where N: SimdRealCopy,

§

type Basis = [Matrix<N, Const<2>, Const<1>, ArrayStorage<N, 2, 1>>; 1]

The type of the array of orthonormal vectors.
§

fn orthonormal_basis( self, ) -> [Matrix<N, Const<2>, Const<1>, ArrayStorage<N, 2, 1>>; 1]

Computes the vectors which, when combined with self, form an orthonormal basis.
§

fn orthonormal_vector( self, ) -> Matrix<N, Const<2>, Const<1>, ArrayStorage<N, 2, 1>>

Computes a vector orthogonal to self with a unit length (if self has a unit length).
§

impl<N> SimdBasis for Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>
where N: SimdRealCopy + SimdSign<N>,

§

type Basis = [Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>; 2]

The type of the array of orthonormal vectors.
§

fn orthonormal_basis( self, ) -> [Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>; 2]

Computes the vectors which, when combined with self, form an orthonormal basis.
§

fn orthonormal_vector( self, ) -> Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>

Computes a vector orthogonal to self with a unit length (if self has a unit length).
§

impl<N> SimdSign<Matrix<N, Const<2>, Const<1>, ArrayStorage<N, 2, 1>>> for Matrix<N, Const<2>, Const<1>, ArrayStorage<N, 2, 1>>
where N: Scalar + Copy + SimdSign<N>,

§

fn copy_sign_to( self, to: Matrix<N, Const<2>, Const<1>, ArrayStorage<N, 2, 1>>, ) -> Matrix<N, Const<2>, Const<1>, ArrayStorage<N, 2, 1>>

Copy the sign of each component of self to the corresponding component of to.
§

impl<N> SimdSign<Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>> for Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>
where N: Scalar + Copy + SimdSign<N>,

§

fn copy_sign_to( self, to: Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>, ) -> Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>

Copy the sign of each component of self to the corresponding component of to.
source§

impl<T, R, C> SimdValue for Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where T: Scalar + SimdValue, R: Dim, C: Dim, <T as SimdValue>::Element: Scalar, DefaultAllocator: Allocator<T, R, C> + Allocator<<T as SimdValue>::Element, R, C>,

§

type Element = Matrix<<T as SimdValue>::Element, R, C, <DefaultAllocator as Allocator<<T as SimdValue>::Element, R, C>>::Buffer>

The type of the elements of each lane of this SIMD value.
§

type SimdBool = <T as SimdValue>::SimdBool

Type of the result of comparing two SIMD values like self.
source§

fn lanes() -> usize

The number of lanes of this SIMD value.
source§

fn splat( val: <Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer> as SimdValue>::Element, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

Initializes an SIMD value with each lanes set to val.
source§

fn extract( &self, i: usize, ) -> <Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer> as SimdValue>::Element

Extracts the i-th lane of self. Read more
source§

unsafe fn extract_unchecked( &self, i: usize, ) -> <Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer> as SimdValue>::Element

Extracts the i-th lane of self without bound-checking.
source§

fn replace( &mut self, i: usize, val: <Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer> as SimdValue>::Element, )

Replaces the i-th lane of self by val. Read more
source§

unsafe fn replace_unchecked( &mut self, i: usize, val: <Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer> as SimdValue>::Element, )

Replaces the i-th lane of self by val without bound-checking.
source§

fn select( self, cond: <Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer> as SimdValue>::SimdBool, other: Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

Merges self and other depending on the lanes of cond. Read more
§

fn map_lanes(self, f: impl Fn(Self::Element) -> Self::Element) -> Self
where Self: Clone,

Applies a function to each lane of self. Read more
§

fn zip_map_lanes( self, b: Self, f: impl Fn(Self::Element, Self::Element) -> Self::Element, ) -> Self
where Self: Clone,

Applies a function to each lane of self paired with the corresponding lane of b. Read more
source§

impl<'a, 'b, T, D1, D2, SB> Sub<&'b Matrix<T, D2, Const<1>, SB>> for &'a OPoint<T, D1>
where T: Scalar + ClosedSub, ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<Const<1>, Const<1>, Representative = Const<1>>, D1: DimName, D2: Dim, SB: Storage<T, D2>, DefaultAllocator: Allocator<T, D1>,

§

type Output = OPoint<T, D1>

The resulting type after applying the - operator.
source§

fn sub( self, right: &'b Matrix<T, D2, Const<1>, SB>, ) -> <&'a OPoint<T, D1> as Sub<&'b Matrix<T, D2, Const<1>, SB>>>::Output

Performs the - operation. Read more
source§

impl<'b, T, D1, D2, SB> Sub<&'b Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>
where T: Scalar + ClosedSub, ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<Const<1>, Const<1>, Representative = Const<1>>, D1: DimName, D2: Dim, SB: Storage<T, D2>, DefaultAllocator: Allocator<T, D1>,

§

type Output = OPoint<T, D1>

The resulting type after applying the - operator.
source§

fn sub( self, right: &'b Matrix<T, D2, Const<1>, SB>, ) -> <OPoint<T, D1> as Sub<&'b Matrix<T, D2, Const<1>, SB>>>::Output

Performs the - operation. Read more
source§

impl<'a, 'b, T, R1, C1, R2, C2, SA, SB> Sub<&'b Matrix<T, R2, C2, SB>> for &'a Matrix<T, R1, C1, SA>
where R1: Dim, C1: Dim, R2: Dim, C2: Dim, T: Scalar + ClosedSub, SA: Storage<T, R1, C1>, SB: Storage<T, R2, C2>, DefaultAllocator: SameShapeAllocator<T, R1, C1, R2, C2>, ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfColumns<C1, C2>,

§

type Output = Matrix<T, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative, <DefaultAllocator as Allocator<T, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative>>::Buffer>

The resulting type after applying the - operator.
source§

fn sub( self, rhs: &'b Matrix<T, R2, C2, SB>, ) -> <&'a Matrix<T, R1, C1, SA> as Sub<&'b Matrix<T, R2, C2, SB>>>::Output

Performs the - operation. Read more
source§

impl<'b, T, R1, C1, R2, C2, SA, SB> Sub<&'b Matrix<T, R2, C2, SB>> for Matrix<T, R1, C1, SA>
where R1: Dim, C1: Dim, R2: Dim, C2: Dim, T: Scalar + ClosedSub, SA: Storage<T, R1, C1>, SB: Storage<T, R2, C2>, DefaultAllocator: SameShapeAllocator<T, R1, C1, R2, C2>, ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfColumns<C1, C2>,

§

type Output = Matrix<T, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative, <DefaultAllocator as Allocator<T, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative>>::Buffer>

The resulting type after applying the - operator.
source§

fn sub( self, rhs: &'b Matrix<T, R2, C2, SB>, ) -> <Matrix<T, R1, C1, SA> as Sub<&'b Matrix<T, R2, C2, SB>>>::Output

Performs the - operation. Read more
source§

impl<'a, T, D1, D2, SB> Sub<Matrix<T, D2, Const<1>, SB>> for &'a OPoint<T, D1>
where T: Scalar + ClosedSub, ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<Const<1>, Const<1>, Representative = Const<1>>, D1: DimName, D2: Dim, SB: Storage<T, D2>, DefaultAllocator: Allocator<T, D1>,

§

type Output = OPoint<T, D1>

The resulting type after applying the - operator.
source§

fn sub( self, right: Matrix<T, D2, Const<1>, SB>, ) -> <&'a OPoint<T, D1> as Sub<Matrix<T, D2, Const<1>, SB>>>::Output

Performs the - operation. Read more
source§

impl<T, D1, D2, SB> Sub<Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>
where T: Scalar + ClosedSub, ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<Const<1>, Const<1>, Representative = Const<1>>, D1: DimName, D2: Dim, SB: Storage<T, D2>, DefaultAllocator: Allocator<T, D1>,

§

type Output = OPoint<T, D1>

The resulting type after applying the - operator.
source§

fn sub( self, right: Matrix<T, D2, Const<1>, SB>, ) -> <OPoint<T, D1> as Sub<Matrix<T, D2, Const<1>, SB>>>::Output

Performs the - operation. Read more
source§

impl<'a, T, R1, C1, R2, C2, SA, SB> Sub<Matrix<T, R2, C2, SB>> for &'a Matrix<T, R1, C1, SA>
where R1: Dim, C1: Dim, R2: Dim, C2: Dim, T: Scalar + ClosedSub, SA: Storage<T, R1, C1>, SB: Storage<T, R2, C2>, DefaultAllocator: SameShapeAllocator<T, R2, C2, R1, C1>, ShapeConstraint: SameNumberOfRows<R2, R1> + SameNumberOfColumns<C2, C1>,

§

type Output = Matrix<T, <ShapeConstraint as SameNumberOfRows<R2, R1>>::Representative, <ShapeConstraint as SameNumberOfColumns<C2, C1>>::Representative, <DefaultAllocator as Allocator<T, <ShapeConstraint as SameNumberOfRows<R2, R1>>::Representative, <ShapeConstraint as SameNumberOfColumns<C2, C1>>::Representative>>::Buffer>

The resulting type after applying the - operator.
source§

fn sub( self, rhs: Matrix<T, R2, C2, SB>, ) -> <&'a Matrix<T, R1, C1, SA> as Sub<Matrix<T, R2, C2, SB>>>::Output

Performs the - operation. Read more
source§

impl<T, R1, C1, R2, C2, SA, SB> Sub<Matrix<T, R2, C2, SB>> for Matrix<T, R1, C1, SA>
where R1: Dim, C1: Dim, R2: Dim, C2: Dim, T: Scalar + ClosedSub, SA: Storage<T, R1, C1>, SB: Storage<T, R2, C2>, DefaultAllocator: SameShapeAllocator<T, R1, C1, R2, C2>, ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfColumns<C1, C2>,

§

type Output = Matrix<T, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative, <DefaultAllocator as Allocator<T, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative>>::Buffer>

The resulting type after applying the - operator.
source§

fn sub( self, rhs: Matrix<T, R2, C2, SB>, ) -> <Matrix<T, R1, C1, SA> as Sub<Matrix<T, R2, C2, SB>>>::Output

Performs the - operation. Read more
source§

impl<'b, T, D1, D2, SB> SubAssign<&'b Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>
where D1: DimName, D2: Dim, T: Scalar + ClosedSub, SB: Storage<T, D2>, ShapeConstraint: SameNumberOfRows<D1, D2>, DefaultAllocator: Allocator<T, D1>,

source§

fn sub_assign(&mut self, right: &'b Matrix<T, D2, Const<1>, SB>)

Performs the -= operation. Read more
source§

impl<'b, T, R1, C1, R2, C2, SA, SB> SubAssign<&'b Matrix<T, R2, C2, SB>> for Matrix<T, R1, C1, SA>
where R1: Dim, C1: Dim, R2: Dim, C2: Dim, T: Scalar + ClosedSub, SA: StorageMut<T, R1, C1>, SB: Storage<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfColumns<C1, C2>,

source§

fn sub_assign(&mut self, rhs: &'b Matrix<T, R2, C2, SB>)

Performs the -= operation. Read more
source§

impl<T, D1, D2, SB> SubAssign<Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>
where D1: DimName, D2: Dim, T: Scalar + ClosedSub, SB: Storage<T, D2>, ShapeConstraint: SameNumberOfRows<D1, D2>, DefaultAllocator: Allocator<T, D1>,

source§

fn sub_assign(&mut self, right: Matrix<T, D2, Const<1>, SB>)

Performs the -= operation. Read more
source§

impl<T, R1, C1, R2, C2, SA, SB> SubAssign<Matrix<T, R2, C2, SB>> for Matrix<T, R1, C1, SA>
where R1: Dim, C1: Dim, R2: Dim, C2: Dim, T: Scalar + ClosedSub, SA: StorageMut<T, R1, C1>, SB: Storage<T, R2, C2>, ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfColumns<C1, C2>,

source§

fn sub_assign(&mut self, rhs: Matrix<T, R2, C2, SB>)

Performs the -= operation. Read more
source§

impl<T1, T2, R, const D: usize> SubsetOf<Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>> for Isometry<T1, R, D>
where T1: RealField, T2: RealField + SupersetOf<T1>, R: AbstractRotation<T1, D> + SubsetOf<Matrix<T1, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T1, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>> + SubsetOf<Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>>, Const<D>: DimNameAdd<Const<1>> + DimMin<Const<D>, Output = Const<D>>, DefaultAllocator: Allocator<T1, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output> + Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>,

source§

fn to_superset( &self, ) -> Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>

The inclusion map: converts self to the equivalent element of its superset.
source§

fn is_in_subset( m: &Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>, ) -> bool

Checks if element is actually part of the subset Self (and can be converted to it).
source§

fn from_superset_unchecked( m: &Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>, ) -> Isometry<T1, R, D>

Use with care! Same as self.to_superset but without any property checks. Always succeeds.
§

fn from_superset(element: &T) -> Option<Self>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

impl<T1, T2, const D: usize> SubsetOf<Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>> for Rotation<T1, D>
where T1: RealField, T2: RealField + SupersetOf<T1>, Const<D>: DimNameAdd<Const<1>> + DimMin<Const<D>, Output = Const<D>>, DefaultAllocator: Allocator<T1, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output> + Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>,

source§

fn to_superset( &self, ) -> Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>

The inclusion map: converts self to the equivalent element of its superset.
source§

fn is_in_subset( m: &Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>, ) -> bool

Checks if element is actually part of the subset Self (and can be converted to it).
source§

fn from_superset_unchecked( m: &Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>, ) -> Rotation<T1, D>

Use with care! Same as self.to_superset but without any property checks. Always succeeds.
§

fn from_superset(element: &T) -> Option<Self>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

impl<T1, T2, const D: usize> SubsetOf<Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>> for Scale<T1, D>
where T1: RealField, T2: RealField + SupersetOf<T1>, Const<D>: DimNameAdd<Const<1>>, DefaultAllocator: Allocator<T1, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output> + Allocator<T1, <Const<D> as DimNameAdd<Const<1>>>::Output> + Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>,

source§

fn to_superset( &self, ) -> Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>

The inclusion map: converts self to the equivalent element of its superset.
source§

fn is_in_subset( m: &Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>, ) -> bool

Checks if element is actually part of the subset Self (and can be converted to it).
source§

fn from_superset_unchecked( m: &Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>, ) -> Scale<T1, D>

Use with care! Same as self.to_superset but without any property checks. Always succeeds.
§

fn from_superset(element: &T) -> Option<Self>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

impl<T1, T2, R, const D: usize> SubsetOf<Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>> for Similarity<T1, R, D>
where T1: RealField, T2: RealField + SupersetOf<T1>, R: AbstractRotation<T1, D> + SubsetOf<Matrix<T1, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T1, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>> + SubsetOf<Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>>, Const<D>: DimNameAdd<Const<1>> + DimMin<Const<D>, Output = Const<D>>, DefaultAllocator: Allocator<T1, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output> + Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>,

source§

fn to_superset( &self, ) -> Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>

The inclusion map: converts self to the equivalent element of its superset.
source§

fn is_in_subset( m: &Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>, ) -> bool

Checks if element is actually part of the subset Self (and can be converted to it).
source§

fn from_superset_unchecked( m: &Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>, ) -> Similarity<T1, R, D>

Use with care! Same as self.to_superset but without any property checks. Always succeeds.
§

fn from_superset(element: &T) -> Option<Self>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

impl<T1, T2, C, const D: usize> SubsetOf<Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>> for Transform<T1, C, D>
where T1: RealField + SubsetOf<T2>, T2: RealField, C: TCategory, Const<D>: DimNameAdd<Const<1>>, DefaultAllocator: Allocator<T1, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output> + Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>, <T1 as AbsDiffEq>::Epsilon: Copy, <T2 as AbsDiffEq>::Epsilon: Copy,

source§

fn to_superset( &self, ) -> Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>

The inclusion map: converts self to the equivalent element of its superset.
source§

fn is_in_subset( m: &Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>, ) -> bool

Checks if element is actually part of the subset Self (and can be converted to it).
source§

fn from_superset_unchecked( m: &Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>, ) -> Transform<T1, C, D>

Use with care! Same as self.to_superset but without any property checks. Always succeeds.
§

fn from_superset(element: &T) -> Option<Self>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

impl<T1, T2, const D: usize> SubsetOf<Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>> for Translation<T1, D>
where T1: RealField, T2: RealField + SupersetOf<T1>, Const<D>: DimNameAdd<Const<1>>, DefaultAllocator: Allocator<T1, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output> + Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>,

source§

fn to_superset( &self, ) -> Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>

The inclusion map: converts self to the equivalent element of its superset.
source§

fn is_in_subset( m: &Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>, ) -> bool

Checks if element is actually part of the subset Self (and can be converted to it).
source§

fn from_superset_unchecked( m: &Matrix<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output, <DefaultAllocator as Allocator<T2, <Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>>::Buffer>, ) -> Translation<T1, D>

Use with care! Same as self.to_superset but without any property checks. Always succeeds.
§

fn from_superset(element: &T) -> Option<Self>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

impl<T1, T2, D> SubsetOf<Matrix<T2, <D as DimNameAdd<Const<1>>>::Output, Const<1>, <DefaultAllocator as Allocator<T2, <D as DimNameAdd<Const<1>>>::Output>>::Buffer>> for OPoint<T1, D>
where D: DimNameAdd<Const<1>>, T1: Scalar, T2: Scalar + Zero + One + ClosedDiv + SupersetOf<T1>, DefaultAllocator: Allocator<T1, D> + Allocator<T2, D> + Allocator<T1, <D as DimNameAdd<Const<1>>>::Output> + Allocator<T2, <D as DimNameAdd<Const<1>>>::Output>,

source§

fn to_superset( &self, ) -> Matrix<T2, <D as DimNameAdd<Const<1>>>::Output, Const<1>, <DefaultAllocator as Allocator<T2, <D as DimNameAdd<Const<1>>>::Output>>::Buffer>

The inclusion map: converts self to the equivalent element of its superset.
source§

fn is_in_subset( v: &Matrix<T2, <D as DimNameAdd<Const<1>>>::Output, Const<1>, <DefaultAllocator as Allocator<T2, <D as DimNameAdd<Const<1>>>::Output>>::Buffer>, ) -> bool

Checks if element is actually part of the subset Self (and can be converted to it).
source§

fn from_superset_unchecked( v: &Matrix<T2, <D as DimNameAdd<Const<1>>>::Output, Const<1>, <DefaultAllocator as Allocator<T2, <D as DimNameAdd<Const<1>>>::Output>>::Buffer>, ) -> OPoint<T1, D>

Use with care! Same as self.to_superset but without any property checks. Always succeeds.
§

fn from_superset(element: &T) -> Option<Self>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

impl<T1, T2> SubsetOf<Matrix<T2, Const<3>, Const<3>, ArrayStorage<T2, 3, 3>>> for Unit<Complex<T1>>
where T1: RealField, T2: RealField + SupersetOf<T1>,

source§

fn to_superset(&self) -> Matrix<T2, Const<3>, Const<3>, ArrayStorage<T2, 3, 3>>

The inclusion map: converts self to the equivalent element of its superset.
source§

fn is_in_subset( m: &Matrix<T2, Const<3>, Const<3>, ArrayStorage<T2, 3, 3>>, ) -> bool

Checks if element is actually part of the subset Self (and can be converted to it).
source§

fn from_superset_unchecked( m: &Matrix<T2, Const<3>, Const<3>, ArrayStorage<T2, 3, 3>>, ) -> Unit<Complex<T1>>

Use with care! Same as self.to_superset but without any property checks. Always succeeds.
§

fn from_superset(element: &T) -> Option<Self>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

impl<T1, T2> SubsetOf<Matrix<T2, Const<4>, Const<4>, ArrayStorage<T2, 4, 4>>> for Unit<DualQuaternion<T1>>
where T1: RealField, T2: RealField + SupersetOf<T1>,

source§

fn to_superset(&self) -> Matrix<T2, Const<4>, Const<4>, ArrayStorage<T2, 4, 4>>

The inclusion map: converts self to the equivalent element of its superset.
source§

fn is_in_subset( m: &Matrix<T2, Const<4>, Const<4>, ArrayStorage<T2, 4, 4>>, ) -> bool

Checks if element is actually part of the subset Self (and can be converted to it).
source§

fn from_superset_unchecked( m: &Matrix<T2, Const<4>, Const<4>, ArrayStorage<T2, 4, 4>>, ) -> Unit<DualQuaternion<T1>>

Use with care! Same as self.to_superset but without any property checks. Always succeeds.
§

fn from_superset(element: &T) -> Option<Self>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

impl<T1, T2> SubsetOf<Matrix<T2, Const<4>, Const<4>, ArrayStorage<T2, 4, 4>>> for Unit<Quaternion<T1>>
where T1: RealField, T2: RealField + SupersetOf<T1>,

source§

fn to_superset(&self) -> Matrix<T2, Const<4>, Const<4>, ArrayStorage<T2, 4, 4>>

The inclusion map: converts self to the equivalent element of its superset.
source§

fn is_in_subset( m: &Matrix<T2, Const<4>, Const<4>, ArrayStorage<T2, 4, 4>>, ) -> bool

Checks if element is actually part of the subset Self (and can be converted to it).
source§

fn from_superset_unchecked( m: &Matrix<T2, Const<4>, Const<4>, ArrayStorage<T2, 4, 4>>, ) -> Unit<Quaternion<T1>>

Use with care! Same as self.to_superset but without any property checks. Always succeeds.
§

fn from_superset(element: &T) -> Option<Self>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

impl<T1, T2, R1, C1, R2, C2> SubsetOf<Matrix<T2, R2, C2, <DefaultAllocator as Allocator<T2, R2, C2>>::Buffer>> for Matrix<T1, R1, C1, <DefaultAllocator as Allocator<T1, R1, C1>>::Buffer>
where R1: Dim, C1: Dim, R2: Dim, C2: Dim, T1: Scalar, T2: Scalar + SupersetOf<T1>, DefaultAllocator: Allocator<T2, R2, C2> + Allocator<T1, R1, C1> + SameShapeAllocator<T1, R1, C1, R2, C2>, ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfColumns<C1, C2>,

source§

fn to_superset( &self, ) -> Matrix<T2, R2, C2, <DefaultAllocator as Allocator<T2, R2, C2>>::Buffer>

The inclusion map: converts self to the equivalent element of its superset.
source§

fn is_in_subset( m: &Matrix<T2, R2, C2, <DefaultAllocator as Allocator<T2, R2, C2>>::Buffer>, ) -> bool

Checks if element is actually part of the subset Self (and can be converted to it).
source§

fn from_superset_unchecked( m: &Matrix<T2, R2, C2, <DefaultAllocator as Allocator<T2, R2, C2>>::Buffer>, ) -> Matrix<T1, R1, C1, <DefaultAllocator as Allocator<T1, R1, C1>>::Buffer>

Use with care! Same as self.to_superset but without any property checks. Always succeeds.
§

fn from_superset(element: &T) -> Option<Self>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

impl<'a, T, C> Sum<&'a Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>> for Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>

source§

fn sum<I>( iter: I, ) -> Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>
where I: Iterator<Item = &'a Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>>,

§Example
let v = &DVector::repeat(3, 1.0f64);

assert_eq!(vec![v, v, v].into_iter().sum::<DVector<f64>>(),
           v + v + v);
§Panics

Panics if the iterator is empty:

iter::empty::<&DMatrix<f64>>().sum::<DMatrix<f64>>(); // panics!
source§

impl<'a, T, R, C> Sum<&'a Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>> for Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where R: DimName, C: DimName, T: Scalar + ClosedAdd + Zero, DefaultAllocator: Allocator<T, R, C>,

source§

fn sum<I>( iter: I, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where I: Iterator<Item = &'a Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>>,

Method which takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl<T, C> Sum for Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>

source§

fn sum<I>( iter: I, ) -> Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>
where I: Iterator<Item = Matrix<T, Dyn, C, <DefaultAllocator as Allocator<T, Dyn, C>>::Buffer>>,

§Example
assert_eq!(vec![DVector::repeat(3, 1.0f64),
                DVector::repeat(3, 1.0f64),
                DVector::repeat(3, 1.0f64)].into_iter().sum::<DVector<f64>>(),
           DVector::repeat(3, 1.0f64) + DVector::repeat(3, 1.0f64) + DVector::repeat(3, 1.0f64));
§Panics

Panics if the iterator is empty:

iter::empty::<DMatrix<f64>>().sum::<DMatrix<f64>>(); // panics!
source§

impl<T, R, C> Sum for Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where R: DimName, C: DimName, T: Scalar + ClosedAdd + Zero, DefaultAllocator: Allocator<T, R, C>,

source§

fn sum<I>( iter: I, ) -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where I: Iterator<Item = Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>>,

Method which takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl<T, R, C, S> UlpsEq for Matrix<T, R, C, S>
where R: Dim, C: Dim, T: Scalar + UlpsEq, S: RawStorage<T, R, C>, <T as AbsDiffEq>::Epsilon: Clone,

source§

fn default_max_ulps() -> u32

The default ULPs to tolerate when testing values that are far-apart. Read more
source§

fn ulps_eq( &self, other: &Matrix<T, R, C, S>, epsilon: <Matrix<T, R, C, S> as AbsDiffEq>::Epsilon, max_ulps: u32, ) -> bool

A test for equality that uses units in the last place (ULP) if the values are far apart.
§

fn ulps_ne(&self, other: &Rhs, epsilon: Self::Epsilon, max_ulps: u32) -> bool

The inverse of [UlpsEq::ulps_eq].
source§

impl<T, R, C, S> UpperExp for Matrix<T, R, C, S>
where R: Dim, C: Dim, T: Scalar + UpperExp, S: RawStorage<T, R, C>,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<T, R, C, S> UpperHex for Matrix<T, R, C, S>
where R: Dim, C: Dim, T: Scalar + UpperHex, S: RawStorage<T, R, C>,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<T, R, C> Zero for Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>
where R: DimName, C: DimName, T: Scalar + Zero + ClosedAdd, DefaultAllocator: Allocator<T, R, C>,

source§

fn zero() -> Matrix<T, R, C, <DefaultAllocator as Allocator<T, R, C>>::Buffer>

Returns the additive identity element of Self, 0. Read more
source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
source§

impl<T, R, C, S> Copy for Matrix<T, R, C, S>
where T: Copy, R: Copy, C: Copy, S: Copy,

source§

impl<T, R, C, S> Eq for Matrix<T, R, C, S>
where R: Dim, C: Dim, T: Eq, S: RawStorage<T, R, C>,

Auto Trait Implementations§

§

impl<T, R, C, S> Freeze for Matrix<T, R, C, S>
where S: Freeze,

§

impl<T, R, C, S> RefUnwindSafe for Matrix<T, R, C, S>

§

impl<T, R, C, S> Send for Matrix<T, R, C, S>
where S: Send, T: Send, R: Send, C: Send,

§

impl<T, R, C, S> Sync for Matrix<T, R, C, S>
where S: Sync, T: Sync, R: Sync, C: Sync,

§

impl<T, R, C, S> Unpin for Matrix<T, R, C, S>
where S: Unpin, T: Unpin, R: Unpin, C: Unpin,

§

impl<T, R, C, S> UnwindSafe for Matrix<T, R, C, S>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AnyEq for T
where T: Any + PartialEq,

§

fn equals(&self, other: &(dyn Any + 'static)) -> bool

§

fn as_any(&self) -> &(dyn Any + 'static)

§

impl<T, U> AsBindGroupShaderType<U> for T
where U: ShaderType, &'a T: for<'a> Into<U>,

§

fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U

Return the T [ShaderType] for self. When used in [AsBindGroup] derives, it is safe to assume that all images in self exist.
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Copy,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T> DynClone for T
where T: Clone,

§

impl<T> DynEq for T
where T: Any + Eq,

§

fn as_any(&self) -> &(dyn Any + 'static)

Casts the type to dyn Any.
§

fn dyn_eq(&self, other: &(dyn DynEq + 'static)) -> bool

This method tests for self and other values to be equal. Read more
§

impl<T> DynHash for T
where T: DynEq + Hash,

§

fn as_dyn_eq(&self) -> &(dyn DynEq + 'static)

Casts the type to dyn Any.
§

fn dyn_hash(&self, state: &mut dyn Hasher)

Feeds this value into the given Hasher.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

§

impl<T> FromWorld for T
where T: Default,

§

fn from_world(_world: &mut World) -> T

Creates Self using data from the given [World]
§

impl<T> FromWorld for T
where T: Default,

§

fn from_world(_world: &World) -> T

Creates Self using data from the given World.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

§

fn into_sample(self) -> T

source§

impl<T> LowerBounded for T
where T: Bounded,

source§

fn min_value() -> T

Returns the smallest finite number this type can represent
§

impl<T> One for T
where T: One,

§

fn one() -> T

§

impl<T> Pipe for T
where T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> RawClone for T
where T: Clone,

§

unsafe fn raw_clone(src: *const c_void, dst: *mut c_void)

Write the default value of the type to the pointer. Read more
§

fn raw_clone_cb() -> Unsafe<&'static (dyn Fn(*const c_void, *mut c_void) + Send + Sync)>

Get a callback suitable for [SchemaData].
§

impl<T> RawDefault for T
where T: Default,

§

unsafe fn raw_default(dst: *mut c_void)

Write the default value of the type to the pointer. Read more
§

fn raw_default_cb() -> Unsafe<&'static (dyn Fn(*mut c_void) + Send + Sync)>

Get a callback suitable for [SchemaData].
§

impl<T> RawDrop for T

§

unsafe fn raw_drop(ptr: *mut c_void)

Write the default value of the type to the pointer. Read more
§

fn raw_drop_cb() -> Unsafe<&'static (dyn Fn(*mut c_void) + Send + Sync)>

Get a callback suitable for [SchemaData].
§

impl<T> RawEq for T
where T: Eq,

§

unsafe fn raw_eq(a: *const c_void, b: *const c_void) -> bool

Get the hash of the type. Read more
§

fn raw_eq_cb() -> Unsafe<&'static (dyn Fn(*const c_void, *const c_void) -> bool + Send + Sync)>

Get a callback suitable for [SchemaData].
§

impl<T> RawHash for T
where T: Hash,

§

unsafe fn raw_hash(ptr: *const c_void) -> u64

Get the hash of the type. Read more
§

fn raw_hash_cb() -> Unsafe<&'static (dyn Fn(*const c_void) -> u64 + Send + Sync)>

Get a callback suitable for [SchemaData].
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> SimdPartialOrd for T
where T: SimdValue<Element = T, SimdBool = bool> + PartialOrd,

§

fn simd_gt(self, other: T) -> <T as SimdValue>::SimdBool

Lanewise greater than > comparison.
§

fn simd_lt(self, other: T) -> <T as SimdValue>::SimdBool

Lanewise less than < comparison.
§

fn simd_ge(self, other: T) -> <T as SimdValue>::SimdBool

Lanewise greater or equal >= comparison.
§

fn simd_le(self, other: T) -> <T as SimdValue>::SimdBool

Lanewise less or equal <= comparison.
§

fn simd_eq(self, other: T) -> <T as SimdValue>::SimdBool

Lanewise equal == comparison.
§

fn simd_ne(self, other: T) -> <T as SimdValue>::SimdBool

Lanewise not equal != comparison.
§

fn simd_max(self, other: T) -> T

Lanewise max value.
§

fn simd_min(self, other: T) -> T

Lanewise min value.
§

fn simd_clamp(self, min: T, max: T) -> T

Clamps each lane of self between the corresponding lane of min and max.
§

fn simd_horizontal_min(self) -> <T as SimdValue>::Element

The min value among all lanes of self.
§

fn simd_horizontal_max(self) -> <T as SimdValue>::Element

The max value among all lanes of self.
§

impl<N> SimdSign<Matrix<N, Const<2>, Const<1>, ArrayStorage<N, 2, 1>>> for N
where N: Scalar + Copy + SimdSign<N>,

§

fn copy_sign_to( self, to: Matrix<N, Const<2>, Const<1>, ArrayStorage<N, 2, 1>>, ) -> Matrix<N, Const<2>, Const<1>, ArrayStorage<N, 2, 1>>

Copy the sign of each component of self to the corresponding component of to.
§

impl<N> SimdSign<Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>> for N
where N: Scalar + Copy + SimdSign<N>,

§

fn copy_sign_to( self, to: Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>, ) -> Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>

Copy the sign of each component of self to the corresponding component of to.
§

impl<'gc, T> Singleton<'gc> for T
where T: Default,

§

fn create(_: Context<'gc>) -> T

§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

§

fn to_sample_(self) -> U

§

impl<T> ToSmolStr for T
where T: Display + ?Sized,

§

fn to_smolstr(&self) -> SmolStr

source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> TypeData for T
where T: 'static + Send + Sync + Clone,

§

fn clone_type_data(&self) -> Box<dyn TypeData>

§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

source§

impl<T> UpperBounded for T
where T: Bounded,

source§

fn max_value() -> T

Returns the largest finite number this type can represent
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> Zero for T
where T: Zero,

§

fn zero() -> T

§

impl<T, Right> ClosedAdd<Right> for T
where T: Add<Right, Output = T> + AddAssign<Right>,

§

impl<T, Right> ClosedDiv<Right> for T
where T: Div<Right, Output = T> + DivAssign<Right>,

§

impl<T, Right> ClosedMul<Right> for T
where T: Mul<Right, Output = T> + MulAssign<Right>,

§

impl<T> ClosedNeg for T
where T: Neg<Output = T>,

§

impl<T, Right> ClosedSub<Right> for T
where T: Sub<Right, Output = T> + SubAssign<Right>,

§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

§

impl<T> Formattable for T
where T: Deref, <T as Deref>::Target: Formattable,

source§

impl<M> Measure for M
where M: Debug + PartialOrd + Add<Output = M> + Default + Clone,

§

impl<T> Parsable for T
where T: Deref, <T as Deref>::Target: Parsable,

source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

§

impl<T> SerializableAny for T
where T: 'static + Any + Clone + for<'a> Send + Sync,