IDENTITY

Struct IDENTITY 

Source
pub struct IDENTITY { /* private fields */ }

Methods from Deref<Target = Matrix4<f32>>§

Source

pub fn imax(&self) -> usize

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

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 imin(&self) -> usize

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

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

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

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

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

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.

§Examples:
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 tr_dot<R2, C2, SB>(&self, rhs: &Matrix<N, R2, C2, SB>) -> N
where R2: Dim, C2: Dim, SB: Storage<N, R2, C2>, ShapeConstraint: DimEq<C, R2> + DimEq<R, C2>,

The dot product between the transpose of self and rhs.

§Examples:
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

pub fn add_to<R2, C2, SB, R3, C3, SC>( &self, rhs: &Matrix<N, R2, C2, SB>, out: &mut Matrix<N, R3, C3, SC>, )
where R2: Dim, C2: Dim, R3: Dim, C3: Dim, SB: Storage<N, R2, C2>, SC: StorageMut<N, 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

pub fn sub_to<R2, C2, SB, R3, C3, SC>( &self, rhs: &Matrix<N, R2, C2, SB>, out: &mut Matrix<N, R3, C3, SC>, )
where R2: Dim, C2: Dim, R3: Dim, C3: Dim, SB: Storage<N, R2, C2>, SC: StorageMut<N, 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

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

Equivalent to self.transpose() * rhs.

Source

pub fn tr_mul_to<R2, C2, SB, R3, C3, SC>( &self, rhs: &Matrix<N, R2, C2, SB>, out: &mut Matrix<N, R3, C3, SC>, )
where R2: Dim, C2: Dim, R3: Dim, C3: Dim, SB: Storage<N, R2, C2>, SC: StorageMut<N, 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 mul_to<R2, C2, SB, R3, C3, SC>( &self, rhs: &Matrix<N, R2, C2, SB>, out: &mut Matrix<N, R3, C3, SC>, )
where R2: Dim, C2: Dim, R3: Dim, C3: Dim, SB: Storage<N, R2, C2>, SC: StorageMut<N, 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<N, R2, C2, SB>, ) -> Matrix<N, <R1 as DimMul<R2>>::Output, <C1 as DimMul<C2>>::Output, <DefaultAllocator as Allocator<N, <R1 as DimMul<R2>>::Output, <C1 as DimMul<C2>>::Output>>::Buffer>
where R2: Dim, C2: Dim, N: ClosedMul, R1: DimMul<R2>, C1: DimMul<C2>, SB: Storage<N, R2, C2>, DefaultAllocator: Allocator<N, <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

pub fn add_scalar( &self, rhs: N, ) -> Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer>
where DefaultAllocator: Allocator<N, R, C>,

Adds a scalar to self.

Source

pub fn amax(&self) -> N

Returns the absolute value of the coefficient with the largest absolute value.

Source

pub fn amin(&self) -> N

Returns the absolute value of the coefficient with the smallest absolute value.

Source

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

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

Source

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

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

Source

pub fn append_nonuniform_scaling<SB>( &self, scaling: &Matrix<N, <D as DimNameSub<U1>>::Output, U1, SB>, ) -> Matrix<N, D, D, <DefaultAllocator as Allocator<N, D, D>>::Buffer>
where D: DimNameSub<U1>, SB: Storage<N, <D as DimNameSub<U1>>::Output>, DefaultAllocator: Allocator<N, 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<N, <D as DimNameSub<U1>>::Output, U1, SB>, ) -> Matrix<N, D, D, <DefaultAllocator as Allocator<N, D, D>>::Buffer>
where D: DimNameSub<U1>, SB: Storage<N, <D as DimNameSub<U1>>::Output>, DefaultAllocator: Allocator<N, D, D>,

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

Source

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

Computes the transformation equal to self followed by a translation.

Source

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

Computes the transformation equal to a translation followed by self.

Source

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

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

Source

pub fn transform_point( &self, pt: &Point<N, <D as DimNameSub<U1>>::Output>, ) -> Point<N, <D as DimNameSub<U1>>::Output>

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

Source

pub fn abs( &self, ) -> Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer>
where N: Signed, DefaultAllocator: Allocator<N, 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

pub fn component_mul<R2, C2, SB>( &self, rhs: &Matrix<N, R2, C2, SB>, ) -> Matrix<N, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative, <DefaultAllocator as Allocator<N, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative>>::Buffer>
where N: ClosedMul, R2: Dim, C2: Dim, SB: Storage<N, R2, C2>, DefaultAllocator: SameShapeAllocator<N, 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 component_div<R2, C2, SB>( &self, rhs: &Matrix<N, R2, C2, SB>, ) -> Matrix<N, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative, <DefaultAllocator as Allocator<N, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative>>::Buffer>
where N: ClosedDiv, R2: Dim, C2: Dim, SB: Storage<N, R2, C2>, DefaultAllocator: SameShapeAllocator<N, 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 upper_triangle( &self, ) -> Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer>
where DefaultAllocator: Allocator<N, R, C>,

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

Source

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

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

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 shape(&self) -> (usize, usize)

The shape of this matrix returned as the tuple (number of rows, number of columns).

§Examples:
let mat = Matrix3x4::<f32>::zeros();
assert_eq!(mat.shape(), (3, 4));
Source

pub fn nrows(&self) -> usize

The number of rows of this matrix.

§Examples:
let mat = Matrix3x4::<f32>::zeros();
assert_eq!(mat.nrows(), 3);
Source

pub fn ncols(&self) -> usize

The number of columns of this matrix.

§Examples:
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.

§Examples:
let mat = DMatrix::<f32>::zeros(10, 10);
let slice = mat.slice_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 iter(&self) -> MatrixIter<'_, N, R, C, S>

Iterates through this matrix coordinates in column-major order.

§Examples:
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 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.

Source

pub unsafe fn get_unchecked(&self, irow: usize, icol: usize) -> &N

Gets a reference to the element of this matrix at row irow and column icol without bound-checking.

Source

pub fn relative_eq<R2, C2, SB>( &self, other: &Matrix<N, R2, C2, SB>, eps: <N as AbsDiffEq>::Epsilon, max_relative: <N as AbsDiffEq>::Epsilon, ) -> bool
where N: RelativeEq, R2: Dim, C2: Dim, SB: Storage<N, R2, C2>, <N as AbsDiffEq>::Epsilon: Copy, 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<N, R2, C2, SB>) -> bool
where N: PartialEq, R2: Dim, C2: Dim, SB: Storage<N, R2, C2>, ShapeConstraint: SameNumberOfRows<R, R2> + SameNumberOfColumns<C, C2>,

Tests whether self and rhs are exactly equal.

Source

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

Clones this matrix to one that owns its data.

Source

pub fn clone_owned_sum<R2, C2>( &self, ) -> Matrix<N, <ShapeConstraint as SameNumberOfRows<R, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C, C2>>::Representative, <DefaultAllocator as Allocator<N, <ShapeConstraint as SameNumberOfRows<R, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C, C2>>::Representative>>::Buffer>

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 map<N2, F>( &self, f: F, ) -> Matrix<N2, R, C, <DefaultAllocator as Allocator<N2, R, C>>::Buffer>
where N2: Scalar, F: FnMut(N) -> N2, DefaultAllocator: Allocator<N2, R, C>,

Returns a matrix containing the result of f applied to each of its entries.

Source

pub fn map_with_location<N2, F>( &self, f: F, ) -> Matrix<N2, R, C, <DefaultAllocator as Allocator<N2, R, C>>::Buffer>
where N2: Scalar, F: FnMut(usize, usize, N) -> N2, DefaultAllocator: Allocator<N2, 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(value, row, col).

Source

pub fn zip_map<N2, N3, S2, F>( &self, rhs: &Matrix<N2, R, C, S2>, f: F, ) -> Matrix<N3, R, C, <DefaultAllocator as Allocator<N3, R, C>>::Buffer>
where N2: Scalar, N3: Scalar, S2: Storage<N2, R, C>, F: FnMut(N, N2) -> 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<N2, N3, N4, S2, S3, F>( &self, b: &Matrix<N2, R, C, S2>, c: &Matrix<N3, R, C, S3>, f: F, ) -> Matrix<N4, R, C, <DefaultAllocator as Allocator<N4, R, C>>::Buffer>
where N2: Scalar, N3: Scalar, N4: Scalar, S2: Storage<N2, R, C>, S3: Storage<N3, R, C>, F: FnMut(N, N2, 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 transpose_to<R2, C2, SB>(&self, out: &mut Matrix<N, R2, C2, SB>)
where R2: Dim, C2: Dim, SB: StorageMut<N, R2, C2>, ShapeConstraint: SameNumberOfRows<R, C2> + SameNumberOfColumns<C, R2>,

Transposes self and store the result into out.

Source

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

Transposes self.

Source

pub unsafe fn vget_unchecked(&self, i: usize) -> &N

Gets a reference to the i-th element of this column vector without bound checking.

Source

pub fn as_slice(&self) -> &[N]

Extracts a slice containing the entire matrix entries ordered column-by-columns.

Source

pub fn conjugate_transpose_to<R2, C2, SB>( &self, out: &mut Matrix<Complex<N>, R2, C2, SB>, )
where R2: Dim, C2: Dim, SB: StorageMut<Complex<N>, R2, C2>, ShapeConstraint: SameNumberOfRows<R, C2> + SameNumberOfColumns<C, R2>,

Takes the conjugate and transposes self and store the result into out.

Source

pub fn conjugate_transpose( &self, ) -> Matrix<Complex<N>, C, R, <DefaultAllocator as Allocator<Complex<N>, C, R>>::Buffer>

The conjugate transposition of self.

Source

pub fn diagonal( &self, ) -> Matrix<N, D, U1, <DefaultAllocator as Allocator<N, D>>::Buffer>

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

Source

pub fn trace(&self) -> N
where N: Ring,

Computes a trace of a square matrix, i.e., the sum of its diagonal elements.

Source

pub fn to_homogeneous( &self, ) -> Matrix<N, <D as DimAdd<U1>>::Output, <D as DimAdd<U1>>::Output, <DefaultAllocator as Allocator<N, <D as DimAdd<U1>>::Output, <D as DimAdd<U1>>::Output>>::Buffer>
where DefaultAllocator: Allocator<N, <D as DimAdd<U1>>::Output, <D as DimAdd<U1>>::Output>,

Yields the homogeneous matrix for this matrix, i.e., appending an additional dimension and and setting the diagonal element to 1.

Source

pub fn to_homogeneous( &self, ) -> Matrix<N, <D as DimAdd<U1>>::Output, U1, <DefaultAllocator as Allocator<N, <D as DimAdd<U1>>::Output>>::Buffer>

Computes the coordinates in projective space of this vector, i.e., appends a 0 to its coordinates.

Source

pub fn perp<R2, C2, SB>(&self, b: &Matrix<N, R2, C2, SB>) -> N

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<N, R2, C2, SB>, ) -> Matrix<N, <ShapeConstraint as SameNumberOfRows<R, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C, C2>>::Representative, <DefaultAllocator as Allocator<N, <ShapeConstraint as SameNumberOfRows<R, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C, C2>>::Representative>>::Buffer>
where R2: Dim, C2: Dim, SB: Storage<N, R2, C2>, DefaultAllocator: SameShapeAllocator<N, 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

pub fn cross_matrix( &self, ) -> Matrix<N, U3, U3, <DefaultAllocator as Allocator<N, U3, U3>>::Buffer>

Computes the matrix M such that for all vector v we have M * v == self.cross(&v).

Source

pub fn angle<R2, C2, SB>(&self, other: &Matrix<N, R2, C2, SB>) -> N
where R2: Dim, C2: Dim, SB: Storage<N, R2, C2>, ShapeConstraint: DimEq<R, R2> + DimEq<C, C2>,

The smallest angle between two vectors.

Source

pub fn norm_squared(&self) -> N

The squared L2 norm of this vector.

Source

pub fn norm(&self) -> N

The L2 norm of this matrix.

Source

pub fn magnitude(&self) -> N

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) -> N

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 normalize( &self, ) -> Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer>
where DefaultAllocator: Allocator<N, R, C>,

Returns a normalized version of this matrix.

Source

pub fn try_normalize( &self, min_norm: N, ) -> Option<Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer>>
where DefaultAllocator: Allocator<N, R, C>,

Returns a normalized version of this matrix unless its norm as smaller or equal to eps.

Source

pub fn lerp<S2>( &self, rhs: &Matrix<N, D, U1, S2>, t: N, ) -> Matrix<N, D, U1, <DefaultAllocator as Allocator<N, D>>::Buffer>
where S2: Storage<N, D>, DefaultAllocator: Allocator<N, 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 row( &self, i: usize, ) -> Matrix<N, U1, C, SliceStorage<'_, N, U1, C, <S as Storage<N, R, C>>::RStride, <S as Storage<N, R, C>>::CStride>>

Returns a slice containing the i-th row of this matrix.

Source

pub fn row_part( &self, i: usize, n: usize, ) -> Matrix<N, U1, Dynamic, SliceStorage<'_, N, U1, Dynamic, <S as Storage<N, R, C>>::RStride, <S as Storage<N, R, C>>::CStride>>

Returns a slice containing the n first elements of the i-th row of this matrix.

Source

pub fn rows( &self, first_row: usize, nrows: usize, ) -> Matrix<N, Dynamic, C, SliceStorage<'_, N, Dynamic, C, <S as Storage<N, R, C>>::RStride, <S as Storage<N, 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<N, Dynamic, C, SliceStorage<'_, N, Dynamic, C, Dynamic, <S as Storage<N, R, C>>::CStride>>

Extracts from this matrix a set of consecutive rows regularly skipping step rows.

Source

pub fn fixed_rows<RSlice>( &self, first_row: usize, ) -> Matrix<N, RSlice, C, SliceStorage<'_, N, RSlice, C, <S as Storage<N, R, C>>::RStride, <S as Storage<N, R, C>>::CStride>>
where RSlice: DimName,

Extracts a compile-time number of consecutive rows from this matrix.

Source

pub fn fixed_rows_with_step<RSlice>( &self, first_row: usize, step: usize, ) -> Matrix<N, RSlice, C, SliceStorage<'_, N, RSlice, C, Dynamic, <S as Storage<N, R, C>>::CStride>>
where RSlice: DimName,

Extracts from this matrix a compile-time number of rows regularly skipping step rows.

Source

pub fn rows_generic<RSlice>( &self, row_start: usize, nrows: RSlice, ) -> Matrix<N, RSlice, C, SliceStorage<'_, N, RSlice, C, <S as Storage<N, R, C>>::RStride, <S as Storage<N, R, C>>::CStride>>
where RSlice: 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<RSlice>( &self, row_start: usize, nrows: RSlice, step: usize, ) -> Matrix<N, RSlice, C, SliceStorage<'_, N, RSlice, C, Dynamic, <S as Storage<N, R, C>>::CStride>>
where RSlice: 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<N, R, U1, SliceStorage<'_, N, R, U1, <S as Storage<N, R, C>>::RStride, <S as Storage<N, R, C>>::CStride>>

Returns a slice containing the i-th column of this matrix.

Source

pub fn column_part( &self, i: usize, n: usize, ) -> Matrix<N, Dynamic, U1, SliceStorage<'_, N, Dynamic, U1, <S as Storage<N, R, C>>::RStride, <S as Storage<N, R, C>>::CStride>>

Returns a slice containing the n first elements of the i-th column of this matrix.

Source

pub fn columns( &self, first_col: usize, ncols: usize, ) -> Matrix<N, R, Dynamic, SliceStorage<'_, N, R, Dynamic, <S as Storage<N, R, C>>::RStride, <S as Storage<N, 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<N, R, Dynamic, SliceStorage<'_, N, R, Dynamic, <S as Storage<N, R, C>>::RStride, Dynamic>>

Extracts from this matrix a set of consecutive columns regularly skipping step columns.

Source

pub fn fixed_columns<CSlice>( &self, first_col: usize, ) -> Matrix<N, R, CSlice, SliceStorage<'_, N, R, CSlice, <S as Storage<N, R, C>>::RStride, <S as Storage<N, R, C>>::CStride>>
where CSlice: DimName,

Extracts a compile-time number of consecutive columns from this matrix.

Source

pub fn fixed_columns_with_step<CSlice>( &self, first_col: usize, step: usize, ) -> Matrix<N, R, CSlice, SliceStorage<'_, N, R, CSlice, <S as Storage<N, R, C>>::RStride, Dynamic>>
where CSlice: DimName,

Extracts from this matrix a compile-time number of columns regularly skipping step columns.

Source

pub fn columns_generic<CSlice>( &self, first_col: usize, ncols: CSlice, ) -> Matrix<N, R, CSlice, SliceStorage<'_, N, R, CSlice, <S as Storage<N, R, C>>::RStride, <S as Storage<N, R, C>>::CStride>>
where CSlice: 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<CSlice>( &self, first_col: usize, ncols: CSlice, step: usize, ) -> Matrix<N, R, CSlice, SliceStorage<'_, N, R, CSlice, <S as Storage<N, R, C>>::RStride, Dynamic>>
where CSlice: 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<N, Dynamic, Dynamic, SliceStorage<'_, N, Dynamic, Dynamic, <S as Storage<N, R, C>>::RStride, <S as Storage<N, R, C>>::CStride>>

Slices 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<N, Dynamic, Dynamic, SliceStorage<'_, N, Dynamic, Dynamic, Dynamic, Dynamic>>

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 fixed_slice<RSlice, CSlice>( &self, irow: usize, icol: usize, ) -> Matrix<N, RSlice, CSlice, SliceStorage<'_, N, RSlice, CSlice, <S as Storage<N, R, C>>::RStride, <S as Storage<N, R, C>>::CStride>>
where RSlice: DimName, CSlice: DimName,

Slices this matrix starting at its component (irow, icol) and with (R::dim(), CSlice::dim()) consecutive components.

Source

pub fn fixed_slice_with_steps<RSlice, CSlice>( &self, start: (usize, usize), steps: (usize, usize), ) -> Matrix<N, RSlice, CSlice, SliceStorage<'_, N, RSlice, CSlice, Dynamic, Dynamic>>
where RSlice: DimName, CSlice: DimName,

Slices this matrix starting at its component (start.0, start.1) and with (R::dim(), CSlice::dim()) 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 generic_slice<RSlice, CSlice>( &self, start: (usize, usize), shape: (RSlice, CSlice), ) -> Matrix<N, RSlice, CSlice, SliceStorage<'_, N, RSlice, CSlice, <S as Storage<N, R, C>>::RStride, <S as Storage<N, R, C>>::CStride>>
where RSlice: Dim, CSlice: Dim,

Creates a slice that may or may not have a fixed size and stride.

Source

pub fn generic_slice_with_steps<RSlice, CSlice>( &self, start: (usize, usize), shape: (RSlice, CSlice), steps: (usize, usize), ) -> Matrix<N, RSlice, CSlice, SliceStorage<'_, N, RSlice, CSlice, Dynamic, Dynamic>>
where RSlice: Dim, CSlice: Dim,

Creates a slice 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<N, <Range1 as SliceRange<R>>::Size, C, SliceStorage<'_, N, <Range1 as SliceRange<R>>::Size, C, <S as Storage<N, R, C>>::RStride, <S as Storage<N, R, C>>::CStride>>, Matrix<N, <Range2 as SliceRange<R>>::Size, C, SliceStorage<'_, N, <Range2 as SliceRange<R>>::Size, C, <S as Storage<N, R, C>>::RStride, <S as Storage<N, R, C>>::CStride>>)
where Range1: SliceRange<R>, Range2: SliceRange<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<N, R, <Range1 as SliceRange<C>>::Size, SliceStorage<'_, N, R, <Range1 as SliceRange<C>>::Size, <S as Storage<N, R, C>>::RStride, <S as Storage<N, R, C>>::CStride>>, Matrix<N, R, <Range2 as SliceRange<C>>::Size, SliceStorage<'_, N, R, <Range2 as SliceRange<C>>::Size, <S as Storage<N, R, C>>::RStride, <S as Storage<N, R, C>>::CStride>>)
where Range1: SliceRange<C>, Range2: SliceRange<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

pub fn slice_range<RowRange, ColRange>( &self, rows: RowRange, cols: ColRange, ) -> Matrix<N, <RowRange as SliceRange<R>>::Size, <ColRange as SliceRange<C>>::Size, SliceStorage<'_, N, <RowRange as SliceRange<R>>::Size, <ColRange as SliceRange<C>>::Size, <S as Storage<N, R, C>>::RStride, <S as Storage<N, R, C>>::CStride>>
where RowRange: SliceRange<R>, ColRange: SliceRange<C>,

Slices a sub-matrix 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<N, <RowRange as SliceRange<R>>::Size, C, SliceStorage<'_, N, <RowRange as SliceRange<R>>::Size, C, <S as Storage<N, R, C>>::RStride, <S as Storage<N, R, C>>::CStride>>
where RowRange: SliceRange<R>,

Slice containing all the rows indexed by the range rows.

Source

pub fn columns_range<ColRange>( &self, cols: ColRange, ) -> Matrix<N, R, <ColRange as SliceRange<C>>::Size, SliceStorage<'_, N, R, <ColRange as SliceRange<C>>::Size, <S as Storage<N, R, C>>::RStride, <S as Storage<N, R, C>>::CStride>>
where ColRange: SliceRange<C>,

Slice containing all the columns indexed by the range rows.

Source

pub fn is_empty(&self) -> bool

Indicates if this is an empty matrix.

Source

pub fn is_square(&self) -> bool

Indicates if this is a square matrix.

Source

pub fn is_identity(&self, eps: <N as AbsDiffEq>::Epsilon) -> bool
where N: Zero + One + RelativeEq, <N as AbsDiffEq>::Epsilon: Copy,

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

pub fn is_orthogonal(&self, eps: <N as AbsDiffEq>::Epsilon) -> bool
where N: Zero + One + ClosedAdd + ClosedMul + RelativeEq, S: Storage<N, R, C>, <N as AbsDiffEq>::Epsilon: Copy, DefaultAllocator: Allocator<N, 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

pub fn is_special_orthogonal(&self, eps: N) -> 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

pub fn xx( &self, ) -> Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2>>::Buffer>

Builds a new vector from components of self.

Source

pub fn xxx( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn xy( &self, ) -> Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2>>::Buffer>

Builds a new vector from components of self.

Source

pub fn yx( &self, ) -> Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2>>::Buffer>

Builds a new vector from components of self.

Source

pub fn yy( &self, ) -> Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2>>::Buffer>

Builds a new vector from components of self.

Source

pub fn xxy( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn xyx( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn xyy( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn yxx( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn yxy( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn yyx( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn yyy( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn xz( &self, ) -> Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2>>::Buffer>

Builds a new vector from components of self.

Source

pub fn yz( &self, ) -> Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2>>::Buffer>

Builds a new vector from components of self.

Source

pub fn zx( &self, ) -> Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2>>::Buffer>

Builds a new vector from components of self.

Source

pub fn zy( &self, ) -> Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2>>::Buffer>

Builds a new vector from components of self.

Source

pub fn zz( &self, ) -> Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2>>::Buffer>

Builds a new vector from components of self.

Source

pub fn xxz( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn xyz( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn xzx( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn xzy( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn xzz( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn yxz( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn yyz( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn yzx( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn yzy( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn yzz( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn zxx( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn zxy( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn zxz( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn zyx( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn zyy( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn zyz( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn zzx( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn zzy( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn zzz( &self, ) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3>>::Buffer>

Builds a new vector from components of self.

Source

pub fn determinant(&self) -> N
where DefaultAllocator: Allocator<N, 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

pub fn eigenvalues( &self, ) -> Option<Matrix<N, D, U1, <DefaultAllocator as Allocator<N, D>>::Buffer>>

Computes the eigenvalues of this matrix.

Source

pub fn complex_eigenvalues( &self, ) -> Matrix<Complex<N>, D, U1, <DefaultAllocator as Allocator<Complex<N>, D>>::Buffer>

Computes the eigenvalues of this matrix.

Source

pub fn solve_lower_triangular<R2, C2, S2>( &self, b: &Matrix<N, R2, C2, S2>, ) -> Option<Matrix<N, R2, C2, <DefaultAllocator as Allocator<N, R2, C2>>::Buffer>>
where R2: Dim, C2: Dim, S2: StorageMut<N, R2, C2>, DefaultAllocator: Allocator<N, 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<N, R2, C2, S2>, ) -> Option<Matrix<N, R2, C2, <DefaultAllocator as Allocator<N, R2, C2>>::Buffer>>
where R2: Dim, C2: Dim, S2: StorageMut<N, R2, C2>, DefaultAllocator: Allocator<N, 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<N, R2, C2, S2>, ) -> bool
where R2: Dim, C2: Dim, S2: StorageMut<N, 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<N, R2, C2, S2>, diag: N, ) -> bool
where R2: Dim, C2: Dim, S2: StorageMut<N, 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<N, R2, C2, S2>, ) -> bool
where R2: Dim, C2: Dim, S2: StorageMut<N, 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<N, R2, C2, S2>, ) -> Option<Matrix<N, R2, C2, <DefaultAllocator as Allocator<N, R2, C2>>::Buffer>>
where R2: Dim, C2: Dim, S2: StorageMut<N, R2, C2>, DefaultAllocator: Allocator<N, 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<N, R2, C2, S2>, ) -> Option<Matrix<N, R2, C2, <DefaultAllocator as Allocator<N, R2, C2>>::Buffer>>
where R2: Dim, C2: Dim, S2: StorageMut<N, R2, C2>, DefaultAllocator: Allocator<N, 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<N, R2, C2, S2>, ) -> bool
where R2: Dim, C2: Dim, S2: StorageMut<N, 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<N, R2, C2, S2>, ) -> bool
where R2: Dim, C2: Dim, S2: StorageMut<N, 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 singular_values( &self, ) -> Matrix<N, <R as DimMin<C>>::Output, U1, <DefaultAllocator as Allocator<N, <R as DimMin<C>>::Output>>::Buffer>

Computes the singular values of this matrix.

Source

pub fn rank(&self, eps: N) -> usize

Computes the rank of this matrix.

All singular values below eps are considered equal to 0.

Source

pub fn symmetric_eigenvalues( &self, ) -> Matrix<N, D, U1, <DefaultAllocator as Allocator<N, D>>::Buffer>

Computes the eigenvalues of this symmetric matrix.

Only the lower-triangular part of the matrix is read.

Trait Implementations§

Source§

impl Deref for IDENTITY

Source§

type Target = Matrix<f32, U4, U4, <DefaultAllocator as Allocator<f32, U4, U4>>::Buffer>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Matrix4<f32>

Dereferences the value.
Source§

impl LazyStatic for IDENTITY

Auto Trait Implementations§

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
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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SetParameter for T

Source§

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result
where T: Parameter<Self>,

Sets value as a parameter of self.
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

unsafe fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.