Adds value to all entries.
jStat([[1,2,3]]).add( 2 ) === [[3,4,5]];
Subtracts all entries by value.
jStat([[4,5,6]]).subtract( 2 ) === [[2,3,4]];
Divides all entries by value.
jStat([[2,4,6]]).divide( 2 ) === [[1,2,3]];
Multiplies all entries by value.
jStat([[1,2,3]]).multiply( 2 ) === [[2,4,6]];
Takes dot product.
Raises all entries by value.
jStat([[1,2,3]]).pow( 2 ) === [[1,4,9]];
Exponentiates all entries.
jStat([[0,1]]).exp() === [[1, 2.718281828459045]]
Returns the natural logarithm of all entries.
jStat([[1, 2.718281828459045]]).log() === [[0,1]];
Returns the absolute values of all entries.
jStat([[1,-2,-3]]).abs() === [[1,2,3]];
Computes 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()
.
Computes 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()
.
Adds arg
to all entries of arr
array.
Subtracts all entries of the arr
array by arg
.
Divides all entries of the arr
array by arg
.
Multiplies all entries of the arr
array by arg
.
Takes the dot product of the arr1
and arr2
arrays.
Takes the outer product of the A
and B
arrays.
outer([1,2,3],[4,5,6]) === [[4,5,6],[8,10,12],[12,15,18]]
Raises all entries of the arr
array to the power of arg
.
Exponentiates all entries in the arr
array.
Returns the natural logarithm of all entries in the arr
array
Returns the absolute values of all entries in the arr
array
Computes the norm of the arr
vector.
Computes the angle between the arr1
and arr2
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 the orthogonal matrix.
R
is the upper triangular.
Solves least squard problem for Ax=b as QR decomposition way.
If b
is of the [[b1], [b2], [b3]]
form, the method will return an array of the [[x1], [x2], [x3]]
form solution.
Otherwise, if b
is of the [b1, b2, b3]
form, the method will return an array of the [x1,x2,x3]
form solution.