Fixed size (2x2, 3x3, 4x4) matrix types.
Fixed size (2x2, 3x3, 4x4) matrix types.
(acos vector)
Apply acos to matrix elements.
Apply acos to matrix elements.
(acosh vector)
Apply acosh to matrix elements.
Apply acosh to matrix elements.
(acot vector)
Apply acot to matrix elements.
Apply acot to matrix elements.
(acoth vector)
Apply acoth to matrix elements.
Apply acoth to matrix elements.
(acsc vector)
Apply acsc to matrix elements.
Apply acsc to matrix elements.
(acsch vector)
Apply acsch to matrix elements.
Apply acsch to matrix elements.
(adds A s)
Add scalar to all matrix elements
Add scalar to all matrix elements
(asec vector)
Apply asec to matrix elements.
Apply asec to matrix elements.
(asech vector)
Apply asech to matrix elements.
Apply asech to matrix elements.
(asin vector)
Apply asin to matrix elements.
Apply asin to matrix elements.
(asinh vector)
Apply asinh to matrix elements.
Apply asinh to matrix elements.
(atan vector)
Apply atan to matrix elements.
Apply atan to matrix elements.
(atanh vector)
Apply atanh to matrix elements.
Apply atanh to matrix elements.
(cbrt vector)
Apply cbrt to matrix elements.
Apply cbrt to matrix elements.
(ceil vector)
Apply ceil to matrix elements.
Apply ceil to matrix elements.
(cholesky A)
(cholesky A upper?)
Calculate L (lower by default) triangular for where L * L^T = A.
Checks only for symmetry, can return NaNs when A is not positive-definite.
Calculate L (lower by default) triangular for where L * L^T = A. Checks only for symmetry, can return NaNs when A is not positive-definite.
(cols->mat real-matrix-cols)
(cols->mat [a00 a10] [a01 a11])
(cols->mat [a00 a10 a20] [a01 a11 a21] [a02 a12 a22])
(cols->mat [a00 a10 a20 a30]
[a01 a11 a21 a31]
[a02 a12 a22 a32]
[a03 a13 a23 a33])
Create nxn matrix from nd vectors (columns).
Create nxn matrix from nd vectors (columns).
(cols->mat2x2 [a00 a10] [a01 a11])
Create 2x2 matrix from 2d vectors (columns).
Create 2x2 matrix from 2d vectors (columns).
(cols->mat3x3 [a00 a10 a20] [a01 a11 a21] [a02 a12 a22])
Create 3x3 matrix from 3d vectors (columns).
Create 3x3 matrix from 3d vectors (columns).
(cols->mat4x4 [a00 a10 a20 a30]
[a01 a11 a21 a31]
[a02 a12 a22 a32]
[a03 a13 a23 a33])
Create 4x4 matrix from 4d vectors (columns).
Create 4x4 matrix from 4d vectors (columns).
(cols->RealMatrix cols)
Return Apache Commons Math Array2DRowMatrix from sequence of columns
Return Apache Commons Math Array2DRowMatrix from sequence of columns
(condition A)
(condition A norm-type)
Condition number calculated for L2 norm by default (see norm
for other norm types).
Cond(A) = norm(A) * norm(inv(A))
Condition number calculated for L2 norm by default (see [[norm]] for other norm types). Cond(A) = norm(A) * norm(inv(A))
(cosh vector)
Apply cosh to matrix elements.
Apply cosh to matrix elements.
(coth vector)
Apply coth to matrix elements.
Apply coth to matrix elements.
(csch vector)
Apply csch to matrix elements.
Apply csch to matrix elements.
(degrees vector)
Apply degrees to matrix elements.
Apply degrees to matrix elements.
(det A)
Return determinant of the matrix.
Return determinant of the matrix.
(diag A)
Return diagonal of the matrix as a vector.
Return diagonal of the matrix as a vector.
(diagonal v)
(diagonal a11 a22)
(diagonal a11 a22 a33)
(diagonal a11 a22 a33 a44)
Create diagonal matrix
Create diagonal matrix
(eigenvalues A)
Return complex eigenvalues for given matrix as a sequence
Return complex eigenvalues for given matrix as a sequence
(eigenvalues-matrix A)
Return eigenvalues for given matrix as a diagonal or block diagonal matrix
Return eigenvalues for given matrix as a diagonal or block diagonal matrix
(eigenvectors A)
(eigenvectors A normalize?)
Return eigenvectors as a matrix (columns). Vectors can be normalized.
Return eigenvectors as a matrix (columns). Vectors can be normalized.
(emulm A B)
Multiply two matrices element-wise, Hadamard product, C=AoB
Multiply two matrices element-wise, Hadamard product, C=AoB
(entry A row col)
Get entry at given row and column
Get entry at given row and column
(expm1 vector)
Apply expm1 to matrix elements.
Apply expm1 to matrix elements.
(floor vector)
Apply floor to matrix elements.
Apply floor to matrix elements.
(fmap A f)
Apply a function f
to each matrix element.
Apply a function `f` to each matrix element.
(frac vector)
Apply frac to matrix elements.
Apply frac to matrix elements.
(inverse m)
Matrix inversion.
Returns nil
if inversion doesn't exist.
Matrix inversion. Returns `nil` if inversion doesn't exist.
(log10 vector)
Apply log10 to matrix elements.
Apply log10 to matrix elements.
(log1mexp vector)
Apply log1mexp to matrix elements.
Apply log1mexp to matrix elements.
(log1p vector)
Apply log1p to matrix elements.
Apply log1p to matrix elements.
(log1pexp vector)
Apply log1pexp to matrix elements.
Apply log1pexp to matrix elements.
(log1pmx vector)
Apply log1pmx to matrix elements.
Apply log1pmx to matrix elements.
(log1psq vector)
Apply log1psq to matrix elements.
Apply log1psq to matrix elements.
(log2 vector)
Apply log2 to matrix elements.
Apply log2 to matrix elements.
(logexpm1 vector)
Apply logexpm1 to matrix elements.
Apply logexpm1 to matrix elements.
(logit vector)
Apply logit to matrix elements.
Apply logit to matrix elements.
(logmxp1 vector)
Apply logmxp1 to matrix elements.
Apply logmxp1 to matrix elements.
(mat real-matrix-rows)
(mat a00 a01 a10 a11)
(mat a00 a01 a02 a10 a11 a12 a20 a21 a22)
(mat a00 a01 a02 a03 a10 a11 a12 a13 a20 a21 a22 a23 a30 a31 a32 a33)
Create mat2x2, mat3x3 or mat4x4 or RealMatrix from rows
Create mat2x2, mat3x3 or mat4x4 or RealMatrix from rows
(mat->array A)
Return flat double array of entries (row order)
Return flat double array of entries (row order)
(mat->array2d A)
Return doubles of doubles
Return doubles of doubles
(mat->float-array A)
Return flat float array of entries (row order)
Return flat float array of entries (row order)
(mat->float-array2d A)
Return doubles of doubles
Return doubles of doubles
(mat->RealMatrix A)
Return Apache Commons Math Array2DRowMatrix from a 2x2, 3x3 or 4x4 matrix
Return Apache Commons Math Array2DRowMatrix from a 2x2, 3x3 or 4x4 matrix
(mat->seq A)
Return flat sequence of entries (row order)
Return flat sequence of entries (row order)
(mat2x2 v)
(mat2x2 d1 d2)
(mat2x2 a00 a01 a10 a11)
Create 2x2 matrix.
Arity:
Create 2x2 matrix. Arity: * 1 - fills matrix with given value * 2 - creates diagonal matrix * 4 - creates row ordered matrix
(mat3x3 v)
(mat3x3 d1 d2 d3)
(mat3x3 a00 a01 a02 a10 a11 a12 a20 a21 a22)
Create 3x3 matrix.
Arity:
Create 3x3 matrix. Arity: * 1 - fills matrix with given value * 3 - creates diagonal matrix * 9 - creates row ordered matrix
(mat4x4 v)
(mat4x4 d1 d2 d3 d4)
(mat4x4 a00 a01 a02 a03 a10 a11 a12 a13 a20 a21 a22 a23 a30 a31 a32 a33)
Create 4x4 matrix.
Arity:
Create 4x4 matrix. Arity: * 1 - fills matrix with given value * 4 - creates diagonal matrix * 16 - creates row ordered matrix
(mulm A B)
(mulm A transposeA? B transposeB?)
Multiply two matrices, C=AxB.
Optionally you can request transposition of matrices.
Multiply two matrices, C=AxB. Optionally you can request transposition of matrices.
(mulmt A B)
Multiply with transposed matrix, C=AxB^T
Multiply with transposed matrix, C=AxB^T
(muls A s)
Multply matrix by a scalar, C=sA
Multply matrix by a scalar, C=sA
(negate A)
Negate all matrix elements, C=-A
Negate all matrix elements, C=-A
(norm A)
(norm A norm-type)
Calculate norm of the matrix for given type, default: 1 (maximum absolute column sum).
All norm types are:
Calculate norm of the matrix for given type, default: 1 (maximum absolute column sum). All norm types are: * 1 - maximum absolute column sum * :inf - maximum absolute row sum * 2 - spectral norm, maximum singular value * :max - maximum absolute value * :frobenius - Frobenius norm * [p,q] - generalized L_pq norm, [2,2] - Frobenius norm, [p,p] - entrywise p-norm * [p] - Shatten p-norm, [1] - nuclear/trace norm
(normalize A)
(normalize A rows?)
Normalize columns (or rows)
Normalize columns (or rows)
(outer v1 v2)
Outer project for two vectors.
Outer project for two vectors.
(radians vector)
Apply radians to matrix elements.
Apply radians to matrix elements.
(rint vector)
Apply rint to matrix elements.
Apply rint to matrix elements.
(rotation-matrix-2d theta)
Create rotation matrix for a plane
Create rotation matrix for a plane
(rotation-matrix-3d [x y z])
(rotation-matrix-3d x y z)
Create rotation matrix for a 3d space. Tait–Bryan angles z-y′-x″
Create rotation matrix for a 3d space. Tait–Bryan angles z-y′-x″
(rotation-matrix-3d-x a)
Create rotation matrix for a 3d space, x-axis, right hand rule.
Create rotation matrix for a 3d space, x-axis, right hand rule.
(rotation-matrix-3d-y a)
Create rotation matrix for a 3d space, y-axis, right hand rule.
Create rotation matrix for a 3d space, y-axis, right hand rule.
(rotation-matrix-3d-z a)
Create rotation matrix for a 3d space, z-axis, right hand rule.
Create rotation matrix for a 3d space, z-axis, right hand rule.
(rotation-matrix-axis-3d angle axis)
Create 3d rotation matrix for axis ratation.
Create 3d rotation matrix for axis ratation.
(round vector)
Apply round to matrix elements.
Apply round to matrix elements.
(rows->mat real-matrix-rows)
(rows->mat [a00 a01] [a10 a11])
(rows->mat [a00 a01 a02] [a10 a11 a12] [a20 a21 a22])
(rows->mat [a00 a01 a02 a03]
[a10 a11 a12 a13]
[a20 a21 a22 a23]
[a30 a31 a32 a33])
Create nxn matrix from nd vectors (rows).
Create nxn matrix from nd vectors (rows).
(rows->mat2x2 [a00 a01] [a10 a11])
Create 2x2 matrix from 2d vectors (rows).
Create 2x2 matrix from 2d vectors (rows).
(rows->mat3x3 [a00 a01 a02] [a10 a11 a12] [a20 a21 a22])
Create 3x3 matrix from 3d vectors (rows).
Create 3x3 matrix from 3d vectors (rows).
(rows->mat4x4 [a00 a01 a02 a03]
[a10 a11 a12 a13]
[a20 a21 a22 a23]
[a30 a31 a32 a33])
Create 4x4 matrix from 4d vectors (rows).
Create 4x4 matrix from 4d vectors (rows).
(rows->RealMatrix rows)
Return Apache Commons Math Array2DRowMatrix from sequence of rows
Return Apache Commons Math Array2DRowMatrix from sequence of rows
(safe-sqrt vector)
Apply safe-sqrt to matrix elements.
Apply safe-sqrt to matrix elements.
(scale-cols A)
(scale-cols A scale)
Shift columns by a value (default: sqrt(sum(x^2)/(n-1))) or a result of the function
Shift columns by a value (default: sqrt(sum(x^2)/(n-1))) or a result of the function
(scale-rows A)
(scale-rows A scale)
Shift rows by a value (default: sqrt(sum(x^2)/(n-1))) or a result of the function
Shift rows by a value (default: sqrt(sum(x^2)/(n-1))) or a result of the function
(sech vector)
Apply sech to matrix elements.
Apply sech to matrix elements.
(sfrac vector)
Apply sfrac to matrix elements.
Apply sfrac to matrix elements.
(shift-cols A)
(shift-cols A shift)
Shift columns by a value or a result of the function (mean by default)
Shift columns by a value or a result of the function (mean by default)
(shift-rows A)
(shift-rows A shift)
Shift rows by a value or a result of the function (mean by default)
Shift rows by a value or a result of the function (mean by default)
(sigmoid vector)
Apply sigmoid to matrix elements.
Apply sigmoid to matrix elements.
(signum vector)
Apply signum to matrix elements.
Apply signum to matrix elements.
(sinc vector)
Apply sinc to matrix elements.
Apply sinc to matrix elements.
(singular-values A)
Returun singular values of the matrix as sqrt of eigenvalues of A^T * A matrix.
Returun singular values of the matrix as sqrt of eigenvalues of A^T * A matrix.
(sinh vector)
Apply sinh to matrix elements.
Apply sinh to matrix elements.
(sqrt vector)
Apply sqrt to matrix elements.
Apply sqrt to matrix elements.
(symmetric? A)
Check if matrix is symmetric
Check if matrix is symmetric
(tanh vector)
Apply tanh to matrix elements.
Apply tanh to matrix elements.
(tmulm A B)
Transpose and multiply, C=A^TxB
Transpose and multiply, C=A^TxB
(tmulmt A B)
Transpose both and multiply, C=A^TxB^T
Transpose both and multiply, C=A^TxB^T
(trace A)
Return trace of the matrix (sum of diagonal elements)
Return trace of the matrix (sum of diagonal elements)
(trunc vector)
Apply trunc to matrix elements.
Apply trunc to matrix elements.
(vtmul A v)
Multiply transposed vector by matrix, C=v^T A
Multiply transposed vector by matrix, C=v^T A
(xlogx vector)
Apply xlogx to matrix elements.
Apply xlogx to matrix elements.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close