Module compute::linalg [−][src]
Expand description
Provides general linear algebra methods and matrix decompositions with a focus on low-dimensional data.
Modules
cholesky | Implements Cholesky decomposition. |
lu | Implements LU decomposition and system solving with the decomposition. |
substitution | Forward and backward substitution. |
Structs
Matrix | Matrix struct. |
Vector | A row-major ordering vector struct with various useful methods. |
Enums
Axis | Utilities for 3D rotations. |
Broadcast |
Traits
Dot | A trait for performing matrix products. Follows the behaviour of numpy’s |
Solve |
Functions
arange | Generates evenly spaced values within a given interval. Values generated in the half-open interval [start, stop). That is, the stop point is not included. |
backward_substitution | Solve a matrix equation of the form Ux=b, where U is an upper triangular matrix. See the Wikipedia page. |
broadcast_add | |
broadcast_div | |
broadcast_mul | |
broadcast_sub | |
cholesky | Computes the Cholesky decomposition of the matrix |
cholesky_solve | Solves the system Lx=b, where L is a lower triangular matrix (e.g., a Cholesky decomposed matrix), and b is a one dimensional vector. |
col_to_row_major | Convert a 1D matrix from column-major ordering into row-major ordering. |
design | Create a design matrix from a given matrix. |
diag | |
diag_matrix | Create a diagonal matrix with the given elements along the elements. |
dot | Calculates the dot product of two equal-length vectors. When the feature “blas” is enabled,
uses |
forward_substitution | Solve a matrix equation of the form Lx=b, where L is a lower triangular matrix. See the Wikipedia page. |
inf_norm | Calculates the infinity norm of a matrix. That is, it sums the absolute values along each row, and then returns the largest of these values. |
invert_matrix | Given an n by n matrix, invert it. The resulting matrix is returned as a flattened array. |
is_design | Checks whether a 1D array is a valid design matrix, given its number of rows. |
is_matrix | Checks whether a 1D array is a valid matrix representation given the number of rows. |
is_positive_definite | Checks whether a 1d array is a valid positive definite matrix. |
is_square | Checks whether a 1D array is a valid square matrix. |
is_symmetric | Checks whether a 1D array is a valid symmetric matrix. |
linspace | Generates evenly spaced values within a given interval, with a set number of points. Both the start and stop points are included. |
lu | Computes the pivoted LU decomposition of a square matrix. For some matrix A, this decomposition is A = PLU. The resulting matrix has U in its upper triangle and L in its lower triangle. The unit diagonal elements of L are not stored. The pivot indices representing the permutation matrix P is also returned. |
lu_solve | Solve the linear system Ax = b given a LU decomposed matrix A. The first argument should be a tuple, where the first element is the LU decomposed matrix and the second element is the pivots P. |
matmatadd | |
matmatdiv | |
matmatmul | |
matmatsub | |
matmul | Multiply two matrices together, optionally transposing one or both of them. |
matmul_blocked | Performs blocked matrix multiplication with block size |
norm | Calculates the norm of a vector. |
rotation_matrix_ccw | Returns a 3D counter-clockwise rotation matrix along the |
rotation_matrix_cw | Returns a 3D clockwise rotation matrix along the |
row_to_col_major | Convert a 1D matrix from row-major ordering into column-major ordering. |
solve | Solve the linear system Ax = b. |
solve_sys | Solves a system of linear scalar equations. |
sum | Calculates the sum of a vector. |
svadd | Implements a loop-unrolled version of the |
svdiv | Implements a loop-unrolled version of the |
svmul | Implements a loop-unrolled version of the ` |
svsub | Implements a loop-unrolled version of the ` |
toeplitz | Given a vector of length n, creates n stacked duplicates, resulting in a square Toeplitz matrix. This function also assumes evenness. That is, x_i = x_{-i}. |
transpose | Transpose a matrix. |
vabs | Implements a loop-unrolled version of the |
vacos | Implements a loop-unrolled version of the |
vacosh | Implements a loop-unrolled version of the |
vadd | Implements a loop-unrolled version of the |
vadd_mut | Implements a loop-unrolled version of the |
vandermonde | Given some length m data x, create an nth order Vandermonde matrix. |
vasin | Implements a loop-unrolled version of the |
vasinh | Implements a loop-unrolled version of the |
vatan | Implements a loop-unrolled version of the |
vatanh | Implements a loop-unrolled version of the |
vcbrt | Implements a loop-unrolled version of the |
vceil | Implements a loop-unrolled version of the |
vcos | Implements a loop-unrolled version of the |
vcosh | Implements a loop-unrolled version of the |
vdiv | Implements a loop-unrolled version of the |
vdiv_mut | Implements a loop-unrolled version of the |
vexp | Implements a loop-unrolled version of the |
vexp2 | Implements a loop-unrolled version of the |
vexpm1 | Implements a loop-unrolled version of the |
vfloor | Implements a loop-unrolled version of the |
vln | Implements a loop-unrolled version of the |
vln1p | Implements a loop-unrolled version of the |
vlog2 | Implements a loop-unrolled version of the |
vlog10 | Implements a loop-unrolled version of the |
vmul | Implements a loop-unrolled version of the ` |
vmul_mut | Implements a loop-unrolled version of the |
vpowf | Implements a loop-unrolled version of the |
vpowi | Implements a loop-unrolled version of the |
vrecip | Implements a loop-unrolled version of the |
vround | Implements a loop-unrolled version of the |
vsadd | Implements a loop-unrolled version of the |
vsadd_mut | Implements a loop-unrolled version of the |
vsdiv | Implements a loop-unrolled version of the |
vsdiv_mut | Implements a loop-unrolled version of the |
vsignum | Implements a loop-unrolled version of the |
vsin | Implements a loop-unrolled version of the |
vsinh | Implements a loop-unrolled version of the |
vsmul | Implements a loop-unrolled version of the ` |
vsmul_mut | Implements a loop-unrolled version of the |
vsqrt | Implements a loop-unrolled version of the |
vssub | Implements a loop-unrolled version of the ` |
vssub_mut | Implements a loop-unrolled version of the |
vsub | Implements a loop-unrolled version of the ` |
vsub_mut | Implements a loop-unrolled version of the |
vtan | Implements a loop-unrolled version of the |
vtanh | Implements a loop-unrolled version of the |
vtodegrees | Implements a loop-unrolled version of the |
vtoradians | Implements a loop-unrolled version of the |
xtx | Given a matrix X with k rows, return X transpose times X, which is a symmetric matrix. |