Struct nalgebra::base::Matrix

source ·
#[repr(C)]
pub struct Matrix<N: Scalar, R: Dim, C: Dim, S> { pub data: S, /* private fields */ }
Expand description

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

It combines four type parameters:

  • N: 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 Dynamic 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 Dynamic with type-level unsigned integers is allowed. Actually, a dynamically-sized column vector should be represented as a Matrix<N, Dynamic, U1, S> (given some concrete types for N and a compatible data storage type S).

Fields§

§data: S

The data storage that contains all the matrix components and informations about its number of rows and column (if needed).

Implementations§

Computes the index of the vector component with the largest value.

Computes the index of the vector component with the largest absolute value.

Computes the index of the vector component with the smallest value.

Computes the index of the vector component with the smallest absolute value.

Computes the index of the matrix component with the largest absolute value.

The dot product between two 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 dot product between the transpose of self and rhs.

Computes self = a * x + b * self.

If be is zero, self is never read from.

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.

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

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.

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

If beta is zero, self is never read.

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.

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.

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.

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

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

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

This allocates a workspace vector of dimension D1 for intermediate results. Use .quadform_tr_with_workspace(...) instead to avoid allocations.

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

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

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

This allocates a workspace vector of dimension D2 for intermediate results. Use .quadform_with_workspace(...) instead to avoid allocations.

Negates self in-place.

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

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

Equivalent to self.transpose() * rhs.

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

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

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

Adds a scalar to self.

Adds a scalar to self in-place.

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

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

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

Builds a new vector from components of self.

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

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

Creates a new homogeneous matrix that applies a pure translation.

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

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

Returns the identity matrix if the given argument is zero.

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

Returns the identity matrix if the given argument is zero.

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.

Creates a new rotation from Euler angles.

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

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

Creates a new homogeneous matrix for an orthographic projection.

Creates a new homogeneous matrix for a perspective projection.

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.

Builds a right-handed look-at view matrix.

Builds a left-handed look-at view matrix.

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

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

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

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

Computes the transformation equal to self followed by a translation.

Computes the transformation equal to a translation followed by self.

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

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

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

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

Computes the transformation equal to self followed by a translation.

Computes the transformation equal to a translation followed by self.

Computes the componentwise absolute value.

Componentwise matrix multiplication.

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

Inplace componentwise matrix multiplication.

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

Inplace componentwise matrix multiplication.

Componentwise matrix division.

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

Inplace componentwise matrix division.

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

Inplace componentwise matrix division.

Creates a new uninitialized matrix. If the matrix has a compile-time dimension, this panics if nrows != R::to_usize() or ncols != C::to_usize().

Creates a matrix with all its elements set to elem.

Creates a matrix with all its elements set to elem.

Same as from_element_generic.

Creates a matrix with all its elements set to 0.

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

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.

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

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

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.

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.

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.

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.

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.

Creates a matrix filled with random values.

Creates a matrix filled with random values from the given distribution.

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

Creates a new uninitialized matrix.

Creates a matrix with all its elements set to elem.

Creates a matrix with all its elements set to elem.

Same as .from_element.

Creates a matrix with all its elements set to 0.

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

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.

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

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

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.

Creates a matrix filled with its diagonal filled with elt and all other components set to 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.

Creates a matrix filled with random values from the given distribution.

Creates a matrix filled with random values.

Creates a new uninitialized matrix.

Creates a matrix with all its elements set to elem.

Creates a matrix with all its elements set to elem.

Same as .from_element.

Creates a matrix with all its elements set to 0.

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

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.

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

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

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.

Creates a matrix filled with its diagonal filled with elt and all other components set to 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.

Creates a matrix filled with random values from the given distribution.

Creates a matrix filled with random values.

Creates a new uninitialized matrix.

Creates a matrix with all its elements set to elem.

Creates a matrix with all its elements set to elem.

Same as .from_element.

Creates a matrix with all its elements set to 0.

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

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.

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

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

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.

Creates a matrix filled with its diagonal filled with elt and all other components set to 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.

Creates a matrix filled with random values from the given distribution.

Creates a matrix filled with random values.

Creates a new uninitialized matrix.

Creates a matrix with all its elements set to elem.

Creates a matrix with all its elements set to elem.

Same as .from_element.

Creates a matrix with all its elements set to 0.

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

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.

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

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

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.

Creates a matrix filled with its diagonal filled with elt and all other components set to 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.

Creates a matrix filled with random values from the given distribution.

Creates a matrix filled with random values.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

Initializes this matrix from its components.

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

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

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

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

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

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

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

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

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

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

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

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

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

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 Dynamic::new().

Creates a matrix slice 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 Dynamic::new().

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

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 Dynamic::new().

Creates a mutable matrix slice 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 Dynamic::new().

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

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 Dynamic::new().

Creates a matrix slice 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 Dynamic::new().

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

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 Dynamic::new().

Creates a mutable matrix slice 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 Dynamic::new().

Creates a new matrix slice from the given data array.

Panics if data does not contain enough elements.

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

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

Panics if data does not contain enough elements.

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

Creates a new matrix slice from the given data array.

Panics if data does not contain enough elements.

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

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

Panics if data does not contain enough elements.

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

Creates a new matrix slice from the given data array.

Panics if data does not contain enough elements.

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

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

Panics if data does not contain enough elements.

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

Creates a new matrix slice from the given data array.

Panics if data does not contain enough elements.

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

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

Panics if data does not contain enough elements.

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

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

Panics if data does not contain enough elements.

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

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

Panics if data does not contain enough elements.

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

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

Panics if data does not contain enough elements.

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

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

Panics if data does not contain enough elements.

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

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

Panics if data does not contain enough elements.

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

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

Panics if data does not contain enough elements.

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

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

Panics if data does not contain enough elements.

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

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

Panics if data does not contain enough elements.

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

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

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

Sets all the elements of this matrix to val.

Fills self with the identity matrix.

Sets all the diagonal elements of this matrix to val.

Sets all the elements of the selected row to val.

Sets all the elements of the selected column to val.

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

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

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

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.

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.

Swaps two rows in-place.

Swaps two columns in-place.

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

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

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

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

Removes the i-th column from this matrix.

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

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

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.

Removes the i-th row from this matrix.

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

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

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.

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

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

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

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

The added column values are not initialized.

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

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

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

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

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

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.

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.

Resizes self such that it has dimensions new_nrows × now_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.

Creates a new matrix with the given data without statically checking that the matrix dimension matches the storage dimension.

Creates a new matrix with the given data.

The total number of elements of this matrix.

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

The number of rows of this matrix.

The number of columns of this matrix.

The strides (row stride, column stride) of this matrix.

Iterates through this matrix coordinates.

Computes the row and column coordinates of the i-th element of this matrix seen as a vector.

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

Tests whether self and rhs are equal up to a given epsilon.

See relative_eq from the RelativeEq trait for more details.

Tests whether self and rhs are exactly equal.

Moves this matrix into one that owns its data.

Moves this matrix into one that owns its data. The actual type of the result depends on matrix storage combination rules for addition.

Clones this matrix to one that owns its data.

Clones this matrix into one that owns its data. The actual type of the result depends on matrix storage combination rules for addition.

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

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

Returns a matrix containing the result of f applied to each entries of self and rhs.

Returns a matrix containing the result of f applied to each entries of self and b, and c.

Transposes self and store the result into out.

Transposes self.

Mutably iterates through this matrix coordinates.

Gets a mutable reference to the i-th element of this matrix.

Swaps two entries without bound-checking.

Swaps two entries.

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.

Fills this matrix with the content of another one. Both must have the same shape.

Fills this matrix with the content of the transpose another one.

Replaces each component of self by the result of a closure f applied on it.

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

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

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

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

Transposes the square matrix self in-place.

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

The conjugate transposition of self.

Sets self to its conjugate transpose.

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

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

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

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.

The perpendicular product between two 2D column vectors, i.e. a.x * b.y - a.y * b.x.

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.

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

The smallest angle between two vectors.

The squared L2 norm of this vector.

The L2 norm of this matrix.

A synonym for the norm of this matrix.

Aka the length.

This function is simply implemented as a call to norm()

A synonym for the squared norm of this matrix.

Aka the squared length.

This function is simply implemented as a call to norm_squared()

Returns a normalized version of this matrix.

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

Normalizes this matrix in-place and returns its norm.

Normalizes this matrix in-place or does nothing if its norm is smaller or equal to eps.

If the normalization succeeded, returns the old normal of this matrix.

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

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

Extracts from this matrix a set of consecutive rows.

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

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

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

Extracts from this matrix nrows rows regularly skipping step rows. Both argument may or may not be values known at compile-time.

Extracts from this matrix nrows rows regularly skipping step rows. Both argument may or may not be values known at compile-time.

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

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

Extracts from this matrix a set of consecutive columns.

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

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

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

Extracts from this matrix ncols columns. The number of columns may or may not be known at compile-time.

Extracts from this matrix ncols columns skipping step columns. Both argument may or may not be values known at compile-time.

Slices this matrix starting at its component (irow, icol) and with (nrows, ncols) consecutive elements.

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.

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

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.

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

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

Splits this NxM matrix into two parts delimited by two ranges.

Panics if the ranges overlap or if the first range is empty.

Splits this NxM matrix into two parts delimited by two ranges.

Panics if the ranges overlap or if the first range is empty.

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

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

Extracts from this matrix a set of consecutive rows.

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

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

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

Extracts from this matrix nrows rows regularly skipping step rows. Both argument may or may not be values known at compile-time.

Extracts from this matrix nrows rows regularly skipping step rows. Both argument may or may not be values known at compile-time.

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

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

Extracts from this matrix a set of consecutive columns.

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

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

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

Extracts from this matrix ncols columns. The number of columns may or may not be known at compile-time.

Extracts from this matrix ncols columns skipping step columns. Both argument may or may not be values known at compile-time.

Slices this matrix starting at its component (irow, icol) and with (nrows, ncols) consecutive elements.

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.

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

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.

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

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

Splits this NxM matrix into two parts delimited by two ranges.

Panics if the ranges overlap or if the first range is empty.

Splits this NxM matrix into two parts delimited by two ranges.

Panics if the ranges overlap or if the first range is empty.

Slices a sub-matrix containing the rows indexed by the range rows and the columns indexed by the range cols.

Slice containing all the rows indexed by the range rows.

Slice containing all the columns indexed by the range rows.

Slices a mutable sub-matrix containing the rows indexed by the range rows and the columns indexed by the range cols.

Slice containing all the rows indexed by the range rows.

Slice containing all the columns indexed by the range cols.

Indicates if this is an empty matrix.

Indicates if this is a square matrix.

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.

Checks that Mᵀ × M = Id.

In this definition Id is approximately equal to the identity matrix with a relative error equal to eps.

Checks that this matrix is orthogonal and has a determinant equal to 1.

Returns true if this matrix is invertible.

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.

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.

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.

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.

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.

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.

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.

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.

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.

Computes the matrix determinant.

If the matrix has a dimension larger than 3, an LU decomposition is used.

Attempts to invert this matrix.

Attempts to invert this matrix in-place. Returns false and leaves self untouched if inversion fails.

Computes the QR decomposition of this matrix.

Computes the Hessenberg decomposition of this matrix using householder reflections.

Computes the bidiagonalization using householder reflections.

Computes the tridiagonalization of this symmetric matrix.

Only the lower-triangular part (including the diagonal) of m is read.

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.

Computes the LU decomposition with partial (row) pivoting of matrix.

Computes the LU decomposition with full pivoting of matrix.

This effectively computes P, L, U, Q such that P * matrix * Q = LU.

Computes the Schur decomposition of a square matrix.

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.

Computes the eigenvalues of this matrix.

Computes the eigenvalues of this matrix.

Computes the Singular Value Decomposition using implicit shift.

Attempts to compute the Singular Value Decomposition of matrix using implicit shift.

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 left-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.

Computes the singular values of this matrix.

Computes the rank of this matrix.

All singular values below eps are considered equal to 0.

Computes the pseudo-inverse of this matrix.

All singular values below eps are considered equal to 0.

Computes the eigendecomposition of this symmetric matrix.

Only the lower-triangular part (including the diagonal) of m is read.

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.

Computes the eigenvalues of this symmetric matrix.

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

Trait Implementations§

Used for specifying relative comparisons.
The default tolerance to use when testing values that are close together. Read more
A test for equality that uses the absolute difference to compute the approximate equality of two numbers. Read more
The inverse of ApproxEq::abs_diff_eq.
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Mutably dereferences the value.
Formats the value using the given formatter. Read more
Generate a random value of T, using rng as the source of randomness.
Create an iterator that generates random values of T, using rng as the source of randomness. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
Performs the /= operation. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
The returned type after indexing.
Performs the indexing (container[index]) operation. Read more
The returned type after indexing.
Performs the indexing (container[index]) operation. Read more
Performs the mutable indexing (container[index]) operation. Read more
Performs the mutable indexing (container[index]) operation. Read more
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
The type of the elements being iterated over.
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more
The type of the elements being iterated over.
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
The resulting type after applying the - operator.
Performs the unary - operation. Read more
The resulting type after applying the - operator.
Performs the unary - operation. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Method which takes an iterator and generates Self from the elements by multiplying the items. Read more
Method which takes an iterator and generates Self from the elements by multiplying the items. Read more
The default relative tolerance for testing values that are far-apart. Read more
A test for equality that uses a relative comparison if the values are far apart.
The inverse of ApproxEq::relative_eq.
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
The inclusion map: converts self to the equivalent element of its superset.
Checks if element is actually part of the subset Self (and can be converted to it).
Use with care! Same as self.to_superset but without any property checks. Always succeeds.
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
The inclusion map: converts self to the equivalent element of its superset.
Checks if element is actually part of the subset Self (and can be converted to it).
Use with care! Same as self.to_superset but without any property checks. Always succeeds.
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
The inclusion map: converts self to the equivalent element of its superset.
Checks if element is actually part of the subset Self (and can be converted to it).
Use with care! Same as self.to_superset but without any property checks. Always succeeds.
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
The inclusion map: converts self to the equivalent element of its superset.
Checks if element is actually part of the subset Self (and can be converted to it).
Use with care! Same as self.to_superset but without any property checks. Always succeeds.
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
The inclusion map: converts self to the equivalent element of its superset.
Checks if element is actually part of the subset Self (and can be converted to it).
Use with care! Same as self.to_superset but without any property checks. Always succeeds.
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
The inclusion map: converts self to the equivalent element of its superset.
Checks if element is actually part of the subset Self (and can be converted to it).
Use with care! Same as self.to_superset but without any property checks. Always succeeds.
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
The inclusion map: converts self to the equivalent element of its superset.
Checks if element is actually part of the subset Self (and can be converted to it).
Use with care! Same as self.to_superset but without any property checks. Always succeeds.
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
The inclusion map: converts self to the equivalent element of its superset.
Checks if element is actually part of the subset Self (and can be converted to it).
Use with care! Same as self.to_superset but without any property checks. Always succeeds.
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
The inclusion map: converts self to the equivalent element of its superset.
Checks if element is actually part of the subset Self (and can be converted to it).
Use with care! Same as self.to_superset but without any property checks. Always succeeds.
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Method which takes an iterator and generates Self from the elements by “summing up” the items. Read more
Method which takes an iterator and generates Self from the elements by “summing up” the items. Read more
The default ULPs to tolerate when testing values that are far-apart. Read more
A test for equality that uses units in the last place (ULP) if the values are far apart.
The inverse of ApproxEq::ulps_eq.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Returns the smallest finite number this type can represent
👎Deprecated since 0.5.0: replaced by distributions::Standard
Generates a random instance of this type using the specified source of randomness. Read more
Should always be Self
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Checks if self is actually part of its subset T (and can be converted to it).
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
The inclusion map: converts self to the equivalent element of its superset.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Returns the largest finite number this type can represent