@qqqube/matrix-calculator v2.0.0
matrix-calculator
Install
npm install @qqqube/matrix-calculator
Documentation
dotProduct
Input: 1-D array, 1-D array Output: dot product of two arrays
l2norm
Input: 1-D array Output: L2 norm of 1-D array
randMatrix
Input: number of rows, number of columns Output: matrix with specified dimensions and randomly generated values from interval [0, 1)
scalarScale
Input: 2-D array, number Output: scaled 2-D array
transpose
Input: 2-D array Output: transpose of input 2-D array
reshape
Input: 2-D array, number of rows, number of columns Output: reshaped 2-D array
matrixProduct
Input: 2-D array, 2-D array Output: product of the two matrices
identity
Input: nonegative integer, d Output: identity matrix of d x d dimensions
diag
Input: 1-D array Output: 2-D array with the elements of the array as the diagonal values
trace
Input: 2-D array Output: trace of input
frobeniusNorm
Input: 2-D array Output: frobenius norm of input
sumMatrix
Input: 2-D array, 2-D array Output: sum of inputs
diffMatrix
Input: 2-D array, 2-D array Output: difference between inputs
matrixVectorProduct
Input: 2-D array, 1-D array Output: product of the inputs in 1-D array form
kroneckerProduct
Input: 2-D array, 2-D array Output: kronecker product of inputs