Add value to all entries.
jStat([[1,2,3]]).add( 2 ) === [[3,4,5]];
Subtract all entries by value.
jStat([[4,5,6]]).subtract( 2 ) === [[2,3,4]];
Divide all entries by value.
jStat([[2,4,6]]).divide( 2 ) === [[1,2,3]];
Multiply all entries by value.
jStat([[1,2,3]]).multiply( 2 ) === [[2,4,6]];
Take dot product.
Raise all entries by value.
jStat([[1,2,3]]).pow( 2 ) === [[1,4,9]];
Exponentiate all entries.
jStat([[0,1]]).exp() === [[1, 2.718281828459045]]
Return the natural logarithm of all entries.
jStat([[1, 2.718281828459045]]).log() === [[0,1]];
Return the absolute values of all entries.
jStat([[1,-2,-3]]).abs() === [[1,2,3]];
Compulte the norm of a vector. Note that if a matrix is passed, then the first row of the matrix will be used as a vector for norm().
Compute the angle between two vectors. Note that if a matrix is passed, then the first row of the matrix will be used as the vector for angle().
Add arg to all entries of the array
Subtract all entries of the array by arg
Divide all entries of the array by arg.
Multiply all entries of the array by arg.
Take dot product of array 1 and array 2.
Take outer product of A and B.
outer([1,2,3],[4,5,6]) === [[4,5,6],[8,10,12],[12,15,18]]
Raise all entries of the array to the power of arg
Exponentiate all entries in the array
Return the natural logarithm of all entries in the array
Return the absolute values of all entries in the array
Compulte the norm of a vector.
Compute the angle between two vectors.
Augments matrix A by matrix B. Note that this method returns a plain matrix, not a jStat object.
Calculates the determinant of matrix A.
Returns the inverse of the matrix A.
Performs Gaussian Elimination on matrix A augmented by matrix B.
Performs Gauss-Jordan Elimination on matrix A augmented by matrix B.
Perform the LU decomposition on matrix A.
A -> [L,U]
st.
A=LU
L is lower triangular matrix
U is upper triangular matrix
Performs the Cholesky decomposition on matrix A.
A -> T
st.
A=TT'
T is lower triangular matrix
Solves the linear system Ax = b using the Gauss-Jacobi method with an initial guess of r.
Solves the linear system Ax = b using the Gauss-Seidel method with an initial guess of r.
Solves the linear system Ax = b using the sucessive over-relaxation method with an initial guess of r and parameter w (omega).
Performs the householder transformation on the matrix A.
Performs the Cholesky decomposition on matrix A.
A -> [Q,R]
Q is orthogonal matrix
R is upper triangular
solve least squard problem for Ax=b as QR decomposition way.
if b is [[b1],[b2],[b3]] form will return [[x1],[x2],[x3]] array form solution.
else b is [b1,b2,b3] form will return [x1,x2,x3] array form solution.